This folder contains the Python scripts required to reproduce the examples from this paper.
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)
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)
This example was launched using an in-house Matlab code which we do not provide here.
An observation that we highlight in our paper is the limit case (having as many bases as snapshots) following the trajectory shown next
Here is the evolution of the weights mentioned.
The comparison of the clustering techniques shown in our paper is also included in this repository by launching the clustering_comparison.py script.
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},
}