JaRMoS  1.1
Java Reduced Model Simulations
 All Classes Namespaces Files Functions Variables Enumerator Groups Pages
rb.TransientRBSystem Class Reference

This class provides the Online reduced basis functionality for linear parabolic problems. More...

Inheritance diagram for rb.TransientRBSystem:
rb.RBSystem jarmos.ModelBase rb.QNTransientRBSystem

Public Member Functions

void apply_temporal_filter ()
 Apply the temporal filter to the outputs. More...
 
double getdt ()
 Gets dt, the time-step size. More...
 
double getEulerTheta ()
 Get/set euler_theta, parameter that determines the temporal discretization. More...
 
SimulationResult getSimulationResults ()
 Returns the animated results of the transient RB system. More...
 
int getQm ()
 
int getTotalTimesteps ()
 Get K, the total number of time-steps. More...
 
int getVisualNumTimesteps ()
 
void loadOfflineData_rbappmit (AModelManager m) throws IOException
 Override read_offline_data_from_files in order to read in the mass matrix and initial condition data as well. More...
 
void loadOfflineDataJRB (AModelManager m) throws IOException
 Override read_offline_data_from_files in order to read in the mass matrix and initial condition data as well. More...
 
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 setTimeStep (int k_in)
 
double thetaQm (int i)
 Evaluate theta_q_m (for the q^th mass matrix term) at the current parameter. More...
 
double thetaQm (int i, double t)
 Evaluate theta_q_m (for the q^th mass matrix term) at the current parameter. More...
 
- Public Member Functions inherited from rb.RBSystem
 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

int fTotalTimesteps
 Total number of time-steps. More...
 
int n_plotting_steps
 The number of time steps we actually plot in the output plotter. More...
 
- Public Attributes inherited from rb.RBSystem
Class< IAffineFunctionsaffineFunctionsClass
 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

void cache_online_residual_terms (int N)
 Helper function that caches the time-independent residual quantities. 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 conv_weight (double x)
 
void initialize_data_vectors ()
 Resize the output vectors according to n_outputs. 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...
 
double residual_scaling_numer (double alpha_LB)
 Specifies the residual scaling on the numerator to be used in the a posteriori error bound. More...
 
double uncached_compute_residual_dual_norm (int N)
 Set the secondary SCM system. More...
 
- Protected Member Functions inherited from rb.RBSystem
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[] error_bound_all_k
 The error bound for the field variable at each time level. More...
 
RealVector old_RB_solution
 RBSystem has a member RB_solution, we also need old_RB_solution here. More...
 
RealMatrix RB_L2_matrix
 A secondary SCM object since we might need a lower bound for the mass matrix and the stiffness matrix. More...
 
RealMatrix[] RB_M_q_matrix
 Dense matrices for the RB computations. More...
 
int timestep
 The current time-level, 0 <= _k <= _K. More...
 
RealVector[] timestepRBSolutions
 The solution coefficients at each time level from the most recent RB_solve. More...
 
- Protected Attributes inherited from rb.RBSystem
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< MeshTransformtransforms
 
- 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...
 

Additional Inherited Members

- Package Functions inherited from rb.RBSystem
double get_SCM_upper_bound ()
 
double get_soln_coeff (int i)
 

Detailed Description

This class provides the Online reduced basis functionality for linear parabolic problems.

This class has been taken from the original rbAppMIT package and modified to fit into the current JaRMoS framework.

Author
Daniel Wirtz
Date
Aug 26, 2011

Definition at line 32 of file TransientRBSystem.java.

Member Function Documentation

void rb.TransientRBSystem.apply_temporal_filter ( )

Apply the temporal filter to the outputs.

Definition at line 125 of file TransientRBSystem.java.

void rb.TransientRBSystem.cache_online_residual_terms ( int  N)
protected

Helper function that caches the time-independent residual quantities.

Definition at line 165 of file TransientRBSystem.java.

double rb.TransientRBSystem.compute_residual_dual_norm ( int  N)
protected

Compute the dual norm of the residual for the solution saved in RB_solution_vector.

This assumes that the time-independent quantities were cached in RB_solve.

TODO: fit to time-dependent residual norms for error estimation!

Definition at line 282 of file TransientRBSystem.java.

double rb.TransientRBSystem.conv_weight ( double  x)
protected

Definition at line 319 of file TransientRBSystem.java.

double rb.TransientRBSystem.getdt ( )

Gets dt, the time-step size.

Definition at line 330 of file TransientRBSystem.java.

double rb.TransientRBSystem.getEulerTheta ( )

Get/set euler_theta, parameter that determines the temporal discretization.

euler_theta = 0 —> Forward Euler euler_theta = 0.5 —> Crank-Nicolson euler_theta = 1 —> Backward Euler

