KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
KerMor Development

Useful notes for KerMor developers

For a list of currently involved developers see the KerMor Developers page.

The current TODO list can be found here.

For hints on how to work with and maintain this documentation see Documentation creation. Check out pages where the documentation needs to be updated here.

Coding guidlines

Here you can find some information about how to write new code for the KerMor framework.

Creating new classes and functions

An extra class Devel has been created to aid KerMor Developers creating new files in the manner of KerMor.

This class has two static methods Devel.newClass and Devel.newFun which can be used to create the respective files in the current folder. When calling those functions, either the files template_class and template_fun from the KerMor root directory are parsed and their output is used as new file. This allows to automatically create class/function skeletons matching the current developer and KerMor version.

Please make sure you use the Devel class in order to keep the line of KerMor development.

Getter & Setter

Writing getter & setter methods for your classes can usually be done straightforwardly. As setters allow to check for a required type of a property, custom methods and actions may be required to validate the value to be set. However, extreme care must be taken when implementing custom setters as the save/load cycle managed by matlab does not check or guarantee any order in which the properties are loaded. As the setter is invoked for every property customized code may fail to work or validate wrong when other properties (even in remote classes!) may not yet have been set. In order to avoid this, MatLab offers the Dependent keyword in order to avoid problems during loading. A detailed example on how to utilize this property attribute is given in the official MatLab TechDocs, for example.

An example within the KerMor framework is the property models.ReducedModel.ErrorEstimator. Setting this property calls a validation method if this error estimator is applicable to the given model, and thus accesses many remote object's properties. Upon load, this must not be executed as some values aren't loaded yet. So declaring this property as Dependent avoids this value to be set by the builtin load method.

Further examples: