genericROM.OperatorCompressors.ReducedQuadratureProcedure module

ComputeReducedIntegrationScheme(integrationWeights, integrands, tolerance, imposedIndices=None, reducedIntegrationPointsInitSet=None, initByLPEQP=False, nRandom=1)[source]

Computes the reduced integration scheme used in OperatorCompression stages

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

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

  • imposedIndices (np.ndarray of size (numberOfImposedIndices,), dtype = int,) – optional Indicies required to be selected in the reduced integration scheme

  • reducedIntegrationPointsInitSet (np.ndarray) – of size (numberOfInitReducedIntegratonPoints,), dtype = int, optional Initial guess for the indices of the reducedIntegrationScheme.

  • initByLPEQP (bool, optional) – Runs a preliminary LPEQP stage if True

  • nRandom (bool, optional) – number of random points added at each iteration

Returns:

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

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

PrintReducedSchemeStatistics(s, x, integrands, integrals, normIntegrals)[source]

Prints statitics on the computation of the reduced integration scheme

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

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

  • integrals (np.ndarray) – of size (numberOfIntegrands,), dtype = float. integration of the integrands used the exact quadrature scheme

  • normIntegrals (float) – Euclidean norm of integrals (already available at this points)