Definition at line 338 of file TransientRBSystem.java.

int rb.TransientRBSystem.getQm ( )
Returns
Q_m, the number of terms in the affine expansion of the mass matrix

Definition at line 405 of file TransientRBSystem.java.

SimulationResult rb.TransientRBSystem.getSimulationResults ( )

Returns the animated results of the transient RB system.

So far the solution float[][] truth_sol was again sorted/processed in RBVisualization.onCreate; as for transient systems there are no models with transient displacements yet, the returned SolutionFields are simply real values for different simulation fields.

See Also
rb.RBSystem::getSimulationResults()

Definition at line 352 of file TransientRBSystem.java.

int rb.TransientRBSystem.getTotalTimesteps ( )

Get K, the total number of time-steps.

Definition at line 412 of file TransientRBSystem.java.

int rb.TransientRBSystem.getVisualNumTimesteps ( )

Definition at line 416 of file TransientRBSystem.java.

void rb.TransientRBSystem.initialize_data_vectors ( )
protected

Resize the output vectors according to n_outputs.

Definition at line 429 of file TransientRBSystem.java.

void rb.TransientRBSystem.loadOfflineData_rbappmit ( AModelManager  m) throws IOException

Override read_offline_data_from_files in order to read in the mass matrix and initial condition data as well.

Definition at line 446 of file TransientRBSystem.java.

void rb.TransientRBSystem.loadOfflineDataJRB ( AModelManager  m) throws IOException

Override read_offline_data_from_files in order to read in the mass matrix and initial condition data as well.

Definition at line 604 of file TransientRBSystem.java.

double rb.TransientRBSystem.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.

Definition at line 675 of file TransientRBSystem.java.

void rb.TransientRBSystem.readConfigurationJRB ( AModelManager  m)
protected

Definition at line 884 of file TransientRBSystem.java.

void rb.TransientRBSystem.readConfigurationRBAppMIT ( GetPot  infile)
protected
double rb.TransientRBSystem.residual_scaling_denom ( double  alpha_LB)
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 935 of file TransientRBSystem.java.

double rb.TransientRBSystem.residual_scaling_numer ( double  alpha_LB)
protected

Specifies the residual scaling on the numerator to be used in the a posteriori error bound.

Overload in subclass in order to obtain the desired error bound.

Definition at line 943 of file TransientRBSystem.java.

void rb.TransientRBSystem.setTimeStep ( int  k_in)

Definition at line 949 of file TransientRBSystem.java.

double rb.TransientRBSystem.thetaQm ( int  i)

Evaluate theta_q_m (for the q^th mass matrix term) at the current parameter.

Parameters
i
Returns

Definition at line 959 of file TransientRBSystem.java.

double rb.TransientRBSystem.thetaQm ( int  i,
double  t 
)

Evaluate theta_q_m (for the q^th mass matrix term) at the current parameter.

Parameters
i
t
Returns

Definition at line 982 of file TransientRBSystem.java.

double rb.TransientRBSystem.uncached_compute_residual_dual_norm ( int  N)
protected

Set the secondary SCM system.

Compute the dual norm of the residual for the solution saved in RB_solution_vector. This does not assume cached data hence works for parameters that change as a function of time.

Definition at line 997 of file TransientRBSystem.java.

Member Data Documentation

double [] rb.TransientRBSystem.error_bound_all_k
protected

The error bound for the field variable at each time level.

Definition at line 60 of file TransientRBSystem.java.

int rb.TransientRBSystem.fTotalTimesteps

Total number of time-steps.

Definition at line 83 of file TransientRBSystem.java.

int rb.TransientRBSystem.n_plotting_steps

The number of time steps we actually plot in the output plotter.

This is sometimes less than K so that we don't plot the effect of the filter near the final time.

Definition at line 91 of file TransientRBSystem.java.

RealVector rb.TransientRBSystem.old_RB_solution
protected

RBSystem has a member RB_solution, we also need old_RB_solution here.

Definition at line 96 of file TransientRBSystem.java.

RealMatrix rb.TransientRBSystem.RB_L2_matrix
protected

A secondary SCM object since we might need a lower bound for the mass matrix and the stiffness matrix.

Dense RB mass matrix.

Definition at line 108 of file TransientRBSystem.java.

RealMatrix [] rb.TransientRBSystem.RB_M_q_matrix
protected

Dense matrices for the RB computations.

Definition at line 112 of file TransientRBSystem.java.

int rb.TransientRBSystem.timestep
protected

The current time-level, 0 <= _k <= _K.

Definition at line 116 of file TransientRBSystem.java.

RealVector [] rb.TransientRBSystem.timestepRBSolutions
protected

The solution coefficients at each time level from the most recent RB_solve.

Definition at line 120 of file TransientRBSystem.java.


The documentation for this class was generated from the following file: