예제 #1
0
 def __init__(self, truth_problem, **kwargs):
     # Call parent
     ReductionMethod.__init__(self, os.path.join(
         "test_eim_approximation_14_tempdir", expression_type, basis_generation, "mock_problem"))
     # Minimal subset of a DifferentialProblemReductionMethod
     self.truth_problem = truth_problem
     self.reduced_problem = None
예제 #2
0
 def __init__(self, truth_problem, **kwargs):
     # Call parent
     ReductionMethod.__init__(self, os.path.join("test_eim_approximation_15_tempdir", expression_type, basis_generation, "mock_problem"))
     # Minimal subset of a DifferentialProblemReductionMethod
     self.truth_problem = truth_problem
     self.reduced_problem = None
     # I/O
     self.folder["basis"] = os.path.join(self.truth_problem.folder_prefix, "basis")
     # Gram Schmidt
     self.GS = GramSchmidt(self.truth_problem.inner_product)
    def __init__(self, SCM_approximation, folder_prefix):
        # Call the parent initialization
        ReductionMethod.__init__(self, folder_prefix)

        # $$ OFFLINE DATA STRUCTURES $$ #
        # High fidelity problem
        self.SCM_approximation = SCM_approximation
        # I/O
        self.folder["post_processing"] = os.path.join(self.folder_prefix,
                                                      "post_processing")
        self.greedy_selected_parameters = SCM_approximation.greedy_selected_parameters
        self.greedy_error_estimators = GreedyErrorEstimatorsList()
예제 #4
0
 def __init__(self, SCM_approximation, folder_prefix):
     # Call the parent initialization
     ReductionMethod.__init__(self, folder_prefix)
     
     # $$ OFFLINE DATA STRUCTURES $$ #
     # High fidelity problem
     self.SCM_approximation = SCM_approximation
     # I/O
     self.folder["post_processing"] = os.path.join(self.folder_prefix, "post_processing")
     self.greedy_selected_parameters = SCM_approximation.greedy_selected_parameters
     self.greedy_error_estimators = GreedyErrorEstimatorsList()
     
     # Get data that were temporarily store in the SCM_approximation
     self.bounding_box_minimum_eigensolver_parameters = self.SCM_approximation._input_storage_for_SCM_reduction["bounding_box_minimum_eigensolver_parameters"]
     self.bounding_box_maximum_eigensolver_parameters = self.SCM_approximation._input_storage_for_SCM_reduction["bounding_box_maximum_eigensolver_parameters"]
     del self.SCM_approximation._input_storage_for_SCM_reduction
예제 #5
0
 def __init__(self, EIM_approximation):
     # Call the parent initialization
     ReductionMethod.__init__(self, EIM_approximation.folder_prefix)
     
     # $$ OFFLINE DATA STRUCTURES $$ #
     # High fidelity problem
     self.EIM_approximation = EIM_approximation
     # Declare a new container to store the snapshots
     self.snapshots_container = self.EIM_approximation.parametrized_expression.create_snapshots_container()
     self._training_set_parameters_to_snapshots_container_index = dict()
     # I/O
     self.folder["snapshots"] = os.path.join(self.folder_prefix, "snapshots")
     self.folder["post_processing"] = os.path.join(self.folder_prefix, "post_processing")
     self.greedy_selected_parameters = GreedySelectedParametersList()
     self.greedy_errors = GreedyErrorEstimatorsList()
     #
     # By default set a tolerance slightly larger than zero, in order to
     # stop greedy iterations in trivial cases by default
     self.tol = 1e-15