JaRMoS  1.1
Java Reduced Model Simulations
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
TestrbappmitModels.java
Go to the documentation of this file.
1 package rb.test;
2 
3 import static org.junit.Assert.assertTrue;
5 import jarmos.ModelType;
12 
13 import org.junit.Test;
14 
15 import rb.RBContainer;
16 import rb.RBSystem;
17 
22 public class TestrbappmitModels {
28  @Test
29  public void testRBSolve_rbappmit_Models() throws ModelManagerException {
30  FileModelManager f = new FileModelManager("models");
31  for (ModelDescriptor md : f.getModelDescriptors()) {
32  if (md.type == ModelType.rbappmit) {
33  f.useModel(md.modeldir);
34 
35  RBContainer rb = new RBContainer();
36  assertTrue(rb.loadModel(f));
37 
38  // Perform the solve
39  RBSystem s = rb.mRbSystem;
40  double[] par = s.getParams().getRandomParam();
41  s.getParams().setCurrent(par);
42  s.computeRBSolution(2);
43 
44  SimulationResult sol = s.getSimulationResults();
45 
46  GeometryData g = new GeometryData();
47  g.loadModelGeometry(f);
48 
49  VisualizationData d = new VisualizationData(g);
50  d.useResult(sol);
51 
52  d.computeVisualFeatures(new ColorGenerator());
53  }
54  }
55  }
56 }
This class provides the Online stage for the reduced basis method for elliptic steady state problems...
Definition: RBSystem.java:54
Represents the results of a simulation.
Manages models loaded from the file system available via the java.io classes.
Base class for RB models and systems.
Known model types within the JaRMoSBase project.
Definition: ModelType.java:9
Represents a short description of a model managed by a model manager.
A container class for all model visual data.
This Exception gets thrown when an error occurs regarding the functionality of the ModelManager...
This is a container class for all geometry-related data of a reduced model.
The color generator is used to produce RGBA (RGB+Alpha) values from a given array of floats...