aspect icon indicating copy to clipboard operation
aspect copied to clipboard

Implement an interface that external surface deformation tools can use.

Open bangerth opened this issue 6 months ago • 4 comments

@tjhei and @gregtucker and I were brainstorming how the interface to external tools for surface deformation should look like. I promised @tjhei a prototype that he could fill in with the MPIRemotePointEvaluation tools he has been writing.

@tjhei Feel free to push to this branch. I think I marked up all the places where you have to put code.

@xlia62, @minerallo, @djneu, @MFraters Once this is finished, it may actually be of interest to you as well. Feedback on the interface, documentation, and implementation of the class here is certainly welcome!

bangerth avatar Jun 30 '25 04:06 bangerth

This sounds great! Just to clarify, does this mean it will allow interpolation of values at remote points, for example on a higher-resolution mesh used by an external surface model? Im looking forward !

Minerallo avatar Jul 01 '25 11:07 Minerallo

@Minerallo Yes, exactly. You won't have to do the interpolation yourself any more, just say "I need the solution at these points" and it will be given to you :-)

bangerth avatar Jul 01 '25 12:07 bangerth

For run-control and data-query functions, consider looking to the Basic Model Interface (BMI) for inspiration. For example, BMI run-control specifications in C++ look like:

      // Model control functions.
      virtual void Initialize(std::string config_file) = 0;
      virtual void Update() = 0;
      virtual void UpdateUntil(double time) = 0;
      virtual void Finalize() = 0;

and variable getters and setters look like:

      // Variable getters
      virtual void GetValue(std::string name, void *dest) = 0;
      virtual void *GetValuePtr(std::string name) = 0;
      virtual void GetValueAtIndices(std::string name, void *dest, int *inds, int count) = 0;

      // Variable setters
      virtual void SetValue(std::string name, void *src) = 0;
      virtual void SetValueAtIndices(std::string name, int *inds, int count, void *src) = 0;

gregtucker avatar Jul 03 '25 22:07 gregtucker

@tjhei 's current draft of an implementation: https://github.com/landlab-aspect/aspect/pull/9

@danieldouglas92 FYI

bangerth avatar Oct 16 '25 21:10 bangerth