rom.ecm.empirical_cubature_method
Purpose: Automates the selection of a minimal, optimally weighted subset of integration points (or mesh elements) for constructing hyper-reduced order models. By replacing full-domain integration with a compact cubature rule composed of only the most informative points, ECM makes large-scale nonlinear model reduction both computationally tractable and memory-efficient. pmc.ncbi.nlm.nih
Summary: Provides the EmpiricalCubatureMethod class, which solves an optimization problem to identify the smallest possible set of elements and their associated positive weights such that the reduced integration accurately reproduces the snapshot data within a prescribed tolerance. The class follows a structured three-step workflow—SetUp → Initialize → Run (or Calculate)—and supports optional L2 weighting, constrained weight sums, and warm-starting from an initial candidate set for greater flexibility in practice. pmc.ncbi.nlm.nih
Classes
| Name | Description |
|---|---|
| EmpiricalCubatureMethod | Selects a minimal set of integration points and positive weights for hyper-reduced order modeling. |
EmpiricalCubatureMethod
rom.ecm.empirical_cubature_method.EmpiricalCubatureMethod(
ECM_tolerance=0,
Filter_tolerance=0,
Plotting=False,
MaximumNumberUnsuccesfulIterations=100,
)Summary: Identifies a small, optimal subset of mesh elements (or quadrature points) together with their associated positive weights, enabling accurate and efficient hyper-reduced order model (HROM) construction. Rather than evaluating the full mesh during online ROM queries, the HROM evaluates only the ECM-selected points—achieving dramatic reductions in assembly cost while maintaining approximation accuracy controlled by ECM_tolerance. onlinelibrary.wiley
The standard usage pattern is sequential: call SetUp to configure the problem, Initialize to prepare internal data structures, then Run (or Calculate) to execute the selection algorithm and obtain the output indices and weights.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| ECM_tolerance | float | Convergence tolerance controlling how closely the reduced cubature rule must approximate the full integration; smaller values enforce higher accuracy at the cost of selecting more points. | 0 |
| Filter_tolerance | float | Threshold for filtering out negligible contributions during the selection process. | 0 |
| Plotting | bool | If True, enables diagnostic plotting during the selection algorithm for visualization and debugging. |
False |
| MaximumNumberUnsuccesfulIterations | int | Maximum number of consecutive unsuccessful iterations before the selection algorithm terminates early. | 100 |
Key Attributes Set After Run
| Name | Type | Description |
|---|---|---|
| z | ndarray of int | Indices of the selected (important) elements or quadrature points in the reduced cubature rule. |
| w | ndarray of float | Positive weights associated with each selected point, defining the reduced integration rule. |
Reference
Hernández, J.A. et al., 2023. Local-ECM: An empirical cubature hyper-reduction method adapted to local reduced order models. arXiv preprint arXiv:2310.15769.
Methods
| Name | Description |
|---|---|
| SetUp | Configure the element selection problem using snapshot data and assembly options. |
| Initialize | Prepare internal data structures before running the selection algorithm. |
| Run | Execute the core ECM selection loop to identify optimal elements and weights. |
| Calculate | Compute the final selected element indices and positive weights after Initialize. |
SetUp
rom.ecm.empirical_cubature_method.EmpiricalCubatureMethod.SetUp(
G,
Weights,
constrain_sum_of_weights=False,
InitialCandidatesSet=None,
use_L2_weighting=False,
)Summary: Configures the ECM element selection problem by specifying the snapshot or basis data to be approximated, the element-level integration weights, and optional settings that control the selection behavior. This must be called before Initialize or Run. The matrix G typically contains projected residual snapshots or a reduced basis whose column space defines the space over which the cubature rule must be accurate.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| G | ndarray | Snapshot data matrix or projected residual basis to approximate; each column typically represents one snapshot or basis vector evaluated over the full integration domain. | required |
| Weights | ndarray | Integration weights associated with each element or quadrature point in the full-order mesh; used for weighted norm computations during selection. | required |
| constrain_sum_of_weights | bool | If True, enforces that the sum of the selected ECM weights equals the sum of the original full-domain weights, preserving integral consistency. |
False |
| InitialCandidatesSet | array_like of int or None | Optional initial set of element indices from which the selection algorithm begins; useful for warm-starting or restricting the candidate pool. | None |
| use_L2_weighting | bool | If True, applies L2-norm weighting during the selection process, which can improve robustness for problems with non-uniform solution energy distributions. |
False |
Initialize
rom.ecm.empirical_cubature_method.EmpiricalCubatureMethod.Initialize()Summary: Prepares the internal data structures, index sets, and intermediate variables required by the ECM selection algorithm. Must be called after SetUp and before invoking Calculate or Run. This step ensures all problem dimensions and internal state are correctly initialized prior to the iterative selection procedure.
Run
rom.ecm.empirical_cubature_method.EmpiricalCubatureMethod.Run()Summary: Executes the complete ECM selection loop, combining Initialize and Calculate into a single top-level call. Iteratively identifies which elements or quadrature points to include and computes their associated positive weights. Upon completion, the results are stored as:
self.z: Indices of selected (important) elements or quadrature points.self.w: Positive weights for each selected point forming the reduced cubature rule.
This is the primary entry point for producing the hyperreduction point set and weights in a standard ECM workflow.
Calculate
rom.ecm.empirical_cubature_method.EmpiricalCubatureMethod.Calculate()Summary: Performs the core computational step of the ECM algorithm after Initialize has been called. Identifies the final subset of elements and computes their positive weights such that the reduced cubature rule approximates the full integration to within the specified ECM_tolerance. Use this method when you need direct control over the initialization and calculation phases separately, rather than through the combined Run entry point.
Notes
The recommended workflow for a standard ECM setup is:
ecm = EmpiricalCubatureMethod(ECM_tolerance=1e-3)
ecm.SetUp(G, Weights)
ecm.Run()
# Access results
selected_indices = ecm.z
selected_weights = ecm.wFor finer control over the initialization and computation phases, Initialize followed by Calculate can be used in place of Run.