Skip to content

Rbravo555/localECM

Repository files navigation

Alt Text

Contents

This folder contains the Python scripts required to reproduce the examples from this paper.

Example 1

Polynomial approximation (section 4.1)

Alt Text To reproduce this example,use the Example.py with the following parameters:

if __name__ == '__main__':

    number_of_functions = 6
    number_of_candidate_Gauss_points = 20

    function_to_use = 1 # 1 or 2
    constrain_sum_of_weights = False #this avoids the trivial solution
    use_L2_weighting = True # True  # if True: d = G@\sqrt{W}; elif False: d = G@W

    run_example(number_of_functions, number_of_candidate_Gauss_points, function_to_use, constrain_sum_of_weights, use_L2_weighting)

Example 2

Set of polynomial functions plus constant function (section 4.2)

Alt Text

To reproduce this example,use the Example.py with the following parameters:

if __name__ == '__main__':

    number_of_functions = 20
    number_of_candidate_Gauss_points = 50

    function_to_use = 2 # 1 or 2
    constrain_sum_of_weights = False #this avoids the trivial solution
    use_L2_weighting = True # True  # if True: d = G@\sqrt{W}; elif False: d = G@W

    run_example(number_of_functions, number_of_candidate_Gauss_points, function_to_use, constrain_sum_of_weights, use_L2_weighting)

Example 3

Finite Elements Example (section 4.3)

This example was launched using an in-house Matlab code which we do not provide here.

Alt Text

An observation that we highlight in our paper is the limit case (having as many bases as snapshots) following the trajectory shown next

Alt Text

Here is the evolution of the weights mentioned.

Body-fitted 100 Re cylinder velocity field [m/s].

Clustering comparison

The comparison of the clustering techniques shown in our paper is also included in this repository by launching the clustering_comparison.py script. Alt Text

Citation

If this repo has been useful for you, please consider citing us as

@misc{bravo2024subspaceadaptiveweightscubaturemethod,
      title={A subspace-adaptive weights cubature method with application to the local hyperreduction of parameterized finite element models},
      author={J. R. Bravo and J. A. Hernández and S. Ares de Parga and R. Rossi},
      year={2024},
      eprint={2310.15769},
      archivePrefix={arXiv},
      primaryClass={math-ph},
      url={https://arxiv.org/abs/2310.15769},
}

About

Local Empirical Cubature Method

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages