precice / micro-manager

A manager tool to facilitate two-scale coupling in multi-physics simulations using preCICE.
GNU Lesser General Public License v3.0
15 stars 10 forks source link

Add base class for Micro Manager and restructure main #111

Closed tjwsch closed 3 months ago

tjwsch commented 3 months ago

In preparation for the Snapshot computation #101 this PR adds base classes to reduce code repetitions. This introduces a new interface class MicroManagerInterface, a base class MicroManager and renames the original MicroManager class in MicroManagerCoupling. The PR also changes the structure and position of the main-method to allow snapshot execution via a flag as suggested in #101.

This is also done with the idea to extend this base class in a potential future restructuting process of the MicroManagerCoupling class.

Feedback on how to implement the base classes in clean way is highly apprecitated as I wasn't able to find examples or best practices regarding this scenario, in which a base class handles part of a constrcutor.

Checklist: