JaRMoS
1.1
Java Reduced Model Simulations
|
This class provides the Online stage for the reduced basis method for elliptic steady state problems. More...
Public Member Functions | |
RBSystem () | |
Constructor. More... | |
FieldVector< Complex > | complex_eval_theta_q_a () |
Complex | complex_eval_theta_q_a (int q) |
Complex | complex_eval_theta_q_f (int q) |
Complex | complex_eval_theta_q_l (int n, int q) |
int | get_N () |
double | get_RB_output (int n_output, boolean Rpart) |
double | get_RB_output_error_bound (int n_output, boolean Rpart) |
double | get_SCM_lower_bound () |
RealVector | getInitialCoefficients (int N) |
Returns the initial conditions solution coefficients for RB size N. More... | |
int | getNBF () |
int | getNumOutputs () |
Parameters | getParams () |
Returns the system's parameters object. More... | |
int | getQa () |
int | getQf () |
TODO: if all affine_functions implement the IAffineFunctions interface, just call the getQf method of the local instance. More... | |
int | getQuL () |
SimulationResult | getSimulationResults () |
Constructs the true solution from the most recent RB reduced solution using the full Z data and current coefficients. More... | |
double | getSweepIncrement () |
Returns the increment used during the last parameter sweep or zero if there hasn't been any. More... | |
double[][] | getSweepOutputBounds () |
double[][] | getSweepOutputs () |
SimulationResult | getSweepSimResults () |
int | getTotalTimesteps () |
TODO check where this is used. More... | |
int | getVisualNumTimesteps () |
void | loadOfflineData (AModelManager m) throws MathReaderException, ModelManagerException, IOException |
Loads the offline data for the RBSystem. More... | |
float[] | rbappmitCustomMeshTransform (double[] mu, float[] x) |
Custom mesh transformation method of old rbappmit-models. More... | |
int | performSweep (int sweepIndex, int N) |
Performs a parameter sweep with automatic guess of the number of parameter sweeps. More... | |
int | performSweep (int sweepIndex, int N, int numSweepPts) |
Performs a parameter sweep for the current RB system. More... | |
final boolean | readConfiguration (AModelManager m) |
void | set_n_basis_functions (int _N) |
void | setPrimarySCM (RBSCMSystem scm_system) |
Set the primary SCM. More... | |
double | computeRBSolution (int N) |
Performs a reduced basis simulation and stores the results locally. More... | |
double | thetaQa (int q) |
Evaluate theta_q_a (for the q^th bilinear form) at the current parameter. More... | |
double | thetaQa (int q, double t) |
double | thetaQf (int i) |
double | thetaQf (int i, double t) |
double | thetaQl (int k, int i) |
double | thetaQl (int k, int i, double t) |
Public Member Functions inherited from jarmos.ModelBase | |
void | loadOfflineData (AModelManager m) throws MathReaderException, ModelManagerException, IOException |
Loads the model's offline data. More... | |
GeometryData | getGeometry () |
The model's geometry data. More... | |
int | getNumDoFFields () |
Returns the number of degree-of-freedom fields generated/computed by the model. More... | |
Public Attributes | |
Class< IAffineFunctions > | affineFunctionsClass |
The Class object for the affine functions class. More... | |
IAffineFunctions | affineFunctionsInstance |
The member object that defines the parameter-dependent functions for the affine expansion of the left-hand, right-hand side and outputs. More... | |
boolean | isReal = true |
RBSCMSystem | mRbScmSystem |
A reference to the SCM system. More... | |
Class<?> | oldAffFcnCl |
Object | oldAffFcnObj |
double[][] | output_dual_norms |
This array stores the dual norms for each output. More... | |
double[] | RB_output_error_bounds |
The vector storing the RB error bounds in the steady-state case. More... | |
double[][] | RB_output_error_bounds_all_k |
The output error bounds at all time levels. More... | |
double[] | RB_outputs |
The vector storing the RB output values in the steady-state case. More... | |
double[][] | RB_outputs_all_k |
The outputs at all time levels. More... | |
boolean | return_rel_error_bound |
Boolean flag to indicate whether RB_solve returns an absolute or relative error bound. More... | |
Protected Member Functions | |
double | compute_output_dual_norm (int i, double t) |
Compute the dual norm of the i^th output function at the current parameter value. More... | |
double | compute_residual_dual_norm (int N) |
Compute the dual norm of the residual for the solution saved in RB_solution_vector. More... | |
double[][] | get_RBsolution () |
double | get_SCM_from_AffineFunction () |
A private helper function to get the SCM from AffineFunctions in the case that SCM_TYPE = NONE. More... | |
int | getQl (int output_index) |
TODO: if all affine_functions implement the IAffineFunctions interface, just call the getQl method of the local instance. More... | |
float[][] | getAffLinTransformationData (double[] mu) |
Returns a float array of transformation data for each node, using the specified parameter mu. More... | |
boolean | hasCustomMeshTransform () |
boolean | hasAffLinTransformationData () |
void | initialize_data_vectors () |
Resize the vectors that store solution data and output data. More... | |
void | loadOfflineData_rbappmit (AModelManager m) throws IOException |
void | loadOfflineDataJRB (AModelManager m) throws IOException |
double | RB_solve (int N) |
Perform online solve with the N RB basis functions, for the set of parameters in current_params, where 1 <= N <= RB_size. More... | |
void | readConfigurationJRB (AModelManager m) |
void | readConfigurationRBAppMIT (GetPot infile) |
double | residual_scaling_denom (double alpha_LB) |
Specifies the residual scaling on the denominator to be used in the a posteriori error bound. More... | |
void | setParams (Parameters p) |
Only used to set the current parameters object for an SCMSystem, as this also inherits from the RBBase class. More... | |
Protected Attributes | |
double[][][] | Aq_Aq_representor_norms |
int | current_N |
double[][][] | Fq_Aq_representor_norms |
double[] | Fq_representor_norms |
Arrays storing the residual representor inner products to be used in computing the residuals in the Online stage. More... | |
float[][][] | fullBasisVectors |
RealMatrix[] | RB_A_q_vector |
Dense matrices for the RB computations. More... | |
RealVector[] | RB_F_q_vector |
Dense vector for the RHS. More... | |
RealVector[][] | RB_output_vectors |
The vectors storing the RB output vectors. More... | |
RealVector | RB_solution |
The RB solution vector. More... | |
double[][][] | RB_sweep_solution |
float[][] | uL_vector |
List< MeshTransform > | transforms |
Protected Attributes inherited from jarmos.ModelBase | |
FieldDescriptor[] | logicalFieldTypes |
The logical output fields of the model, each collecting one ore more model DoF's into a related unit, like displacements which have 2-3 DoF-fields (x,y,z) More... | |
Package Functions | |
double | get_SCM_upper_bound () |
double | get_soln_coeff (int i) |
This class provides the Online stage for the reduced basis method for elliptic steady state problems.
This class has been taken from the original rbAppMIT package and modified to fit into the current JaRMoS framework.
import & use implicit operators LL_I from rbmatlab
report progress for transient RB systems and/or normal systems
Definition at line 54 of file RBSystem.java.
rb.RBSystem.RBSystem | ( | ) |
Constructor.
Definition at line 225 of file RBSystem.java.
FieldVector<Complex> rb.RBSystem.complex_eval_theta_q_a | ( | ) |
Definition at line 238 of file RBSystem.java.
Complex rb.RBSystem.complex_eval_theta_q_a | ( | int | q | ) |
Definition at line 277 of file RBSystem.java.
Complex rb.RBSystem.complex_eval_theta_q_f | ( | int | q | ) |
Definition at line 317 of file RBSystem.java.
Complex rb.RBSystem.complex_eval_theta_q_l | ( | int | n, |
int | q | ||
) |
Definition at line 357 of file RBSystem.java.
|
protected |
Compute the dual norm of the i^th output function at the current parameter value.
Definition at line 402 of file RBSystem.java.
|
protected |
Compute the dual norm of the residual for the solution saved in RB_solution_vector.
Definition at line 423 of file RBSystem.java.
double rb.RBSystem.computeRBSolution | ( | int | N | ) |
Performs a reduced basis simulation and stores the results locally.
Access via getSimulationResults
N |
If this system is unsteady dont perform geometric transformations (not checked yet/no models there yet) Comes from the LINEAR_STEADY / LINEAR_COMPLEX_STEADY enums in ROMSim/rbappmit, where the check was made originally.
Definition at line 1617 of file RBSystem.java.
int rb.RBSystem.get_N | ( | ) |
mu | |
gData |
Definition at line 499 of file RBSystem.java.
double rb.RBSystem.get_RB_output | ( | int | n_output, |
boolean | Rpart | ||
) |
Definition at line 503 of file RBSystem.java.
double rb.RBSystem.get_RB_output_error_bound | ( | int | n_output, |
boolean | Rpart | ||
) |
Definition at line 507 of file RBSystem.java.
|
protected |
Definition at line 511 of file RBSystem.java.
|
protected |
A private helper function to get the SCM from AffineFunctions in the case that SCM_TYPE = NONE.
Definition at line 518 of file RBSystem.java.
double rb.RBSystem.get_SCM_lower_bound | ( | ) |
Definition at line 551 of file RBSystem.java.
|
package |
Definition at line 563 of file RBSystem.java.
|
package |
Definition at line 575 of file RBSystem.java.
|
protected |
Returns a float array of transformation data for each node, using the specified parameter mu.
Only to be called for models who have a parameterized geometry.
The get_local_transformation method of the AffineFunctions class is called (using the current parameter ) and the linear transform function returned.
Definition at line 852 of file RBSystem.java.
RealVector rb.RBSystem.getInitialCoefficients | ( | int | N | ) |
Returns the initial conditions solution coefficients for RB size N.
TODO: Use this method in any RB_Solve member in subclasses!
N | The RB size |
Definition at line 588 of file RBSystem.java.
int rb.RBSystem.getNBF | ( | ) |
Definition at line 605 of file RBSystem.java.
int rb.RBSystem.getNumOutputs | ( | ) |
Definition at line 612 of file RBSystem.java.
Parameters rb.RBSystem.getParams | ( | ) |
Returns the system's parameters object.
Definition at line 621 of file RBSystem.java.
int rb.RBSystem.getQa | ( | ) |
Definition at line 628 of file RBSystem.java.
int rb.RBSystem.getQf | ( | ) |
TODO: if all affine_functions implement the IAffineFunctions interface, just call the getQf method of the local instance.
Definition at line 638 of file RBSystem.java.
|
protected |
TODO: if all affine_functions implement the IAffineFunctions interface, just call the getQl method of the local instance.
output_index | The index of the output we are interested in |
Definition at line 650 of file RBSystem.java.
int rb.RBSystem.getQuL | ( | ) |
Definition at line 654 of file RBSystem.java.
SimulationResult rb.RBSystem.getSimulationResults | ( | ) |
Constructs the true solution from the most recent RB reduced solution using the full Z data and current coefficients.
Definition at line 672 of file RBSystem.java.
double rb.RBSystem.getSweepIncrement | ( | ) |
Returns the increment used during the last parameter sweep or zero if there hasn't been any.
Definition at line 746 of file RBSystem.java.
double [][] rb.RBSystem.getSweepOutputBounds | ( | ) |
Definition at line 750 of file RBSystem.java.
double [][] rb.RBSystem.getSweepOutputs | ( | ) |
Definition at line 754 of file RBSystem.java.
SimulationResult rb.RBSystem.getSweepSimResults | ( | ) |
Definition at line 758 of file RBSystem.java.
int rb.RBSystem.getTotalTimesteps | ( | ) |
int rb.RBSystem.getVisualNumTimesteps | ( | ) |
Definition at line 866 of file RBSystem.java.
|
protected |
Definition at line 895 of file RBSystem.java.
|
protected |
Definition at line 873 of file RBSystem.java.
|
protected |
Resize the vectors that store solution data and output data.
Definition at line 902 of file RBSystem.java.
void rb.RBSystem.loadOfflineData | ( | AModelManager | m | ) | throws MathReaderException, ModelManagerException, IOException |
Loads the offline data for the RBSystem.
m |
IOException |
Definition at line 915 of file RBSystem.java.
|
protected |
|
protected |
Definition at line 1172 of file RBSystem.java.
int rb.RBSystem.performSweep | ( | int | sweepIndex, |
int | N | ||
) |
Performs a parameter sweep with automatic guess of the number of parameter sweeps.
sweepIndex | |
N |
Definition at line 1340 of file RBSystem.java.
int rb.RBSystem.performSweep | ( | int | sweepIndex, |
int | N, | ||
int | numSweepPts | ||
) |
Performs a parameter sweep for the current RB system.
sweepIndex | The index of the parameter to sweep |
N | The reduced basis size for sweeping |
numSweepPts | The desired number of sweep points |
Definition at line 1357 of file RBSystem.java.
|
protected |
Perform online solve with the N RB basis functions, for the set of parameters in current_params, where 1 <= N <= RB_size.
Definition at line 1429 of file RBSystem.java.
float [] rb.RBSystem.rbappmitCustomMeshTransform | ( | double[] | mu, |
float[] | x | ||
) |
Custom mesh transformation method of old rbappmit-models.
mu | |
x |
Definition at line 1300 of file RBSystem.java.
final boolean rb.RBSystem.readConfiguration | ( | AModelManager | m | ) |
|
protected |
Definition at line 1525 of file RBSystem.java.
|
protected |
Definition at line 1541 of file RBSystem.java.
|
protected |
Specifies the residual scaling on the denominator to be used in the a posteriori error bound.
Overload in subclass in order to obtain the desired error bound.
Definition at line 1587 of file RBSystem.java.
void rb.RBSystem.set_n_basis_functions | ( | int | _N | ) |
Definition at line 1591 of file RBSystem.java.
|
protected |
Only used to set the current parameters object for an SCMSystem, as this also inherits from the RBBase class.
p |
Definition at line 1600 of file RBSystem.java.
void rb.RBSystem.setPrimarySCM | ( | RBSCMSystem | scm_system | ) |
Set the primary SCM.
Definition at line 1607 of file RBSystem.java.
double rb.RBSystem.thetaQa | ( | int | q | ) |
Evaluate theta_q_a (for the q^th bilinear form) at the current parameter.
q |
Definition at line 1681 of file RBSystem.java.
double rb.RBSystem.thetaQa | ( | int | q, |
double | t | ||
) |
double rb.RBSystem.thetaQf | ( | int | i | ) |
double rb.RBSystem.thetaQf | ( | int | i, |
double | t | ||
) |
double rb.RBSystem.thetaQl | ( | int | k, |
int | i | ||
) |
double rb.RBSystem.thetaQl | ( | int | k, |
int | i, | ||
double | t | ||
) |
Class<IAffineFunctions> rb.RBSystem.affineFunctionsClass |
The Class object for the affine functions class.
Implements the interface import rb.affinefcn.IAffineFunctions.
Definition at line 69 of file RBSystem.java.
IAffineFunctions rb.RBSystem.affineFunctionsInstance |
The member object that defines the parameter-dependent functions for the affine expansion of the left-hand, right-hand side and outputs.
We need to access this object at runtime, hence we use a ClassLoader and reflection in order to call the relevant functions.
Definition at line 75 of file RBSystem.java.
|
protected |
Definition at line 77 of file RBSystem.java.
|
protected |
Definition at line 80 of file RBSystem.java.
|
protected |
Definition at line 85 of file RBSystem.java.
|
protected |
Arrays storing the residual representor inner products to be used in computing the residuals in the Online stage.
These are resized by reading in the Offline data written out by rbOOmit.
Definition at line 91 of file RBSystem.java.
|
protected |
Definition at line 114 of file RBSystem.java.
boolean rb.RBSystem.isReal = true |
Definition at line 119 of file RBSystem.java.
RBSCMSystem rb.RBSystem.mRbScmSystem |
A reference to the SCM system.
Definition at line 124 of file RBSystem.java.
Class<?> rb.RBSystem.oldAffFcnCl |
Definition at line 139 of file RBSystem.java.
Object rb.RBSystem.oldAffFcnObj |
Definition at line 144 of file RBSystem.java.
double [][] rb.RBSystem.output_dual_norms |
This array stores the dual norms for each output.
Row n stores the Q_l dual norms for the expansion of the n^th output.
Definition at line 150 of file RBSystem.java.
|
protected |
Dense matrices for the RB computations.
Definition at line 163 of file RBSystem.java.
|
protected |
Dense vector for the RHS.
Definition at line 168 of file RBSystem.java.
double [] rb.RBSystem.RB_output_error_bounds |
The vector storing the RB error bounds in the steady-state case.
Definition at line 178 of file RBSystem.java.
double [][] rb.RBSystem.RB_output_error_bounds_all_k |
The output error bounds at all time levels.
Definition at line 183 of file RBSystem.java.
|
protected |
The vectors storing the RB output vectors.
Definition at line 187 of file RBSystem.java.
double [] rb.RBSystem.RB_outputs |
The vector storing the RB output values in the steady-state case.
Definition at line 191 of file RBSystem.java.
double [][] rb.RBSystem.RB_outputs_all_k |
The outputs at all time levels.
Definition at line 197 of file RBSystem.java.
|
protected |
The RB solution vector.
Stored as a Vector so that we can easily resize it during an RB_solve.
Definition at line 201 of file RBSystem.java.
|
protected |
Definition at line 203 of file RBSystem.java.
boolean rb.RBSystem.return_rel_error_bound |
Boolean flag to indicate whether RB_solve returns an absolute or relative error bound.
True => relative, false => absolute.
Definition at line 209 of file RBSystem.java.
|
protected |
Definition at line 220 of file RBSystem.java.
|
protected |
Definition at line 218 of file RBSystem.java.