SNL-WaterPower / WecOptTool-MATLAB

WEC Design Optimization Toolbox
GNU General Public License v3.0
12 stars 9 forks source link

Device Model Class Folders #53

Closed H0R5E closed 4 years ago

H0R5E commented 4 years ago

A demo of encapsulation of the device model was shown in #52. The next step is to change the concrete classes (RM3DeviceModel) into class folders. This allows the concrete methods which define the device to be added as separate function files within the class folder.

This is nice because you won't need to worry about working with classes to make another device, you just need to build the folder, add the class header and then add the implementation of the static methods as correctly named functions.

For instance, for RM3DeviceModel, this would look something like:

\@RM3DeviceModel\RM3DeviceModel.m
                 getHydrodynamics.m
                 getMotion.m
                 complexConjugate.m
                 damping.m
                 pseudoSpectral.m
ryancoe commented 4 years ago

I think this makes sense, please proceed.

H0R5E commented 4 years ago

@ssolson, this is going to be a bit of a heavy change, so perhaps let me fix this before doing anything else.