Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/gridedit 785 refactor mesh refinement #263

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

BillSenior
Copy link
Contributor

No description provided.

@@ -36,6 +36,9 @@ namespace meshkernel::averaging
public:
virtual ~AveragingStrategy() = default;

/// @brief Reset the state of the averaging strategy, ready for the next calculation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add param interpolationPoint to doxy

@@ -97,7 +99,9 @@ namespace meshkernel::averaging
// Setup
Point p = Point(0.0, 0.0);
std::unique_ptr<AveragingStrategy> pStrategy = AveragingStrategyFactory::GetAveragingStrategy(GetParam().method_, 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unrelated. method_: can use m_ prefix rather than _ suffix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing to: GetParam().m_method
does not compile

@@ -36,6 +36,9 @@ namespace meshkernel::averaging
public:
virtual ~AveragingStrategy() = default;

/// @brief Reset the state of the averaging strategy, ready for the next calculation.
virtual void Reset(const Point& interpolationPoint) = 0;

/// @brief Adds the specified sample point.
/// @param[in] samplePoint The sample point to add to this strategy.
/// @param[in] sampleValue The value associated with the sample point.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never liked the how samplePoint is a dummy arg in most derived classes. Only ClosestAveragingStrategy and InverseWeightedAveragingStrategy use it. Having a SetSamplePoint method in the base is also a bad idea because again, only used when ClosestAveragingStrategy and InverseWeightedAveragingStrategy arte created.
Can you think of a better way to do this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only way I can see to resolve this is going back to the orginal, allocating a new object for each interpolation point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants