Mordicus.Modules.Safran.BasicAlgorithms.LPEQP module

Mordicus.Modules.Safran.BasicAlgorithms.LPEQP.CallOptimizer(c, A_ub, b_ub, method, options)[source]

Exemple of scipy optimizer wrapper (here linprog)

Parameters
  • c (1-D array) – The coefficients of the linear objective function to be minimized.

  • A_ub (2-D array) – The inequality constraint matrix. Each row of A_ub specifies the coefficients of a linear inequality constraint on x.

  • b_ub (1-D array) – The inequality constraint vector. Each element represents an upper bound on the corresponding value of A_ub @ x.

  • method (str, optional) – The algorithm used to solve the standard form problem.

  • options (dict, optional) – A dictionary of solver options.

Returns

res – see the class scipy.optimize.OptimizeResult

Return type

OptimizeResult

Mordicus.Modules.Safran.BasicAlgorithms.LPEQP.LPEQP(integrationWeights, integrands, integrals, normIntegrals, tolerance)[source]

Linear Programming Empirical Quadrature Procedure [1].

Parameters
  • integrationWeights (np.ndarray) – of size (numberOfIntegrationPoints,), dtype = float. Weights of the truth quadrature

  • integrands (np.ndarray) – of size (numberOfIntegrands,numberOfIntegrationPoints), dtype = float. Functions we look to integrated accurately with fewer integration points. Usually, the integrands are already reduced, and numberOfIntegrands is the product of the number of reduced integrand modes and the number of modes of the ReducedOrderBasis

  • integrals (np.ndarray) – of size (numberOfIntegrands,), dtype = float. High-fidelity integral computed using the truth integration scheme

  • normIntegrals (float) – np.linalg.norm(integrals), already computed in mordicus use

  • tolerance (float) – upper bound for the accuracy of the reduced integration scheme on the provided integrands

Returns

  • np.ndarray of size (numberOfReducedIntegrationPoints,), dtype = int – indices of the kepts integration points (reducedIntegrationPoints)

  • np.ndarray of size (numberOfReducedIntegrationPoints,), dtype = float – weights associated to the kepts integration points (reducedIntegrationWeights)

References

[1] M. Yano and A. T. Patera. An LP empirical quadrature procedure for reduced basis treatment of parametrized nonlinear PDEs, 2017. URL: https://www.researchgate.net/publication/323633428_An_LP_empirical _quadrature_procedure_for_reduced_basis_treatment_of_parametrized_nonli near_PDEs.