7 import java.io.IOException;
76 @SuppressWarnings(
"unchecked")
77 private
void loadAffineFunctions(
AModelManager m) throws Exception {
79 ClassLoader cl = m.getClassLoader();
80 Class<?> af = cl.loadClass(m.getModelPackageStr() +
"AffineFunctions");
82 Log.d(
DEBUG_TAG,
"Loaded AffineFunctions class");
85 mRbSystem.oldAffFcnCl = af;
86 mRbSystem.oldAffFcnObj = af.newInstance();
88 mRbSystem.affineFunctionsClass = IAffineFunctions.class;
91 mRbSystem.affineFunctionsClass = (Class<IAffineFunctions>) af;
92 mRbSystem.affineFunctionsInstance = mRbSystem.affineFunctionsClass.newInstance();
127 if (!readSystemDescriptionsRBAppMit(m))
130 readSystemDescriptionsJRB(m);
134 mRbSystem = fSystemType.getNewRBSystem();
145 loadAffineFunctions(m);
146 }
catch (Exception e) {
147 Log.e(
DEBUG_TAG,
"Exception occurred while loading affine functions: " + e.getMessage(), e);
157 mRbSystem.loadOfflineData(m);
158 Log.d(
DEBUG_TAG,
"Finished reading offline data for RBSystem.");
161 if (mRbScmSystem != null) {
163 mRbScmSystem.readConfiguration(m);
164 mRbScmSystem.loadOfflineData(m);
165 Log.d(
DEBUG_TAG,
"Finished reading offline data for RBSCMSystem.");
177 }
catch (Exception e) {
178 Log.e(
DEBUG_TAG,
"Exception occurred while reading offline data: " + e.getMessage(), e);
216 problemTitle = m.getModelXMLTagValue(
"description.name");
221 fSystemType = SystemType.parse(m.getModelXMLTagValue(
"rb_model.systype"));
222 fSCMType = SCMType.parse(m.getModelXMLTagValue(
"rb_model.scmtype"));
224 Log.d(
DEBUG_TAG,
"RB system type = " + fSystemType);
225 Log.d(
DEBUG_TAG,
"SCM type = " + fSCMType);
228 private boolean readSystemDescriptionsRBAppMit(AModelManager m) {
230 GetPot infile = null;
233 }
catch (IOException e) {
234 Log.e(
"RBContainer",
"Exception loading infile.in", e);
242 String SystemTypeEnum_in = infile.call(
"system_type",
"NONE");
243 fSystemType = SystemType.parse(SystemTypeEnum_in);
245 String SCMTypeEnum_in = infile.call(
"scm_type",
"NONE");
246 fSCMType = SCMType.parse(SCMTypeEnum_in);
248 Log.d(
DEBUG_TAG,
"RB system type = " + fSystemType);
249 Log.d(
DEBUG_TAG,
"SCM type = " + fSCMType);
Compatibility class for old rbAppMIT affine functions.
SystemType getSystemType()
String problemTitle
Descriptive member variables for the problem title, variable names, and general info.
This class provides the Online stage for the reduced basis method for elliptic steady state problems...
RBSystem mRbSystem
The RBSystem object.
final boolean readConfiguration(AModelManager m)
An rbappmit-model of old data format, compatible with JRB models.
Base class for RB models and systems.
Base interface for any affine functions used as an externally loaded class.
This class implements the Online stage of the Successive Constraint Method for coercive problems...
Known model types within the JaRMoSBase project.
This class serves as base class for accessing various types of models at different locations...
Enum containing the known SCM (successive constraint method) model types in JRB.
boolean loadModel(AModelManager m)
Loads an rb/rbappmit type model using a provided ModelManager.
ModelType getModelType()
Returns the model type as given in the model.xml attribute "type" of the "model" tag.
Provides a Log class imitating the Android Log class when not used on android systems.
String descriptionURL
Some url :-)
static final String parameters_filename
Inherited from the rbAppMIT models to read the model parameters.
String problemDescription
A short problem description.
static final String DEBUG_TAG
RBSCMSystem mSecondRbScmSystem
The second RBSCMSystem object, needed in some time-dependent problems.
Enum for known RB system types in JRB.
RBSCMSystem mRbScmSystem
The main RBSCMSystem object.