rbmatlab 0.10.01
|
Customizable implementation of an abstract greedy algorithm.
The default implementation of a greedy basis generation algorithm is implemented by GreedyBasisGeneration. Depending on the extension object used to initialize a GreedyBasisGeneration object, it can produce
See Greedy.Plugin for a detailed description of the possible extension classes.
The default greedy basis generation algorithm can be extended in a modular way by (Meta-) basis generation classes.
(Meta-) basis generation can be used to refine the generation of the reduced bases or combine several generation algorithms in a generic way.
At the moment the following Meta classes are implemented:
Greedy.Interface implementations usually store their generated reduced bases in a tree-like data structure fulfilling the Greedy.DataTree.Detailed.INode interface. All nodes have information properties which can be changed by the methods defined in Greedy.DataTree.Info.
In order to create a reduced basis one first needs to obtain a model structure and a suitable ReducedModel, e.g. for a linear evolution model
model_descr = convdiff_model(); [dmodel,rmodel] = gen_models(model_descr);
Afterwards, one needs to specify the extension algorithm, in this case it is a standard rb extension algorithm
rb_gen = SnapshotsGenerator.Trajectories(dmodel); rb_plugin = Greedy.Plugin.POD(rb_gen);
The first line of the previous code block instantiates a SnapshotsGenerator.Trajectories object which is used to initiate the detailed simulations and cache their results on the harddrive. See SnapshotsGenerator for more details on this topic.
Now, we can instantiate the reduced basis generation algorithm after specifying the training parameter set, an optional validation parameter set, and adjusting the termination condition for the maximum error indicator.
M_train = ParameterSampling.Uniform(5); % 5 grid cells in each dimension
M_val = ParameterSampling.Random(10, 12345); % 10 randomly chosen parameters with random seed '12345'
pod_greedy = Greedy.Algorithm(rb_ext, M_train, M_val);
pod_greedy.stop_epsilon = 1e-4;
In the end, the basis generation can then be started by
detailed_data = gen_detailed_data(pod_greedy);
Of course the above code is executed automatically by the LinEvol.DetailedData class. Some parts of the created basis generation object can be controlled by options defined by a BasisGenDescr structure as a second argument to gen_default_models().
Packages | |
package | DataTree |
DataTree implementation for generated detailed and reduced data | |
package | Info |
Information objects generated throught Greedy execution. | |
package | Plugin |
Specialization plugins for the greedy algorithm. | |
package | User |
Interface classes to be implemented by the Greedy.Algorithm user. | |
Classes | |
class | Algorithm |
default greedy basis generation class More... | |
class | Checkpoint |
Helper class used to store and restore data tree objects at specified checkpoints. More... | |
class | Combined |
combines two or more instances of a Greedy.Interface class by executing them subsequently. More... | |
class | EiTpart |
class | Interface |
Interface class for all kind of reduced basis generation algorithms More... | |
class | MetaInterface |
class | TrainingSetAdaptation |
greedy basis generation extension which adaptively refines the trainings parameter set. More... |