MRST's module system is a simple facility for extending and modifying the feature set. Specficially, the module system enables on-demand activation of advanced features like black-oil simulators, flow diagnostics, or multiscale finite-volume method.
The module system is split in two parts; one which handles mapping module names to system paths and one which uses that mapping to manipulate MATLAB's search path.
Function mrstPath maintains the mapping between module names and paths on the local computer system. The paths are expected to be full paths to existing directories on the local computer system. Module names can be arbitrary strings, but are typically single words consisting of alphanumeric characters.
Function mrstPath supports three different, though related, modes of operation. The first mode establishes new module mappings. This mode is intended for end-users of MRST. The second mode manipulates the current module mapping list. The third mode is primarily intended for MRST itself. This is the query mode that is used by function mrstModule during mrstModule add to manipulate MATLAB's search path. End users will typically use the third mode to inspect the current list of module mappings. Note that individual sub-commands in function mrstPath are collectively referred to as "verbs" or "keywords". The two terms are used interchangeably.
mrstPath register AGMG S:\mrst\modules\3rdparty\agmgOnce the mapping is established, the module can be activated using the commandmrstModule add AGMGMultiple module mappings can be established with a single call to function mrstPath provided the parameters to the register verb constitutes a 2*n-element list of strings in which the odd-numbered elements are interpreted as module names and the even-numbered elements are interpreted as system path names.
mrstModule add AGMG
The mrstModule function queries and modifies the list of currently active add-on modules. A particular module feature cannot be used unless the corresponding module is active. Moreover, the module system is a simplistic wrapper around MATLAB's built-in search path feature so if two modules contain a feature (e.g., a function) with the same name, then the module that's first in the search path is the one that gets used. Individual sub-commands in function mrstModule are collectively referred to as "verbs" or "keywords"
Published January 20, 2016