mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4683 Fix line endings and execute clang-format
This commit is contained in:
@@ -21,43 +21,43 @@
|
||||
#include "RimGeoMechCase.h"
|
||||
#include "RimGeoMechView.h"
|
||||
|
||||
|
||||
#include "Riu3dSelectionManager.h"
|
||||
|
||||
|
||||
CAF_PDM_SOURCE_INIT(RimGeoMechGeometrySelectionItem, "GeoMechGeometrySelectionItem");
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimGeoMechGeometrySelectionItem, "GeoMechGeometrySelectionItem" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimGeoMechGeometrySelectionItem::RimGeoMechGeometrySelectionItem()
|
||||
{
|
||||
CAF_PDM_InitObject("GeoMech Topology Item", "", "", "");
|
||||
CAF_PDM_InitObject( "GeoMech Topology Item", "", "", "" );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_geoMechCase, "GeoMechCase", "Geo Mech Case", "", "", "");
|
||||
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", "", "", "");
|
||||
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()
|
||||
{
|
||||
}
|
||||
RimGeoMechGeometrySelectionItem::~RimGeoMechGeometrySelectionItem() {}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimGeoMechGeometrySelectionItem::setFromSelectionItem(const RiuGeoMechSelectionItem* selectionItem)
|
||||
void RimGeoMechGeometrySelectionItem::setFromSelectionItem( const RiuGeoMechSelectionItem* selectionItem )
|
||||
{
|
||||
m_geoMechCase = selectionItem->m_view->geoMechCase();
|
||||
|
||||
@@ -65,9 +65,9 @@ void RimGeoMechGeometrySelectionItem::setFromSelectionItem(const RiuGeoMechSelec
|
||||
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_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_localIntersectionPointInDisplay;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ QString RimGeoMechGeometrySelectionItem::geometrySelectionText() const
|
||||
{
|
||||
QString text;
|
||||
|
||||
/*
|
||||
/*
|
||||
if (m_geoMechCase)
|
||||
{
|
||||
text += m_geoMechCase->caseUserDescription();
|
||||
@@ -89,11 +89,12 @@ QString RimGeoMechGeometrySelectionItem::geometrySelectionText() const
|
||||
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;
|
||||
}
|
||||
@@ -105,4 +106,3 @@ RimGeoMechCase* RimGeoMechGeometrySelectionItem::geoMechCase() const
|
||||
{
|
||||
return m_geoMechCase;
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,6 @@
|
||||
|
||||
class RivTernaryScalarMapper;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Thoughts on organizing the texture coords generation a bit.
|
||||
|
||||
@@ -53,6 +51,7 @@ class RivTernaryScalarMapper;
|
||||
the ResultPointValue will be the same for all the corresponding GeometryPoints,
|
||||
which means each quadvertex has the same texcoord for all corners.
|
||||
|
||||
|
||||
Proposal:
|
||||
----------
|
||||
Let the FaceValue to Face vertex texture coordinate mapping be the same for all.
|
||||
@@ -81,6 +80,7 @@ class RivTernaryScalarMapper;
|
||||
texCoords[i*4 + 3] = texCoord;
|
||||
}
|
||||
|
||||
|
||||
Texturing needs in ResInsight:
|
||||
* ScalarMapper
|
||||
* Handle HugeVal/nan
|
||||
@@ -101,23 +101,38 @@ class RivTernaryScalarMapper;
|
||||
class CellEdgeEffectGenerator : public caf::EffectGenerator
|
||||
{
|
||||
public:
|
||||
explicit CellEdgeEffectGenerator(const cvf::ScalarMapper* edgeScalarMapper);
|
||||
explicit CellEdgeEffectGenerator( const cvf::ScalarMapper* edgeScalarMapper );
|
||||
|
||||
void setScalarMapper(const cvf::ScalarMapper* cellScalarMapper);
|
||||
void setTernaryScalarMapper(const RivTernaryScalarMapper* ternaryScalarMapper);
|
||||
void setScalarMapper( const cvf::ScalarMapper* cellScalarMapper );
|
||||
void setTernaryScalarMapper( const RivTernaryScalarMapper* ternaryScalarMapper );
|
||||
|
||||
void setOpacityLevel(float opacity) { m_opacityLevel = cvf::Math::clamp(opacity, 0.0f , 1.0f ); }
|
||||
void setUndefinedColor(cvf::Color3f color) { m_undefinedColor = color; }
|
||||
void setFaceCulling(caf::FaceCulling faceCulling) { m_cullBackfaces = faceCulling; }
|
||||
void setDefaultCellColor(cvf::Color3f color) { m_defaultCellColor = color; }
|
||||
void disableLighting(bool disable) { m_disableLighting = disable; }
|
||||
void setOpacityLevel( float opacity )
|
||||
{
|
||||
m_opacityLevel = cvf::Math::clamp( opacity, 0.0f, 1.0f );
|
||||
}
|
||||
void setUndefinedColor( cvf::Color3f color )
|
||||
{
|
||||
m_undefinedColor = color;
|
||||
}
|
||||
void setFaceCulling( caf::FaceCulling faceCulling )
|
||||
{
|
||||
m_cullBackfaces = faceCulling;
|
||||
}
|
||||
void setDefaultCellColor( cvf::Color3f color )
|
||||
{
|
||||
m_defaultCellColor = color;
|
||||
}
|
||||
void disableLighting( bool disable )
|
||||
{
|
||||
m_disableLighting = disable;
|
||||
}
|
||||
|
||||
protected:
|
||||
bool isEqual( const EffectGenerator* other ) const override;
|
||||
EffectGenerator* copy() const override;
|
||||
|
||||
void updateForShaderBasedRendering(cvf::Effect* effect) const override;
|
||||
void updateForFixedFunctionRendering(cvf::Effect* effect) const override;
|
||||
void updateForShaderBasedRendering( cvf::Effect* effect ) const override;
|
||||
void updateForFixedFunctionRendering( cvf::Effect* effect ) const override;
|
||||
|
||||
private:
|
||||
cvf::cref<cvf::ScalarMapper> m_edgeScalarMapper;
|
||||
@@ -133,4 +148,3 @@ private:
|
||||
cvf::Color3f m_defaultCellColor;
|
||||
bool m_disableLighting;
|
||||
};
|
||||
|
||||
|
||||
@@ -31,17 +31,17 @@
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
TEST(RifEclipseSummaryTest, BasicTestSetCurrentFolder)
|
||||
TEST( RifEclipseSummaryTest, BasicTestSetCurrentFolder )
|
||||
{
|
||||
RifReaderEclipseSummary eclSummary;
|
||||
|
||||
static const QString testDataRootFolder = QString("%1/SummaryData/Reek/").arg(TEST_DATA_DIR);
|
||||
static const QString testDataRootFolder = QString( "%1/SummaryData/Reek/" ).arg( TEST_DATA_DIR );
|
||||
|
||||
QString summaryFileName = testDataRootFolder + "3_R001_REEK-1.SMSPEC";
|
||||
|
||||
bool hasWarning = false;
|
||||
std::vector<RifRestartFileInfo> originFileInfos = eclSummary.getRestartFiles(summaryFileName, &hasWarning);
|
||||
EXPECT_TRUE(originFileInfos.empty());
|
||||
std::vector<RifRestartFileInfo> originFileInfos = eclSummary.getRestartFiles( summaryFileName, &hasWarning );
|
||||
EXPECT_TRUE( originFileInfos.empty() );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -147,6 +147,9 @@ RifReaderEclipseSummary); eclSummary->open(headerFile, dataFiles);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
{
|
||||
// MSJ TODO: Formatted output does not work now, should be reported?
|
||||
/ *
|
||||
@@ -175,6 +178,9 @@ RifReaderEclipseSummary); eclSummary->open(headerFile, dataFiles);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/ *
|
||||
{
|
||||
std::string path;
|
||||
@@ -199,6 +205,9 @@ TEST(RifEclipseSummaryTest, BasicReadKeywordTest)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
std::string filename = "g:\\Models\\Statoil\\testcase_juli_2011\\data\\TEST10K_FLT_LGR_NNC";
|
||||
|
||||
std::string headerFileName;
|
||||
@@ -210,6 +219,9 @@ TEST(RifEclipseSummaryTest, BasicReadKeywordTest)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
eclSummary->open(headerFileName, dataFileNames);
|
||||
|
||||
RifEclipseSummaryTools::dumpMetaData(eclSummary.get());
|
||||
@@ -226,6 +238,9 @@ TEST(RifEclipseSummaryTest, DISABLE_BasicReadKeywordTest)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
std::string filename = "g:\\Models\\Statoil\\MultipleRealisations\\Case_without_p9\\Real10\\BRUGGE_0010.SMSPEC";
|
||||
std::vector<std::string> dataFileNames;
|
||||
dataFileNames.push_back("g:\\Models\\Statoil\\MultipleRealisations\\Case_without_p9\\Real10\\BRUGGE_0010.S0001");
|
||||
@@ -277,6 +292,9 @@ TEST(RifEclipseSummaryTest, BasicReadDataTest)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
std::string filename = "g:\\Models\\Statoil\\MultipleRealisations\\Case_without_p9\\Real10\\BRUGGE_0010.SMSPEC";
|
||||
std::vector<std::string> dataFileNames;
|
||||
dataFileNames.push_back("g:\\Models\\Statoil\\MultipleRealisations\\Case_without_p9\\Real10\\BRUGGE_0010.S0001");
|
||||
@@ -313,6 +331,9 @@ TEST(RifEclipseSummaryTest, BasicReadDataTest)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -677,6 +698,9 @@ TEST(RifEclipseSummaryTest, DISABLED_BasicTestSetCurrentFolder)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
QString currentFolderName = "g:\\Models\\Statoil\\MultipleRealisations\\Case_without_p9\\Real10";
|
||||
QDir::setCurrent(currentFolderName);
|
||||
|
||||
@@ -705,6 +729,9 @@ TEST(RifEclipseSummaryTest, DISABLED_BasicTest)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
std::string filename = "g:\\Models\\Statoil\\MultipleRealisations\\Case_without_p9\\Real10\\BRUGGE_0010";
|
||||
eclSummary->open(filename);
|
||||
|
||||
@@ -712,6 +739,9 @@ TEST(RifEclipseSummaryTest, DISABLED_BasicTest)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
std::vector<std::string> keywords;
|
||||
eclSummary->keywords(&keywords);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user