-
Notifications
You must be signed in to change notification settings - Fork 8
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
base: master
Are you sure you want to change the base?
Conversation
@@ -36,6 +36,9 @@ namespace meshkernel::averaging | |||
public: | |||
virtual ~AveragingStrategy() = default; | |||
|
|||
/// @brief Reset the state of the averaging strategy, ready for the next calculation. |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
…mesh refinement constructor
No description provided.