-
Notifications
You must be signed in to change notification settings - Fork 54
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
Generalize Interpolator classes #176
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -16,14 +16,21 @@ | |||||
// Chombo namespace | ||||||
#include "UsingNamespace.H" | ||||||
|
||||||
// Abstrace base class to get the FABs out of an AMRLevel | ||||||
class InterpSource | ||||||
// Abstrace base class to identify points in a grid structure | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Might as well fix the typo while we're at it
Suggested change
|
||||||
template <int N_DIMS = CH_SPACEDIM> class InterpSource | ||||||
{ | ||||||
public: | ||||||
virtual const LevelData<FArrayBox> &getLevelData( | ||||||
const VariableType var_type = VariableType::evolution) const = 0; | ||||||
virtual bool | ||||||
contains(const std::array<double, CH_SPACEDIM> &point) const = 0; | ||||||
virtual bool contains(const std::array<double, N_DIMS> &point) const = 0; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you add |
||||||
virtual double get_dx(int dir) const = 0; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks like this function has to be defined even if the specialised class represents an |
||||||
virtual std::array<double, N_DIMS> get_dxs() const | ||||||
{ | ||||||
std::array<double, N_DIMS> dxs; | ||||||
for (int i = 0; i < N_DIMS; ++i) | ||||||
dxs[i] = get_dx(i); | ||||||
return dxs; | ||||||
} | ||||||
}; | ||||||
|
||||||
#endif /* INTERPSOURCE_H_ */ |
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.
I think I'm ok with moving this here but we should delete the InterpolationLayout.hpp file too.