Skip to content

Commit

Permalink
Refactor: extract computation for contour map projection.
Browse files Browse the repository at this point in the history
  • Loading branch information
kriben committed Nov 7, 2024
1 parent d2cd425 commit f5437e6
Show file tree
Hide file tree
Showing 16 changed files with 1,735 additions and 991 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,13 @@
#include "RigFemPart.h"
#include "RigFemResultAddress.h"

#include "RimCheckableNamedObject.h"
#include "RimContourMapProjection.h"

#include "cafDisplayCoordTransform.h"
#include "cafPdmChildField.h"
#include "cafPdmField.h"
#include "cafPdmObject.h"

#include "cvfArray.h"
#include "cvfBoundingBox.h"
#include "cvfGeometryBuilderFaceList.h"
#include "cvfString.h"
#include "cvfVector2.h"

class RimGeoMechContourMapView;
class RimGeoMechCase;
Expand All @@ -58,27 +52,19 @@ class RimGeoMechContourMapProjection : public RimContourMapProjection
double sampleSpacing() const override;

protected:
using CellIndexAndResult = RimContourMapProjection::CellIndexAndResult;

// GeoMech implementation specific data generation methods
cvf::ref<cvf::UByteArray> getCellVisibility() const override;
cvf::BoundingBox calculateExpandedPorBarBBox( int timeStep, int frameIndex ) const;
void updateGridInformation() override;
std::vector<bool> getMapCellVisibility() override;
std::vector<double> retrieveParameterWeights() override;
std::vector<double> generateResults( int viewerStepIndex ) override;

std::vector<double> retrieveParameterWeights() override;
std::vector<double> generateResults( int timeStep ) const override;
void generateAndSaveResults( int timeStep ) override;
std::vector<double>
generateResultsFromAddress( RigFemResultAddress resultAddress, const std::vector<bool>& mapCellVisibility, int viewerStepIndex );
bool resultVariableChanged() const override;
void clearResultVariable() override;
RimGridView* baseView() const override;
std::vector<size_t> findIntersectingCells( const cvf::BoundingBox& bbox ) const override;
size_t kLayer( size_t globalCellIdx ) const override;
size_t kLayers() const override;
double calculateOverlapVolume( size_t globalCellIdx, const cvf::BoundingBox& bbox ) const override;
double calculateRayLengthInCell( size_t globalCellIdx, const cvf::Vec3d& highestPoint, const cvf::Vec3d& lowestPoint ) const override;
double getParameterWeightForCell( size_t globalCellIdx, const std::vector<double>& parameterWeights ) const override;
std::vector<double> gridCellValues( RigFemResultAddress resAddr, std::vector<float>& resultValues ) const;
generateResultsFromAddress( RigFemResultAddress resultAddress, const std::vector<bool>& mapCellVisibility, int viewerStepIndex ) const;
bool resultVariableChanged() const override;
void clearResultVariable() override;
RimGridView* baseView() const override;
RimGeoMechCase* geoMechCase() const;
RimGeoMechContourMapView* view() const;

Expand All @@ -100,5 +86,4 @@ class RimGeoMechContourMapProjection : public RimContourMapProjection
cvf::ref<RigFemPart> m_femPart;
cvf::cref<RigFemPartGrid> m_femPartGrid;
RigFemResultAddress m_currentResultAddr;
size_t m_kLayers;
};
Loading

0 comments on commit f5437e6

Please sign in to comment.