From 4f1fa8cd022ecea8d5bb622b9ec3f6ce2889967d Mon Sep 17 00:00:00 2001 From: carlodev Date: Wed, 26 Feb 2025 09:59:17 +0100 Subject: [PATCH 01/42] update paper --- paper/paper.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 74237870..17242899 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -93,16 +93,16 @@ In this section is possible to appreciate the weak and strong scalability of the For parallelization is used `MPI`, and to solve the sparse and distribute numerical systems we use `PETSc` -### Strong Parallelization +### Strong Scalability Strong scalability evaluates how efficiently a parallel code reduces execution time when the problem size remains fixed, but the number of processing units increases. There is a total of `400` elements on each side, leading to `160K` elements and `1.92M` dofs in total. -![MPI-strong](images/STRONG_TGV.png){ width=50% } +![Strong Scalability](images/STRONG_TGV.png){ width=50% } -### Weak Parallelization +### Weak Scalability Weak scalability measures how well a parallel code maintains performance when the problem size is kept constant per processor, and the number of processors increases. On each processor there are `50x50` elements, the number of dofs is kept constant at `30K dfos/procs`. -![MPI-weak](images/WEAK_TGV.png){ width=50% } +![Weak Scalability](images/WEAK_TGV.png){ width=50% } # Acknowledgements From 63cf0908ee3c0c8090632d637fe46537b1228848 Mon Sep 17 00:00:00 2001 From: carlodev Date: Mon, 28 Apr 2025 09:25:44 +0200 Subject: [PATCH 02/42] typos and language error fix --- paper/paper.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 17242899..b789dec7 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -21,16 +21,16 @@ bibliography: paper.bib --- # Summary -Large-Eddy Simulation (LES) is a family of mathematical techniques that perform high-fidelity simulations in Computational Fluid Dynamics (CFD). They can simulate turbulent flows by numerically solving the Navier-Stokes equations. Using filtering operation, LES focuses on the larger length scale, while the effects of small scales (subgrid scales) are modeled. The Variational MultiScale (VMS) and Streamline-Upwind/Petrov-Galerkin (SUPG) methods belong to the family of stabilized methods. The mathematical problem is solved using the Finite Element Method (FEM) framework. They allow to simulate complex flows. The package has been developed with the primary aim of studying the Laminar Separation Bubble (LSB) at low-Reynolds regime on the suction side of the airfoils. +Large-Eddy Simulation (LES) is a family of mathematical techniques that perform high-fidelity simulations in Computational Fluid Dynamics (CFD). They can simulate turbulent flows by numerically solving the Navier-Stokes equations. Using a filtering operation, LES focuses on the larger length scale, while the effects of small scales (subgrid scales) are modeled. The Variational MultiScale (VMS) and Streamline-Upwind/Petrov-Galerkin (SUPG) methods belong to the family of stabilized methods. The mathematical problem is solved using the Finite Element Method (FEM) framework. They allow the simulation of complex flows. The package has been developed with the primary aim of studying the Laminar Separation Bubble (LSB) at low-Reynolds regime on the suction side of the airfoils. `SegregatedVMSSolver.jl` is designed to be user-friendly for both novice and advanced users. Novice users can run simulations with minimal input, while advanced users have the flexibility to customize parameters for detailed control. This dual approach ensures that the package is accessible and versatile. -However, for more advanced users who may desire greater control over the simulation process, it is possible to provide custom options for customizing almost all aspects of the method: solver, model, exports and HPC options. Balancing between simplicity for novice users and flexibility for advanced users, the package ensures usability without compromising on the depth and sophistication of the simulation capabilities. This approach makes the package versatile and adaptable to a wide range of users, from researchers seeking quick insights to seasoned practitioners, using HPC, aiming for comprehensive analysis in fluid dynamics applications. +However, for more advanced users who may desire greater control over the simulation process, it is possible to provide custom options for customizing almost all aspects of the method: solver, model, exports and HPC options. Balancing simplicity for novice users and flexibility for advanced users, the package ensures usability without compromising on the depth and sophistication of the simulation capabilities. This approach makes the package versatile and adaptable to a wide range of users, from researchers seeking quick insights to seasoned practitioners, using HPC, aiming for comprehensive analysis in fluid dynamics applications. # Statement of need -`SegregatedVMSSolver.jl` is a comprehensive Julia package designed for conducting high-fidelity simulations of complex flow phenomena within the incompressible regime, leveraging VMS and SUPG method. VMS has been originally introduced in [@Hughes:2000]. The linearization adopted has been proposed in the SUPG method in [@Banyai:2016]. -The package relies on `Gridap.jl`[@Verdugo:2022],[@Badia:2020] package to implement the mathematical model of FEM. Complementing this core functionality, `GridapDistributed.jl`[@BadiaD:2022] and [`PartitionedArrays.jl`](https://github.com/fverdugo/PartitionedArrays.jl) allow to use multi-core CPU desktop computers to HPC clusters. The [`GridapPETSc.jl`](https://github.com/gridap/GridapPETSc.jl) package is used to solve the final linear system. +`SegregatedVMSSolver.jl` is a comprehensive Julia package designed for conducting high-fidelity simulations of complex flow phenomena within the incompressible regime, leveraging the VMS and SUPG method. VMS has been originally introduced in [@Hughes:2000]. The linearization adopted has been proposed in the SUPG method in [@Banyai:2016]. +The package relies on `Gridap.jl`[@Verdugo:2022],[@Badia:2020] package to implement the mathematical model of FEM. Complementing this core functionality, `GridapDistributed.jl`[@BadiaD:2022] and [`PartitionedArrays.jl`](https://github.com/fverdugo/PartitionedArrays.jl) allow the use of multi-core CPUs desktop computers to HPC clusters. The [`GridapPETSc.jl`](https://github.com/gridap/GridapPETSc.jl) package is used to solve the final linear system. It solves a Linearized and Segregated version of VMS (LS-VMS) and SUPG. It is based on an iterative predictor-corrector scheme and it avoids the resolution of a non-linear problem. It uses the $\theta$ method to solve the time-marching problem. This package focuses on solving fluid dynamics problems, with a particular emphasis on the study of 2D and 3D airfoil aerodynamics at low Reynolds numbers (tested up to 500,000). The primary objective is to provide researchers and engineers with a versatile tool for analyzing aerodynamic features in this regime. @@ -40,19 +40,19 @@ A suite of benchmark cases is implemented to ensure reliability and applicabilit - **Vortex shedding over a cylinder**: Available in both 2D and 3D. - **Airfoil aerodynamics**: Extensive support for both 2D and 3D simulations. -It has also suite of tools for post-processing the results like performing time and spanwise averaging. It is possible to control the simulation in real-time, enabling/disabling the creation of output files at each time-step. The user can load own airfoil meshes also using the package [`AirfoilGmsh.jl`](https://github.com/carlodev/AirfoilGmsh.jl). Additionally, the package provides tools for initializing boundary layers in 2D simulations, enhancing its versatility and utility for researchers and practitioners in the field of fluid dynamics. +It also has a suite of tools for post-processing the results like performing time and spanwise averaging. It is possible to control the simulation in real-time, enabling/disabling the creation of output files at each time-step. The user can load their own airfoil meshes also using the package [`AirfoilGmsh.jl`](https://github.com/carlodev/AirfoilGmsh.jl). Additionally, the package provides tools for initializing boundary layers in 2D simulations, enhancing its versatility and utility for researchers and practitioners in the field of fluid dynamics. The field of fluid dynamics in Julia has seen significant growth, with several software packages emerging to address various computational challenges. This reflects the growing interest and engagement of the Julia community in this domain. A comprehensive list of packages can be found on [Julia Packages - Fluid Dynamics](https://juliapackages.com/c/fluid-dynamics). Among the most notable and well documented are: - **[Trixi.jl](https://github.com/trixi-framework/Trixi.jl)**: A framework for numerical simulation of hyperbolic PDEs, particularly suited for high-order methods and adaptive mesh refinement. -- **[WaterLily.jl](https://github.com/WaterLily-jl/WaterLily.jl/tree/master)**: A CPU/GPU finite-volume method that uses an immersed-boundary method +- **[WaterLily.jl](https://github.com/WaterLily-jl/WaterLily.jl/tree/master)**: A CPU/GPU finite-volume solver that uses an immersed-boundary method - **[Oceananigans.jl](https://github.com/CliMA/Oceananigans.jl)**: A GPU-accelerated model for simulating incompressible fluid dynamics, widely used in geophysical and oceanographic studies. While these packages vary in scope and functionality, they collectively highlight the flexibility and performance benefits of Julia in computational fluid dynamics. However, the ecosystem is still maturing compared to more established environments like Python or MATLAB. This paper contributes to this evolving field by introducing a new package tailored for Large Eddy Simulations. # Package Features -- Support 2-dimensional and 3-dimensional geometries +- It supports 2-dimensional and 3-dimensional geometries - It solved a time-dependent problem - It can run in parallel using MPI - Velocity ramping @@ -84,14 +84,14 @@ The flow is initialized in a cubic domain with periodic boundary conditions impo ## Parallelization -In this section is possible to appreciate the weak and strong scalability of the implementation of the code. The benchmark case is the 2D taylor Green, the time reported here are intended for each time-step. The order of the elements for this simulation is always 2, and the CFL constant at 0.32 +In this section is possible to appreciate the weak and strong scalability of the implementation of the code. The benchmark case is the 2D Taylor-Green, the time reported here is intended for each time-step. The order of the elements for this simulation is always 2, and the CFL constant at 0.32 | | Preconditioner | Linear Solver | |-----------|------------------|-----------------| | Velocity | `gamg` | `gmres` | | Pressure | `gamg` | `cg` | -For parallelization is used `MPI`, and to solve the sparse and distribute numerical systems we use `PETSc` +`MPI` is used for parallelization, and to solve the sparse and distribute numerical systems we use `PETSc`. ### Strong Scalability Strong scalability evaluates how efficiently a parallel code reduces execution time when the problem size remains fixed, but the number of processing units increases. There is a total of `400` elements on each side, leading to `160K` elements and `1.92M` dofs in total. @@ -100,12 +100,12 @@ Strong scalability evaluates how efficiently a parallel code reduces execution t ### Weak Scalability -Weak scalability measures how well a parallel code maintains performance when the problem size is kept constant per processor, and the number of processors increases. On each processor there are `50x50` elements, the number of dofs is kept constant at `30K dfos/procs`. +Weak scalability measures how well a parallel code maintains performance when the problem size is kept constant per processor, and the number of processors increases. On each processor there are `50x50` elements, the number of dofs is kept constant at `30K dofs/procs`. ![Weak Scalability](images/WEAK_TGV.png){ width=50% } # Acknowledgements -The authors would like to acknowledge the Royal Higher Institute for Defense for funding this research through the project MSP21/02 Numerical and Experimental Low Speed High Altitude Wing (NELSHAW). Many thanks professor Bart Janssens for his invaluable support, patience and feedback. +The authors would like to acknowledge the Royal Higher Institute for Defense for funding this research through the project MSP21/02 Numerical and Experimental Low Speed High Altitude Wing (NELSHAW). Many thanks professor to Bart Janssens for his invaluable support, patience and feedback. # References From 7d77cf8f709a336ce19fc4b8a55469eff8beb53b Mon Sep 17 00:00:00 2001 From: carlodev Date: Mon, 5 May 2025 09:29:21 +0200 Subject: [PATCH 03/42] joss paper accepted --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 7967c0e3..51586bc6 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SegregatedVMSSolver" uuid = "90220dfc-fac3-4908-b895-51c1a1f4cb85" authors = ["Carlo Brunelli"] -version = "3.0.0" +version = "3.0.1" [deps] CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" From 19140f0f08b8ee9933d63faa52171948064b2c24 Mon Sep 17 00:00:00 2001 From: carlodev Date: Mon, 19 May 2025 10:11:35 +0200 Subject: [PATCH 04/42] Fix LaTeX math expression for JATS compatibility (replace \dfrac with \frac) --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index b789dec7..859b1abf 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -65,7 +65,7 @@ While these packages vary in scope and functionality, they collectively highligh # Results ## Taylor Green 2D -2D Taylor-Green vortex case is used as benchmark case to assess the error analysis of the code. The domain is a square of size: [-0.5,0.5]x[-0.5,0.5], at Reynolds number 1600. The CFL is constant for each simulation, CFL=0.32. The time-step is computed as $dt = \dfrac{CFL}{ order \cdot N}$. +2D Taylor-Green vortex case is used as benchmark case to assess the error analysis of the code. The domain is a square of size: [-0.5,0.5]x[-0.5,0.5], at Reynolds number 1600. The CFL is constant for each simulation, CFL=0.32. The time-step is computed as $dt = \frac{CFL}{ order \cdot N}$. ![TGV2D-verr](images/verr.png){ width=50% } ![TGV2D-perr](images/perr.png){ width=50% } From a5f04b4fec14bbed98d06e353152d57c8c50258a Mon Sep 17 00:00:00 2001 From: Kyle Niemeyer Date: Fri, 23 May 2025 09:50:43 -0400 Subject: [PATCH 05/42] Updates JOSS paper --- paper/paper.md | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 859b1abf..4449fac8 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -29,12 +29,13 @@ However, for more advanced users who may desire greater control over the simulat # Statement of need -`SegregatedVMSSolver.jl` is a comprehensive Julia package designed for conducting high-fidelity simulations of complex flow phenomena within the incompressible regime, leveraging the VMS and SUPG method. VMS has been originally introduced in [@Hughes:2000]. The linearization adopted has been proposed in the SUPG method in [@Banyai:2016]. -The package relies on `Gridap.jl`[@Verdugo:2022],[@Badia:2020] package to implement the mathematical model of FEM. Complementing this core functionality, `GridapDistributed.jl`[@BadiaD:2022] and [`PartitionedArrays.jl`](https://github.com/fverdugo/PartitionedArrays.jl) allow the use of multi-core CPUs desktop computers to HPC clusters. The [`GridapPETSc.jl`](https://github.com/gridap/GridapPETSc.jl) package is used to solve the final linear system. +`SegregatedVMSSolver.jl` is a comprehensive Julia package designed for conducting high-fidelity simulations of complex flow phenomena within the incompressible regime, leveraging the VMS and SUPG method. VMS has been originally introduced by @Hughes:2000. The linearization adopted has been proposed in the SUPG method by @Banyai:2016. +The package relies on the `Gridap.jl` package [@Verdugo:2022; @Badia:2020] to implement the mathematical model of FEM. Complementing this core functionality, `GridapDistributed.jl` [@BadiaD:2022] and [`PartitionedArrays.jl`](https://github.com/fverdugo/PartitionedArrays.jl) allow the use of multi-core CPUs desktop computers to HPC clusters. The [`GridapPETSc.jl`](https://github.com/gridap/GridapPETSc.jl) package is used to solve the final linear system. It solves a Linearized and Segregated version of VMS (LS-VMS) and SUPG. It is based on an iterative predictor-corrector scheme and it avoids the resolution of a non-linear problem. It uses the $\theta$ method to solve the time-marching problem. This package focuses on solving fluid dynamics problems, with a particular emphasis on the study of 2D and 3D airfoil aerodynamics at low Reynolds numbers (tested up to 500,000). The primary objective is to provide researchers and engineers with a versatile tool for analyzing aerodynamic features in this regime. A suite of benchmark cases is implemented to ensure reliability and applicability across a range of scenarios. These include: + - **Taylor-Green vortices**: Simulated in both 2D and 3D. - **Lid-driven cavity**: Solvable in 2D; the 3D version is not currently supported. - **Vortex shedding over a cylinder**: Available in both 2D and 3D. @@ -52,7 +53,7 @@ While these packages vary in scope and functionality, they collectively highligh # Package Features -- It supports 2-dimensional and 3-dimensional geometries +- It supports two-dimensional and three-dimensional geometries - It solved a time-dependent problem - It can run in parallel using MPI - Velocity ramping @@ -65,18 +66,23 @@ While these packages vary in scope and functionality, they collectively highligh # Results ## Taylor Green 2D -2D Taylor-Green vortex case is used as benchmark case to assess the error analysis of the code. The domain is a square of size: [-0.5,0.5]x[-0.5,0.5], at Reynolds number 1600. The CFL is constant for each simulation, CFL=0.32. The time-step is computed as $dt = \frac{CFL}{ order \cdot N}$. +2D Taylor-Green vortex case is used as benchmark case to assess the error analysis of the code. The domain is a square of size: $[-0.5,0.5] \times [-0.5,0.5]$, at Reynolds number 1600. +The CFL is constant for each simulation at 0.32. +The time-step size is computed as $\Delta t = \frac{\text{CFL}}{ \text{order} \times N}$. ![TGV2D-verr](images/verr.png){ width=50% } ![TGV2D-perr](images/perr.png){ width=50% } ## Lid-Driven Cavity Flow 2D -The 2D lid-driven cavity flow is another well-known test case. The domain is a square of size: [-0.5,0.5]x[-0.5,0.5], at Reynolds number 1000. The time-step `dt=0.02`, number of elements for each side `N=50`, `order=2`. The reference values are from [@botella_peyret:1998]. The plot reports the velocity in `x` direction along the vertical plane `x=0.0`. +The 2D lid-driven cavity flow is another well-known test case. The domain is a square of size: $[-0.5,0.5] \times [-0.5,0.5]$, at Reynolds number 1000. The time-step size is 0.02, number of elements for each side (`N`) is 50, and order is 2. +The reference values are from @botella_peyret:1998. +The plot reports the velocity in $x$ direction along the vertical plane $x = 0$. ![Lid Driven Cavity Flow Reynolds 1000](images/LS-VMS-LD-1000.png){ width=50% } ## Taylor Green 3D -The flow is initialized in a cubic domain with periodic boundary conditions imposed on all sides. The domain extends from $-\pi$ to $\pi$ in each spatial direction (`x`, `y`, `z`). The reference is the DNS solution. +The flow is initialized in a cubic domain with periodic boundary conditions imposed on all sides. The domain extends from $-\pi$ to $\pi$ in each spatial direction $(x, y, z)$. +The reference is the DNS solution. ![TGV3D](images/TGV_64_Q1.png){ width=32% } ![TGV3D](images/TGV_32_Q2.png){ width=32% } @@ -84,7 +90,7 @@ The flow is initialized in a cubic domain with periodic boundary conditions impo ## Parallelization -In this section is possible to appreciate the weak and strong scalability of the implementation of the code. The benchmark case is the 2D Taylor-Green, the time reported here is intended for each time-step. The order of the elements for this simulation is always 2, and the CFL constant at 0.32 +In this section is possible to appreciate the weak and strong scalability of the implementation of the code. The benchmark case is the 2D Taylor-Green, the time reported here is intended for each time-step. The order of the elements for this simulation is always 2, and the CFL constant at 0.32. | | Preconditioner | Linear Solver | |-----------|------------------|-----------------| @@ -94,13 +100,13 @@ In this section is possible to appreciate the weak and strong scalability of the `MPI` is used for parallelization, and to solve the sparse and distribute numerical systems we use `PETSc`. ### Strong Scalability -Strong scalability evaluates how efficiently a parallel code reduces execution time when the problem size remains fixed, but the number of processing units increases. There is a total of `400` elements on each side, leading to `160K` elements and `1.92M` dofs in total. +Strong scalability evaluates how efficiently a parallel code reduces execution time when the problem size remains fixed, but the number of processing units increases. There is a total of 400 elements on each side, leading to 160,000 elements and $1.92 \times 10^6$ degrees of freedom in total. ![Strong Scalability](images/STRONG_TGV.png){ width=50% } ### Weak Scalability -Weak scalability measures how well a parallel code maintains performance when the problem size is kept constant per processor, and the number of processors increases. On each processor there are `50x50` elements, the number of dofs is kept constant at `30K dofs/procs`. +Weak scalability measures how well a parallel code maintains performance when the problem size is kept constant per processor, and the number of processors increases. On each processor there are 50$\times$50 elements, the number of degrees of freedom is kept constant at 30,000 per processor. ![Weak Scalability](images/WEAK_TGV.png){ width=50% } From 0205e69effb7845eaeb9280c16554a92c456ab40 Mon Sep 17 00:00:00 2001 From: Kyle Niemeyer Date: Fri, 23 May 2025 09:56:47 -0400 Subject: [PATCH 06/42] Updates JOSS references --- paper/paper.bib | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index fafba1bc..26ec6892 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -7,7 +7,7 @@ @article{Badia:2020 number = {52}, pages = {2520}, author = {Santiago Badia and Francesc Verdugo}, - title = {Gridap: An extensible Finite Element toolbox in Julia}, + title = {Gridap: An extensible Finite Element toolbox in {J}ulia}, journal = {Journal of Open Source Software} } @@ -20,7 +20,7 @@ @article{Verdugo:2022 volume = {276}, pages = {108341}, author = {Francesc Verdugo and Santiago Badia}, - title = {The software design of Gridap: A Finite Element package based on the Julia {JIT} compiler}, + title = {The software design of {Gridap}: A Finite Element package based on the {J}ulia {JIT} compiler}, journal = {Computer Physics Communications} } @@ -33,7 +33,7 @@ @article{BadiaD:2022 number = {74}, pages = {4157}, author = {Santiago Badia and Alberto F. Martín and Francesc Verdugo}, - title = {GridapDistributed: a massively parallel finite element toolbox in Julia}, + title = {GridapDistributed: a massively parallel finite element toolbox in {J}ulia}, journal = {Journal of Open Source Software} } @@ -72,14 +72,26 @@ @article{Hughes:2000 doi = {10.1007/s007910050051}, } -@article{Banyai:2016, +@phdthesis{Banyai:2016, author = {Tamas Banyai}, isbn = {9782875161093}, - institution = {Université Libre de Bruxelles}, - title = {Development of Stabilized Finite Element Method for Numerical Simulation of Turbulent Incompressible Single and Eulerian-Eulerian Two-Phase Flows}, + school = {Université Libre de Bruxelles, Ecole polytechnique de Bruxelles}, + address = {Bruxelles}, + title = {Development of Stabilized Finite Element Method for Numerical Simulation of Turbulent Incompressible Single and {E}ulerian-{E}ulerian Two-Phase Flows}, year = {2016}, + type = {PhD thesis}, + month = aug, + url = {http://hdl.handle.net/2013/ULB-DIPOT:oai:dipot.ulb.ac.be:2013/235110} } - @article{botella_peyret:1998, - title={Benchmark spectral results on the lid-driven cavity flow}, volume={27}, DOI={10.1016/s0045-7930(98)00002-4}, number={4}, journal={Computers and Fluids}, author={Botella, O. and Peyret, R.}, year={1998}, pages={421–433}} \ No newline at end of file +@article{botella_peyret:1998, + title={Benchmark spectral results on the lid-driven cavity flow}, + volume={27}, + DOI={10.1016/s0045-7930(98)00002-4}, + number={4}, + journal={Computers and Fluids}, + author={Botella, O. and Peyret, R.}, + year={1998}, + pages={421–433} +} From 126daf518d0d9524be8a036f407d557bffcbc6b4 Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 23 May 2025 16:28:44 +0200 Subject: [PATCH 07/42] cite pkg articles --- paper/paper.bib | 41 +++++++++++++++++++++++++++++++++++++++++ paper/paper.md | 8 ++++---- 2 files changed, 45 insertions(+), 4 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index 26ec6892..2779ef29 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -95,3 +95,44 @@ @article{botella_peyret:1998 year={1998}, pages={421–433} } + + + +@misc{Trixi:2025, + title={{T}rixi.jl: {A}daptive high-order numerical simulations + of hyperbolic {PDE}s in {J}ulia}, + author={Schlottke-Lakemper, Michael and Gassner, Gregor J and + Ranocha, Hendrik and Winters, Andrew R and Chan, Jesse + and Rueda-Ramírez, Andrés}, + year={2025}, + howpublished={\url{https://github.com/trixi-framework/Trixi.jl}}, + doi={10.5281/zenodo.3996439} +} + + + +@misc{WaterLily:2024, + title={WaterLily.jl: A differentiable and backend-agnostic Julia solver to simulate incompressible viscous flow and dynamic bodies}, + author={Gabriel D. Weymouth and Bernat Font}, + year={2024}, + eprint={2407.16032}, + archivePrefix={arXiv}, + primaryClass={physics.flu-dyn}, + url={https://arxiv.org/abs/2407.16032}, +} + + +@article{Oceananigans:2020, + doi = {10.21105/joss.02018}, url = {https://doi.org/10.21105/joss.02018}, year = {2020}, publisher = {The Open Journal}, volume = {5}, number = {53}, pages = {2018}, author = {Ali Ramadhan and Gregory LeClaire Wagner and Chris Hill and Jean-Michel Campin and Valentin Churavy and Tim Besard and Andre Souza and Alan Edelman and Raffaele Ferrari and John Marshall}, title = {Oceananigans.jl: Fast and friendly geophysical fluid dynamics on GPUs}, journal = {Journal of Open Source Software} } + + + + @misc{Verdugo:2025, + author = {Francesc Verdugo and Alberto F. Martin and HRvanElderen and GeliezaK and Jordi Manyer Fuertes and Fredrik Ekre and Joroks and Dennis Ogiermann and Yung-sheng Tu and Hendrik Ranocha and Oriol Colomés and Mosè Giordano and Oscar Smith and Robin Richardson}, + title = {PartitionedArrays.jl: PartitionedArrays-v0.5.10}, + year = 2025, + publisher = {Zenodo}, + version = {v0.5.10}, + doi = {10.5281/zenodo.15266760}, + url = {https://github.com/PartitionedArrays/PartitionedArrays.jl} +} diff --git a/paper/paper.md b/paper/paper.md index 4449fac8..1bce3b72 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -30,7 +30,7 @@ However, for more advanced users who may desire greater control over the simulat # Statement of need `SegregatedVMSSolver.jl` is a comprehensive Julia package designed for conducting high-fidelity simulations of complex flow phenomena within the incompressible regime, leveraging the VMS and SUPG method. VMS has been originally introduced by @Hughes:2000. The linearization adopted has been proposed in the SUPG method by @Banyai:2016. -The package relies on the `Gridap.jl` package [@Verdugo:2022; @Badia:2020] to implement the mathematical model of FEM. Complementing this core functionality, `GridapDistributed.jl` [@BadiaD:2022] and [`PartitionedArrays.jl`](https://github.com/fverdugo/PartitionedArrays.jl) allow the use of multi-core CPUs desktop computers to HPC clusters. The [`GridapPETSc.jl`](https://github.com/gridap/GridapPETSc.jl) package is used to solve the final linear system. +The package relies on the `Gridap.jl` package [@Verdugo:2022; @Badia:2020] to implement the mathematical model of FEM. Complementing this core functionality, `GridapDistributed.jl` [@BadiaD:2022] and `PartitionedArrays.jl` [@Verdugo:2025] allow the use of multi-core CPUs desktop computers to HPC clusters. The [`GridapPETSc.jl`](https://github.com/gridap/GridapPETSc.jl) package is used to solve the final linear system. It solves a Linearized and Segregated version of VMS (LS-VMS) and SUPG. It is based on an iterative predictor-corrector scheme and it avoids the resolution of a non-linear problem. It uses the $\theta$ method to solve the time-marching problem. This package focuses on solving fluid dynamics problems, with a particular emphasis on the study of 2D and 3D airfoil aerodynamics at low Reynolds numbers (tested up to 500,000). The primary objective is to provide researchers and engineers with a versatile tool for analyzing aerodynamic features in this regime. @@ -45,9 +45,9 @@ It also has a suite of tools for post-processing the results like performing tim The field of fluid dynamics in Julia has seen significant growth, with several software packages emerging to address various computational challenges. This reflects the growing interest and engagement of the Julia community in this domain. A comprehensive list of packages can be found on [Julia Packages - Fluid Dynamics](https://juliapackages.com/c/fluid-dynamics). Among the most notable and well documented are: -- **[Trixi.jl](https://github.com/trixi-framework/Trixi.jl)**: A framework for numerical simulation of hyperbolic PDEs, particularly suited for high-order methods and adaptive mesh refinement. -- **[WaterLily.jl](https://github.com/WaterLily-jl/WaterLily.jl/tree/master)**: A CPU/GPU finite-volume solver that uses an immersed-boundary method -- **[Oceananigans.jl](https://github.com/CliMA/Oceananigans.jl)**: A GPU-accelerated model for simulating incompressible fluid dynamics, widely used in geophysical and oceanographic studies. +- **`Trixi.jl` [@Trixi:2025]**: A framework for numerical simulation of hyperbolic PDEs, particularly suited for high-order methods and adaptive mesh refinement. +- **`WaterLily.jl` [WaterLily:2024]**: A CPU/GPU finite-volume solver that uses an immersed-boundary method +- **`Oceananigans.jl` [@Oceananigans:2020]**: A GPU-accelerated model for simulating incompressible fluid dynamics, widely used in geophysical and oceanographic studies. While these packages vary in scope and functionality, they collectively highlight the flexibility and performance benefits of Julia in computational fluid dynamics. However, the ecosystem is still maturing compared to more established environments like Python or MATLAB. This paper contributes to this evolving field by introducing a new package tailored for Large Eddy Simulations. From 4d64a89f6c2da102b2c517c7a5a2cefa0efffd3c Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 23 May 2025 16:33:12 +0200 Subject: [PATCH 08/42] err fix --- paper/paper.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paper/paper.md b/paper/paper.md index 1bce3b72..69e1cd20 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -45,9 +45,9 @@ It also has a suite of tools for post-processing the results like performing tim The field of fluid dynamics in Julia has seen significant growth, with several software packages emerging to address various computational challenges. This reflects the growing interest and engagement of the Julia community in this domain. A comprehensive list of packages can be found on [Julia Packages - Fluid Dynamics](https://juliapackages.com/c/fluid-dynamics). Among the most notable and well documented are: -- **`Trixi.jl` [@Trixi:2025]**: A framework for numerical simulation of hyperbolic PDEs, particularly suited for high-order methods and adaptive mesh refinement. -- **`WaterLily.jl` [WaterLily:2024]**: A CPU/GPU finite-volume solver that uses an immersed-boundary method -- **`Oceananigans.jl` [@Oceananigans:2020]**: A GPU-accelerated model for simulating incompressible fluid dynamics, widely used in geophysical and oceanographic studies. +- **`Trixi.jl`** [@Trixi:2025]: A framework for numerical simulation of hyperbolic PDEs, particularly suited for high-order methods and adaptive mesh refinement. +- **`WaterLily.jl`** [@WaterLily:2024]: A CPU/GPU finite-volume solver that uses an immersed-boundary method +- **`Oceananigans.jl`** [@Oceananigans:2020]: A GPU-accelerated model for simulating incompressible fluid dynamics, widely used in geophysical and oceanographic studies. While these packages vary in scope and functionality, they collectively highlight the flexibility and performance benefits of Julia in computational fluid dynamics. However, the ecosystem is still maturing compared to more established environments like Python or MATLAB. This paper contributes to this evolving field by introducing a new package tailored for Large Eddy Simulations. From 9edc555f7d60bc050ee0edd0e20891fe83254787 Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 23 May 2025 16:53:09 +0200 Subject: [PATCH 09/42] add papers references --- paper/paper.bib | 19 +++++++++++++++++++ paper/paper.md | 4 ++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index 2779ef29..b96dee83 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -136,3 +136,22 @@ @misc{Verdugo:2025 doi = {10.5281/zenodo.15266760}, url = {https://github.com/PartitionedArrays/PartitionedArrays.jl} } + + + +@misc{@BrunelliAirfoilGmsh:2023, + author = {Carlo Brunelli}, + title = {AirfoilGmsh.jl: A Julia package for generating airfoil meshes using Gmsh}, + year = {2023}, + howpublished = {\url{https://github.com/carlodev/AirfoilGmsh.jl}}, + note = {Accessed: 2025-05-23} +} + + +@misc{GridapPETSc:2025, + author = {Francesc Verdugo and Santiago Badia and Alberto F. Martin and Jordi Manyer Fuertes and Eric Neiva and the Gridap Team}, + title = {GridapPETSc.jl: A PETSc backend for Gridap.jl}, + year = {2025}, + howpublished = {\url{https://github.com/gridap/GridapPETSc.jl}}, + note = {Accessed: 2025-05-23} +} diff --git a/paper/paper.md b/paper/paper.md index 69e1cd20..544cbcaa 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -30,7 +30,7 @@ However, for more advanced users who may desire greater control over the simulat # Statement of need `SegregatedVMSSolver.jl` is a comprehensive Julia package designed for conducting high-fidelity simulations of complex flow phenomena within the incompressible regime, leveraging the VMS and SUPG method. VMS has been originally introduced by @Hughes:2000. The linearization adopted has been proposed in the SUPG method by @Banyai:2016. -The package relies on the `Gridap.jl` package [@Verdugo:2022; @Badia:2020] to implement the mathematical model of FEM. Complementing this core functionality, `GridapDistributed.jl` [@BadiaD:2022] and `PartitionedArrays.jl` [@Verdugo:2025] allow the use of multi-core CPUs desktop computers to HPC clusters. The [`GridapPETSc.jl`](https://github.com/gridap/GridapPETSc.jl) package is used to solve the final linear system. +The package relies on the `Gridap.jl` package [@Verdugo:2022; @Badia:2020] to implement the mathematical model of FEM. Complementing this core functionality, `GridapDistributed.jl` [@BadiaD:2022] and `PartitionedArrays.jl` [@Verdugo:2025] allow the use of multi-core CPUs desktop computers to HPC clusters. The `GridapPETSc.jl` [@GridapPETSc:2025] package is used to solve the final linear system. It solves a Linearized and Segregated version of VMS (LS-VMS) and SUPG. It is based on an iterative predictor-corrector scheme and it avoids the resolution of a non-linear problem. It uses the $\theta$ method to solve the time-marching problem. This package focuses on solving fluid dynamics problems, with a particular emphasis on the study of 2D and 3D airfoil aerodynamics at low Reynolds numbers (tested up to 500,000). The primary objective is to provide researchers and engineers with a versatile tool for analyzing aerodynamic features in this regime. @@ -41,7 +41,7 @@ A suite of benchmark cases is implemented to ensure reliability and applicabilit - **Vortex shedding over a cylinder**: Available in both 2D and 3D. - **Airfoil aerodynamics**: Extensive support for both 2D and 3D simulations. -It also has a suite of tools for post-processing the results like performing time and spanwise averaging. It is possible to control the simulation in real-time, enabling/disabling the creation of output files at each time-step. The user can load their own airfoil meshes also using the package [`AirfoilGmsh.jl`](https://github.com/carlodev/AirfoilGmsh.jl). Additionally, the package provides tools for initializing boundary layers in 2D simulations, enhancing its versatility and utility for researchers and practitioners in the field of fluid dynamics. +It also has a suite of tools for post-processing the results like performing time and spanwise averaging. It is possible to control the simulation in real-time, enabling/disabling the creation of output files at each time-step. The user can load their own airfoil meshes also using the package `AirfoilGmsh.jl` [@BrunelliAirfoilGmsh:2023]. Additionally, the package provides tools for initializing boundary layers in 2D simulations, enhancing its versatility and utility for researchers and practitioners in the field of fluid dynamics. The field of fluid dynamics in Julia has seen significant growth, with several software packages emerging to address various computational challenges. This reflects the growing interest and engagement of the Julia community in this domain. A comprehensive list of packages can be found on [Julia Packages - Fluid Dynamics](https://juliapackages.com/c/fluid-dynamics). Among the most notable and well documented are: From 1458b293bdec1b1f22d5d40fd027985e5ce01150 Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 23 May 2025 17:01:18 +0200 Subject: [PATCH 10/42] 2025 --- paper/paper.bib | 6 ++---- paper/paper.md | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index b96dee83..dd6b1d86 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -139,12 +139,11 @@ @misc{Verdugo:2025 -@misc{@BrunelliAirfoilGmsh:2023, +@misc{@BrunelliGmsh:2025, author = {Carlo Brunelli}, title = {AirfoilGmsh.jl: A Julia package for generating airfoil meshes using Gmsh}, - year = {2023}, + year = {2025}, howpublished = {\url{https://github.com/carlodev/AirfoilGmsh.jl}}, - note = {Accessed: 2025-05-23} } @@ -153,5 +152,4 @@ @misc{GridapPETSc:2025 title = {GridapPETSc.jl: A PETSc backend for Gridap.jl}, year = {2025}, howpublished = {\url{https://github.com/gridap/GridapPETSc.jl}}, - note = {Accessed: 2025-05-23} } diff --git a/paper/paper.md b/paper/paper.md index 544cbcaa..c2a4013c 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -41,7 +41,7 @@ A suite of benchmark cases is implemented to ensure reliability and applicabilit - **Vortex shedding over a cylinder**: Available in both 2D and 3D. - **Airfoil aerodynamics**: Extensive support for both 2D and 3D simulations. -It also has a suite of tools for post-processing the results like performing time and spanwise averaging. It is possible to control the simulation in real-time, enabling/disabling the creation of output files at each time-step. The user can load their own airfoil meshes also using the package `AirfoilGmsh.jl` [@BrunelliAirfoilGmsh:2023]. Additionally, the package provides tools for initializing boundary layers in 2D simulations, enhancing its versatility and utility for researchers and practitioners in the field of fluid dynamics. +It also has a suite of tools for post-processing the results like performing time and spanwise averaging. It is possible to control the simulation in real-time, enabling/disabling the creation of output files at each time-step. The user can load their own airfoil meshes also using the package `AirfoilGmsh.jl` [@BrunelliGmsh:2025]. Additionally, the package provides tools for initializing boundary layers in 2D simulations, enhancing its versatility and utility for researchers and practitioners in the field of fluid dynamics. The field of fluid dynamics in Julia has seen significant growth, with several software packages emerging to address various computational challenges. This reflects the growing interest and engagement of the Julia community in this domain. A comprehensive list of packages can be found on [Julia Packages - Fluid Dynamics](https://juliapackages.com/c/fluid-dynamics). Among the most notable and well documented are: From 32421986ac86eb211e4362dfce0411a68423ce8f Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 23 May 2025 17:10:45 +0200 Subject: [PATCH 11/42] s --- paper/paper.bib | 2 -- paper/paper.md | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index dd6b1d86..e617e62d 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -137,8 +137,6 @@ @misc{Verdugo:2025 url = {https://github.com/PartitionedArrays/PartitionedArrays.jl} } - - @misc{@BrunelliGmsh:2025, author = {Carlo Brunelli}, title = {AirfoilGmsh.jl: A Julia package for generating airfoil meshes using Gmsh}, diff --git a/paper/paper.md b/paper/paper.md index c2a4013c..15a80f77 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -41,7 +41,7 @@ A suite of benchmark cases is implemented to ensure reliability and applicabilit - **Vortex shedding over a cylinder**: Available in both 2D and 3D. - **Airfoil aerodynamics**: Extensive support for both 2D and 3D simulations. -It also has a suite of tools for post-processing the results like performing time and spanwise averaging. It is possible to control the simulation in real-time, enabling/disabling the creation of output files at each time-step. The user can load their own airfoil meshes also using the package `AirfoilGmsh.jl` [@BrunelliGmsh:2025]. Additionally, the package provides tools for initializing boundary layers in 2D simulations, enhancing its versatility and utility for researchers and practitioners in the field of fluid dynamics. +It also has a suite of tools for post-processing the results like performing time and spanwise averaging. It is possible to control the simulation in real-time, enabling/disabling the creation of output files at each time-step. The user can load their own airfoil meshes also using the package `AirfoilGmsh.jl` [@BrunelliGmsh:2025] . Additionally, the package provides tools for initializing boundary layers in 2D simulations, enhancing its versatility and utility for researchers and practitioners in the field of fluid dynamics. The field of fluid dynamics in Julia has seen significant growth, with several software packages emerging to address various computational challenges. This reflects the growing interest and engagement of the Julia community in this domain. A comprehensive list of packages can be found on [Julia Packages - Fluid Dynamics](https://juliapackages.com/c/fluid-dynamics). Among the most notable and well documented are: From 51b2072a2bfc8fb34e7c277eb0407f0ab1fbd1c3 Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 23 May 2025 17:15:35 +0200 Subject: [PATCH 12/42] s --- paper/paper.bib | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index e617e62d..24499016 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -137,17 +137,16 @@ @misc{Verdugo:2025 url = {https://github.com/PartitionedArrays/PartitionedArrays.jl} } -@misc{@BrunelliGmsh:2025, - author = {Carlo Brunelli}, - title = {AirfoilGmsh.jl: A Julia package for generating airfoil meshes using Gmsh}, - year = {2025}, - howpublished = {\url{https://github.com/carlodev/AirfoilGmsh.jl}}, -} - - @misc{GridapPETSc:2025, author = {Francesc Verdugo and Santiago Badia and Alberto F. Martin and Jordi Manyer Fuertes and Eric Neiva and the Gridap Team}, title = {GridapPETSc.jl: A PETSc backend for Gridap.jl}, year = {2025}, howpublished = {\url{https://github.com/gridap/GridapPETSc.jl}}, } + +@misc{@BrunelliGmsh:2025, + author = {Carlo Brunelli}, + title = {AirfoilGmsh.jl: A Julia package for generating airfoil meshes using Gmsh}, + year = {2025}, + howpublished = {\url{https://github.com/carlodev/AirfoilGmsh.jl}}, +} From 190a045fc71730870ee1729d51a3103dab98ec45 Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 23 May 2025 17:23:57 +0200 Subject: [PATCH 13/42] s --- paper/paper.bib | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/paper/paper.bib b/paper/paper.bib index 24499016..3690d270 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -145,8 +145,4 @@ @misc{GridapPETSc:2025 } @misc{@BrunelliGmsh:2025, - author = {Carlo Brunelli}, - title = {AirfoilGmsh.jl: A Julia package for generating airfoil meshes using Gmsh}, - year = {2025}, - howpublished = {\url{https://github.com/carlodev/AirfoilGmsh.jl}}, -} + author = {Carlo Brunelli}, title={AirfoilGmsh.jl: A Julia packgage for generating airfoil meshes using Gmsh}, year={2025}, howpublished={\url{https://github.com/carlodev/AirfoilGmsh.jl}}} From 68f0007cbdbe6f48ec1ff5b5434cbb500805427a Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 23 May 2025 17:27:51 +0200 Subject: [PATCH 14/42] s --- paper/paper.bib | 1 + 1 file changed, 1 insertion(+) diff --git a/paper/paper.bib b/paper/paper.bib index 3690d270..5d574f7f 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -146,3 +146,4 @@ @misc{GridapPETSc:2025 @misc{@BrunelliGmsh:2025, author = {Carlo Brunelli}, title={AirfoilGmsh.jl: A Julia packgage for generating airfoil meshes using Gmsh}, year={2025}, howpublished={\url{https://github.com/carlodev/AirfoilGmsh.jl}}} + \ No newline at end of file From 6bac6ea7b07b032ffd6216f1977e6e6b2eee7871 Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 23 May 2025 17:30:13 +0200 Subject: [PATCH 15/42] s --- paper/paper.bib | 1 - 1 file changed, 1 deletion(-) diff --git a/paper/paper.bib b/paper/paper.bib index 5d574f7f..3690d270 100644 --- a/paper/paper.bib +++ b/paper/paper.bib @@ -146,4 +146,3 @@ @misc{GridapPETSc:2025 @misc{@BrunelliGmsh:2025, author = {Carlo Brunelli}, title={AirfoilGmsh.jl: A Julia packgage for generating airfoil meshes using Gmsh}, year={2025}, howpublished={\url{https://github.com/carlodev/AirfoilGmsh.jl}}} - \ No newline at end of file From b9e31fed9e3aa4edec796843616a77e8ab321e66 Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 23 May 2025 17:33:15 +0200 Subject: [PATCH 16/42] s --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index 15a80f77..ba405abc 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -41,7 +41,7 @@ A suite of benchmark cases is implemented to ensure reliability and applicabilit - **Vortex shedding over a cylinder**: Available in both 2D and 3D. - **Airfoil aerodynamics**: Extensive support for both 2D and 3D simulations. -It also has a suite of tools for post-processing the results like performing time and spanwise averaging. It is possible to control the simulation in real-time, enabling/disabling the creation of output files at each time-step. The user can load their own airfoil meshes also using the package `AirfoilGmsh.jl` [@BrunelliGmsh:2025] . Additionally, the package provides tools for initializing boundary layers in 2D simulations, enhancing its versatility and utility for researchers and practitioners in the field of fluid dynamics. +It also has a suite of tools for post-processing the results like performing time and spanwise averaging. It is possible to control the simulation in real-time, enabling/disabling the creation of output files at each time-step. The user can load their own airfoil meshes also using the package `AirfoilGmsh.jl` [@BrunelliGmsh] . Additionally, the package provides tools for initializing boundary layers in 2D simulations, enhancing its versatility and utility for researchers and practitioners in the field of fluid dynamics. The field of fluid dynamics in Julia has seen significant growth, with several software packages emerging to address various computational challenges. This reflects the growing interest and engagement of the Julia community in this domain. A comprehensive list of packages can be found on [Julia Packages - Fluid Dynamics](https://juliapackages.com/c/fluid-dynamics). Among the most notable and well documented are: From 5418c6601c3c20c0c211cd0a7e5f3abebb716227 Mon Sep 17 00:00:00 2001 From: carlodev Date: Mon, 2 Jun 2025 14:53:12 +0200 Subject: [PATCH 17/42] rm AirfoilGmsh --- paper/paper.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper/paper.md b/paper/paper.md index ba405abc..c9fb9ea3 100644 --- a/paper/paper.md +++ b/paper/paper.md @@ -41,7 +41,7 @@ A suite of benchmark cases is implemented to ensure reliability and applicabilit - **Vortex shedding over a cylinder**: Available in both 2D and 3D. - **Airfoil aerodynamics**: Extensive support for both 2D and 3D simulations. -It also has a suite of tools for post-processing the results like performing time and spanwise averaging. It is possible to control the simulation in real-time, enabling/disabling the creation of output files at each time-step. The user can load their own airfoil meshes also using the package `AirfoilGmsh.jl` [@BrunelliGmsh] . Additionally, the package provides tools for initializing boundary layers in 2D simulations, enhancing its versatility and utility for researchers and practitioners in the field of fluid dynamics. +It also has a suite of tools for post-processing the results like performing time and spanwise averaging. It is possible to control the simulation in real-time, enabling/disabling the creation of output files at each time-step. Additionally, the package provides tools for initializing boundary layers in 2D simulations, enhancing its versatility and utility for researchers and practitioners in the field of fluid dynamics. The field of fluid dynamics in Julia has seen significant growth, with several software packages emerging to address various computational challenges. This reflects the growing interest and engagement of the Julia community in this domain. A comprehensive list of packages can be found on [Julia Packages - Fluid Dynamics](https://juliapackages.com/c/fluid-dynamics). Among the most notable and well documented are: From e4cb2eeae44132bf816d2d975a0e512fdfd55178 Mon Sep 17 00:00:00 2001 From: carlodev Date: Wed, 4 Jun 2025 14:59:43 +0200 Subject: [PATCH 18/42] update MatrixCreation to new APIs version Gridap --- src/Commons/MatrixCreation.jl | 59 +++++++++++++++-------------------- 1 file changed, 26 insertions(+), 33 deletions(-) diff --git a/src/Commons/MatrixCreation.jl b/src/Commons/MatrixCreation.jl index 6efd6b97..1f05446e 100644 --- a/src/Commons/MatrixCreation.jl +++ b/src/Commons/MatrixCreation.jl @@ -128,7 +128,6 @@ function allocate_all_matrices_vectors(u_adv, params, simcase) Mat_S, _ = assemble_matrix_and_vector(S, rhs, Ptn1, Q) Mat_inv_ML = allocate_Mat_inv_ML(Mat_ML) - Vec_Ap = Vec_Apu + Vec_App Vec_Au = Vec_Auu + Vec_Aup @@ -142,21 +141,20 @@ function update_all_matrices_vectors!(matrices::Tuple, u_adv, params, simcase) @unpack Utn1, Ptn1, tests = params V, Q = tests - Tuu, Tpu, Auu, Aup, Apu, App, ML, S, _ = segregated_equations(u_adv, params, simcase) - update_matrix!(Mat_Tuu, Tuu, Utn1, V) - update_matrix!(Mat_Tpu, Tpu, Utn1, Q) - - update_matrix_vector!(Mat_Auu, Vec_Auu, Auu, Utn1, V) + Tuu, Tpu, Auu, Aup, Apu, App, ML, S, rhs = segregated_equations(u_adv, params, simcase) - update_matrix_vector!(Mat_Aup, Vec_Aup, Aup, Ptn1, V) - update_matrix_vector!(Mat_Apu, Vec_Apu, Apu, Utn1, Q) + assemble_matrix!(Tuu,Mat_Tuu,Utn1, V) + assemble_matrix!(Tpu, Mat_Tpu, Utn1, Q) - update_matrix_vector!(Mat_App, Vec_App, App, Ptn1, Q) + assemble_matrix_and_vector!(Auu,rhs,Mat_Auu,Vec_Auu,Utn1,V) + assemble_matrix_and_vector!(Aup,rhs,Mat_Aup,Vec_Auu,Ptn1,V) + assemble_matrix_and_vector!(Apu,rhs,Mat_Apu,Vec_Apu,Utn1,Q) + assemble_matrix_and_vector!(App,rhs,Mat_App,Vec_App,Ptn1,Q) - update_matrix!(Mat_ML, ML, Utn1, V) + assemble_matrix!(ML,Mat_ML,Utn1, V) + assemble_matrix!(S,Mat_S,Ptn1, Q) - update_matrix!(Mat_S, S, Ptn1, Q) Mat_inv_ML = allocate_Mat_inv_ML(Mat_ML) inv_lump_vel_mass!(Mat_inv_ML, Mat_ML) @@ -167,32 +165,27 @@ function update_all_matrices_vectors!(matrices::Tuple, u_adv, params, simcase) end -function update_matrix_vector!(A::AbstractMatrix, b::AbstractVector, a::Function, U, V) - dv = get_fe_basis(V) - du = get_trial_fe_basis(U) - - - - mat_contribs = a(du, dv) - uhd = zero(U) +# function update_matrix_vector!(A::AbstractMatrix, b::AbstractVector, a::Function, U, V) +# dv = get_fe_basis(V) +# du = get_trial_fe_basis(U) - data = collect_cell_matrix_and_vector(U, V, mat_contribs, 0.0, uhd) - - assembler = SparseMatrixAssembler(U, V) - assemble_matrix_and_vector!(A, b, assembler, data) - -end +# mat_contribs = a(du, dv) +# uhd = zero(U) +# data = collect_cell_matrix_and_vector(U, V, mat_contribs, 0.0, uhd) +# assembler = SparseMatrixAssembler(U, V) +# assemble_matrix_and_vector!(A, b, assembler, data) +# end -function update_matrix!(A::AbstractMatrix, a::Function, U, V) - dv = get_fe_basis(V) - du = get_trial_fe_basis(U) +# function update_matrix!(A::AbstractMatrix, a::Function, U, V) +# dv = get_fe_basis(V) +# du = get_trial_fe_basis(U) - mat_contribs = a(du, dv) - data = collect_cell_matrix(U, V, mat_contribs) +# mat_contribs = a(du, dv) +# data = collect_cell_matrix(U, V, mat_contribs) - assembler = SparseMatrixAssembler(U, V) - assemble_matrix!(A, assembler, data) -end +# assembler = SparseMatrixAssembler(U, V) +# assemble_matrix!(A, assembler, data) +# end end \ No newline at end of file From 640a8f426a949a9de37e2a1eb18efde8358f6667 Mon Sep 17 00:00:00 2001 From: carlodev Date: Wed, 4 Jun 2025 15:29:28 +0200 Subject: [PATCH 19/42] updt project --- Project.toml | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/Project.toml b/Project.toml index 51586bc6..3f5ce1d7 100644 --- a/Project.toml +++ b/Project.toml @@ -31,28 +31,4 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Trapz = "592b5752-818d-11e9-1e9a-2b8ca4a44cd1" UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" -[compat] -CSV = "0.10.15" -DataFrames = "1.7.0" -DataInterpolations = "6.6.0" -DelimitedFiles = "1.9.1" -FFTW = "1.8.0" -FileIO = "1.16.6" -FillArrays ="=1.13.0" -Gridap = "=0.17.20" -GridapDistributed = "=0.3.2" -GridapGmsh = "=0.7.1" -GridapPETSc = "=0.5.3" -MPI ="=0.20.22" -NearestNeighbors ="0.4.21" -Parameters = "0.12.3" -PartitionedArrays ="=0.3.4" -Revise ="3.7.1" -ScatteredInterpolation = "0.3.6" -LinearAlgebra = "1.11.0" -SparseArrays = "1.11.0" -SyntheticEddyMethod = "=0.4.4" -Trapz ="2.0.3" -Test = "1.11.0" -UnPack = "1.0.2" -julia = "1.11.1" \ No newline at end of file +[compat] \ No newline at end of file From 36edd7714fe9c7c409ab7295fdaa4a83a6ad3b2a Mon Sep 17 00:00:00 2001 From: carlodev Date: Tue, 10 Jun 2025 08:31:50 +0200 Subject: [PATCH 20/42] updt compat --- Project.toml | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 3f5ce1d7..4a6f8da4 100644 --- a/Project.toml +++ b/Project.toml @@ -31,4 +31,30 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" Trapz = "592b5752-818d-11e9-1e9a-2b8ca4a44cd1" UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" -[compat] \ No newline at end of file +[compat] +CSV = "^0.10.15" +DataFrames = "^1.7.0" +DataInterpolations = "^8.0.1" +DelimitedFiles = "^1.9.1" +FFTW = "^1.9.0" +FileIO = "^1.17.0" +FillArrays = "^1.13.0" +Gridap = "^0.18.12" +GridapDistributed = "^0.4.7" +GridapGmsh = "^0.7.2" +GridapPETSc = "^0.5.3" +LinearAlgebra = "^1.11.0" +MPI = "^0.20.22" +NearestNeighbors = "^0.4.21" +Parameters = "^0.12.3" +PartitionedArrays = "^0.3.4" +Pkg = "^1.11.0" +Random = "^1.11.0" +Revise = "^3.8.0" +ScatteredInterpolation = "^0.3.6" +SparseArrays = "^1.11.0" +Statistics = "^1.11.1" +SyntheticEddyMethod = "^0.4.4" +Test = "^1.11.0" +Trapz = "^2.0.3" +UnPack = "^1.0.2" \ No newline at end of file From 3fb2f83a7743c9164f435fe0118084a4145049ec Mon Sep 17 00:00:00 2001 From: carlodev Date: Thu, 4 Sep 2025 13:32:59 +0200 Subject: [PATCH 21/42] bug fix --- src/Commons/MatrixCreation.jl | 88 ++++++++++++++++++++++------------- 1 file changed, 55 insertions(+), 33 deletions(-) diff --git a/src/Commons/MatrixCreation.jl b/src/Commons/MatrixCreation.jl index 1f05446e..54a69079 100644 --- a/src/Commons/MatrixCreation.jl +++ b/src/Commons/MatrixCreation.jl @@ -116,16 +116,16 @@ function allocate_all_matrices_vectors(u_adv, params, simcase) @unpack Utn1, Ptn1, tests = params V, Q = tests - Mat_Tuu, _ = assemble_matrix_and_vector(Tuu, rhs, Utn1, V) - Mat_Tpu, _ = assemble_matrix_and_vector(Tpu, rhs, Utn1, Q) + Mat_Tuu = allocate_matrix(Tuu, rhs, Utn1, V) + Mat_Tpu = allocate_matrix(Tpu, rhs, Utn1, Q) - Mat_Auu, Vec_Auu = assemble_matrix_and_vector(Auu, rhs, Utn1, V) - Mat_Aup, Vec_Aup = assemble_matrix_and_vector(Aup, rhs, Ptn1, V) - Mat_Apu, Vec_Apu = assemble_matrix_and_vector(Apu, rhs, Utn1, Q) - Mat_App, Vec_App = assemble_matrix_and_vector(App, rhs, Ptn1, Q) + Mat_Auu, Vec_Auu = allocate_matrix_and_vector(Auu, rhs, Utn1, V) + Mat_Aup, Vec_Aup = allocate_matrix_and_vector(Aup, rhs, Ptn1, V) + Mat_Apu, Vec_Apu = allocate_matrix_and_vector(Apu, rhs, Utn1, Q) + Mat_App, Vec_App = allocate_matrix_and_vector(App, rhs, Ptn1, Q) - Mat_ML, _ = assemble_matrix_and_vector(ML, rhs, Utn1, V) - Mat_S, _ = assemble_matrix_and_vector(S, rhs, Ptn1, Q) + Mat_ML= allocate_matrix(ML, rhs, Utn1, V) + Mat_S = allocate_matrix(S, rhs, Ptn1, Q) Mat_inv_ML = allocate_Mat_inv_ML(Mat_ML) Vec_Ap = Vec_Apu + Vec_App @@ -134,6 +134,21 @@ function allocate_all_matrices_vectors(u_adv, params, simcase) return Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, Mat_ML, Mat_inv_ML, Mat_S, Vec_Auu, Vec_Aup, Vec_Apu, Vec_App, Vec_Au, Vec_Ap end + +function allocate_matrix(a::Function,rhs::Function,U,V ) + feop1 = AffineFEOperator(a,rhs,U,V) + Mat = get_matrix(feop1) + return Mat +end + +function allocate_matrix_and_vector(a::Function,rhs::Function,U,V ) + feop1 = AffineFEOperator(a,rhs,U,V) + Mat = get_matrix(feop1) + Vec = get_vector(feop1) + return Mat, Vec +end + + function update_all_matrices_vectors!(matrices::Tuple, u_adv, params, simcase) Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, Mat_ML, Mat_inv_ML, Mat_S, Vec_Auu, Vec_Aup, Vec_Apu, Vec_App, Vec_Au, Vec_Ap = matrices @@ -144,16 +159,22 @@ function update_all_matrices_vectors!(matrices::Tuple, u_adv, params, simcase) Tuu, Tpu, Auu, Aup, Apu, App, ML, S, rhs = segregated_equations(u_adv, params, simcase) - assemble_matrix!(Tuu,Mat_Tuu,Utn1, V) - assemble_matrix!(Tpu, Mat_Tpu, Utn1, Q) + update_matrix!(Tuu,Mat_Tuu,Utn1, V) + update_matrix!(Tpu, Mat_Tpu, Utn1, Q) + + # update_matrix_vector!(Auu,Mat_Auu,Vec_Auu,Utn1,V) + # update_matrix_vector!(Aup,Mat_Aup,Vec_Aup,Ptn1,V) + # update_matrix_vector!(Apu,Mat_Apu,Vec_Apu,Utn1,Q) + # update_matrix_vector!(App,Mat_App,Vec_App,Ptn1,Q) - assemble_matrix_and_vector!(Auu,rhs,Mat_Auu,Vec_Auu,Utn1,V) - assemble_matrix_and_vector!(Aup,rhs,Mat_Aup,Vec_Auu,Ptn1,V) - assemble_matrix_and_vector!(Apu,rhs,Mat_Apu,Vec_Apu,Utn1,Q) - assemble_matrix_and_vector!(App,rhs,Mat_App,Vec_App,Ptn1,Q) - assemble_matrix!(ML,Mat_ML,Utn1, V) - assemble_matrix!(S,Mat_S,Ptn1, Q) + + println("norm Vec_App = $(norm(Vec_App))") + update_matrix_vector!(App,Mat_App,Vec_App,Ptn1,Q) + println("norm Vec_App = $(norm(Vec_App))") + + update_matrix!(ML,Mat_ML,Utn1, V) + update_matrix!(S,Mat_S,Ptn1, Q) Mat_inv_ML = allocate_Mat_inv_ML(Mat_ML) @@ -165,27 +186,28 @@ function update_all_matrices_vectors!(matrices::Tuple, u_adv, params, simcase) end -# function update_matrix_vector!(A::AbstractMatrix, b::AbstractVector, a::Function, U, V) -# dv = get_fe_basis(V) -# du = get_trial_fe_basis(U) +function update_matrix_vector!( a::Function, A::AbstractMatrix, b::AbstractVector, U, V) + dv = get_fe_basis(V) + du = get_trial_fe_basis(U) -# mat_contribs = a(du, dv) -# uhd = zero(U) -# data = collect_cell_matrix_and_vector(U, V, mat_contribs, 0.0, uhd) -# assembler = SparseMatrixAssembler(U, V) -# assemble_matrix_and_vector!(A, b, assembler, data) -# end + mat_contribs = a(du, dv) -# function update_matrix!(A::AbstractMatrix, a::Function, U, V) -# dv = get_fe_basis(V) -# du = get_trial_fe_basis(U) + uhd = zero(U) + data = collect_cell_matrix_and_vector(U, V, mat_contribs, 0.0, uhd) + assembler = SparseMatrixAssembler(U, V) + assemble_matrix_and_vector!(A, b, assembler, data) +end -# mat_contribs = a(du, dv) -# data = collect_cell_matrix(U, V, mat_contribs) +function update_matrix!(a::Function, A::AbstractMatrix, U, V) + dv = get_fe_basis(V) + du = get_trial_fe_basis(U) -# assembler = SparseMatrixAssembler(U, V) -# assemble_matrix!(A, assembler, data) -# end + mat_contribs = a(du, dv) + data = collect_cell_matrix(U, V, mat_contribs) + + assembler = SparseMatrixAssembler(U, V) + assemble_matrix!(A, assembler, data) +end end \ No newline at end of file From fe7ae3b853112902dd741eabcd8c03ae0f61bcd8 Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 5 Sep 2025 11:59:26 +0200 Subject: [PATCH 22/42] update_matrix_vector! --- src/Commons/MatrixCreation.jl | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Commons/MatrixCreation.jl b/src/Commons/MatrixCreation.jl index 54a69079..b45b679f 100644 --- a/src/Commons/MatrixCreation.jl +++ b/src/Commons/MatrixCreation.jl @@ -162,16 +162,11 @@ function update_all_matrices_vectors!(matrices::Tuple, u_adv, params, simcase) update_matrix!(Tuu,Mat_Tuu,Utn1, V) update_matrix!(Tpu, Mat_Tpu, Utn1, Q) - # update_matrix_vector!(Auu,Mat_Auu,Vec_Auu,Utn1,V) - # update_matrix_vector!(Aup,Mat_Aup,Vec_Aup,Ptn1,V) - # update_matrix_vector!(Apu,Mat_Apu,Vec_Apu,Utn1,Q) - # update_matrix_vector!(App,Mat_App,Vec_App,Ptn1,Q) - - - - println("norm Vec_App = $(norm(Vec_App))") + update_matrix_vector!(Auu,Mat_Auu,Vec_Auu,Utn1,V) + update_matrix_vector!(Aup,Mat_Aup,Vec_Aup,Ptn1,V) + update_matrix_vector!(Apu,Mat_Apu,Vec_Apu,Utn1,Q) update_matrix_vector!(App,Mat_App,Vec_App,Ptn1,Q) - println("norm Vec_App = $(norm(Vec_App))") + update_matrix!(ML,Mat_ML,Utn1, V) update_matrix!(S,Mat_S,Ptn1, Q) From d1a578ff8f487938a256a6d843a75608a692beb5 Mon Sep 17 00:00:00 2001 From: carlodev Date: Thu, 16 Oct 2025 15:03:48 +0200 Subject: [PATCH 23/42] restart from 3D solution --- src/Commons/CreateProblem/CreateProblem.jl | 1 + .../CreateProblem/InitialConditions.jl | 4 +-- src/Commons/CreateProblem/Restart.jl | 31 ++++++++++++++----- 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/src/Commons/CreateProblem/CreateProblem.jl b/src/Commons/CreateProblem/CreateProblem.jl index 4f37328f..6ce2db5c 100644 --- a/src/Commons/CreateProblem/CreateProblem.jl +++ b/src/Commons/CreateProblem/CreateProblem.jl @@ -11,6 +11,7 @@ using PartitionedArrays using CSV using DataFrames using NearestNeighbors +using Statistics using SegregatedVMSSolver using SegregatedVMSSolver.ParametersDef diff --git a/src/Commons/CreateProblem/InitialConditions.jl b/src/Commons/CreateProblem/InitialConditions.jl index d8288e34..f38b7b7c 100644 --- a/src/Commons/CreateProblem/InitialConditions.jl +++ b/src/Commons/CreateProblem/InitialConditions.jl @@ -18,8 +18,8 @@ function create_initial_conditions(simcase::VelocityBoundaryCase, params::Dict{S if restart @sunpack restartfile =simcase restart_df = DataFrame(CSV.File(restartfile)) - tree = create_search_tree(restart_df) - uh_0 = restart_uh_field(D,tree,restart_df) + tree, s, = create_search_tree(restart_df) + uh_0 = restart_uh_field(D,s,tree,restart_df) ph_0 = restart_ph_field(tree,restart_df) uh0 = interpolate(uh_0, Ut0) ph0 = interpolate(ph_0, Pt0) diff --git a/src/Commons/CreateProblem/Restart.jl b/src/Commons/CreateProblem/Restart.jl index ab2a5034..32ce9f48 100644 --- a/src/Commons/CreateProblem/Restart.jl +++ b/src/Commons/CreateProblem/Restart.jl @@ -6,11 +6,21 @@ Create a BruteTree from the NearestNeighbors.jl package taking the coordinates points as input """ function create_search_tree(restart_df::DataFrame) + data = [] + s = 2 #it stores the info if the dataframe is 3D or 2D + if maximum(abs.(restart_df.uh_2)) > 1e-10 + @info "3D Intialization - it can take a while" + data = vcat(restart_df.Points_0',restart_df.Points_1',restart_df.Points_2') + s = 3 + else + @info "2D Intialization - third velocity component = 0" + data = vcat(restart_df.Points_0',restart_df.Points_1') + s = 2 + end - data = vcat(restart_df.Points_0',restart_df.Points_1') brutetree = BruteTree(data; leafsize = 12) - return brutetree + return brutetree, s end @@ -20,17 +30,24 @@ end It provides a suitable function which gives for each point the specified velocity in `restart_file`. It is used as initial condition for restarting a simulation at a specific time step. """ -function restart_uh_field(D::Int64,tree,restart_df::DataFrame) +function restart_uh_field(D::Int64,s::Int64, tree,restart_df::DataFrame) + + if D == 2 + s = 2 + end - @info "Restarting uh0 ..." + @assert s <= D "Restart DataFrame is $(s) dimensional, the dimension of the problem is $(D). Set uh_2 column == 0 to solve the problem" + @info "Restarting uh0 ..." function u0(x) - p = [x...][1:2] + p = [x...][1:s] idx, _ = nn(tree, p) if D == 2 return VectorValue(restart_df.uh_0[idx], restart_df.uh_1[idx]) - elseif D==3 - return VectorValue(restart_df.uh_0[idx], restart_df.uh_1[idx], 0.0) + elseif D==3 && s == 2 + return VectorValue(restart_df.uh_0[idx], restart_df.uh_1[idx], 0.0) + elseif D == 3 && s == 3 + return VectorValue(restart_df.uh_0[idx], restart_df.uh_1[idx], restart_df.uh_2[idx]) end end From 590c1eafa2ec577e169ba2587e440ff7ba50c78e Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 17 Oct 2025 09:11:09 +0200 Subject: [PATCH 24/42] fix precompilation --- src/Commons/SolverOptions.jl | 34 ++++++++++++++++++++++++++++------ src/SegregatedVMSSolver.jl | 2 +- 2 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/Commons/SolverOptions.jl b/src/Commons/SolverOptions.jl index a26ef658..dd7c549f 100644 --- a/src/Commons/SolverOptions.jl +++ b/src/Commons/SolverOptions.jl @@ -3,6 +3,7 @@ using Gridap using GridapDistributed using GridapPETSc using GridapPETSc.PETSC +using PartitionedArrays using Gridap.Algebra using MPI @@ -49,6 +50,14 @@ function petsc_options_airfoil() -pres_ksp_type cg -pres_pc_type gamg -pres_ksp_rtol 1.e-2 -pres_ksp_converged_reason -ksp_atol 0.0" end + +# Wrap the VMS NumericalSetup to allow specialized methods that omit +# garbage collection at every time step. +struct VMSPETScNS{T} <: NumericalSetup + ns::PETScLinearSolverNS{T} +end + + """ create_PETSc_setup(M::AbstractMatrix,ksp_setup::Function) @@ -59,32 +68,45 @@ function create_PETSc_setup(M::AbstractMatrix,ksp_setup::Function) ss = symbolic_setup(solver, M) ns = numerical_setup(ss, M) # @check_error_code GridapPETSc.PETSC.KSPView(ns.ksp[],C_NULL) - return ns + return VMSPETScNS(ns) end -function Algebra.numerical_setup!(ns::PETScLinearSolverNS,A::AbstractMatrix) +function Algebra.numerical_setup!(vmsns::VMSPETScNS,A::AbstractMatrix) + ns = vmsns.ns ns.A = A println("convert") @time ns.B = convert(PETScMatrix,A) @check_error_code PETSC.KSPSetOperators(ns.ksp[],ns.B.mat[],ns.B.mat[]) # @time @check_error_code PETSC.KSPSetUp(ns.ksp[]) - ns + return ns end -function Algebra.solve!(x::PETScVector,ns::PETScLinearSolverNS,b::AbstractVector) +function Algebra.solve!(x::PartitionedArrays.PVector,vmsns::VMSPETScNS,b::PartitionedArrays.PVector) + ns = vmsns.ns + X = similar(b,(axes(ns.A)[2],)) + B = similar(b,(axes(ns.A)[2],)) + copy!(X,x) + copy!(B,b) + Y = convert(PETScVector,X) + solve!(Y,vmsns,B) + copy!(x,Y) + x +end +function Algebra.solve!(x::PETScVector,vmsns::VMSPETScNS,b::AbstractVector) # if MPI.Initialized() # if petsc_gc && (x.comm != MPI.COMM_SELF) # # gridap_petsc_gc() # Do garbage collection of PETSc objects # end # end + ns = vmsns.ns + B = convert(PETScVector,b) solve!(x,ns,B) x + return x end - - end \ No newline at end of file diff --git a/src/SegregatedVMSSolver.jl b/src/SegregatedVMSSolver.jl index 5b0342ba..8015d8e8 100644 --- a/src/SegregatedVMSSolver.jl +++ b/src/SegregatedVMSSolver.jl @@ -1,6 +1,6 @@ module SegregatedVMSSolver -__precompile__(false) +# __precompile__(false) include(joinpath("Commons","SolverOptions.jl")) include(joinpath("Commons","Interfaces.jl")) From 0839b2201705e220bfc93f662eec100da5cf3fee Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 17 Oct 2025 10:03:23 +0200 Subject: [PATCH 25/42] updt compat --- Project.toml | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Project.toml b/Project.toml index 4a6f8da4..846d4f48 100644 --- a/Project.toml +++ b/Project.toml @@ -32,29 +32,29 @@ Trapz = "592b5752-818d-11e9-1e9a-2b8ca4a44cd1" UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" [compat] -CSV = "^0.10.15" -DataFrames = "^1.7.0" -DataInterpolations = "^8.0.1" -DelimitedFiles = "^1.9.1" -FFTW = "^1.9.0" -FileIO = "^1.17.0" -FillArrays = "^1.13.0" -Gridap = "^0.18.12" -GridapDistributed = "^0.4.7" -GridapGmsh = "^0.7.2" -GridapPETSc = "^0.5.3" -LinearAlgebra = "^1.11.0" -MPI = "^0.20.22" -NearestNeighbors = "^0.4.21" -Parameters = "^0.12.3" -PartitionedArrays = "^0.3.4" -Pkg = "^1.11.0" -Random = "^1.11.0" -Revise = "^3.8.0" -ScatteredInterpolation = "^0.3.6" -SparseArrays = "^1.11.0" -Statistics = "^1.11.1" -SyntheticEddyMethod = "^0.4.4" -Test = "^1.11.0" -Trapz = "^2.0.3" -UnPack = "^1.0.2" \ No newline at end of file +CSV = "=0.10.15" +DataFrames = "=1.7.0" +DataInterpolations = "=8.0.1" +DelimitedFiles = "=1.9.1" +FFTW = "=1.9.0" +FileIO = "=1.17.0" +FillArrays = "=1.13.0" +Gridap = "=0.18.12" +GridapDistributed = "=0.4.7" +GridapGmsh = "=0.7.2" +GridapPETSc = "=0.5.3" +LinearAlgebra = "=1.11.0" +MPI = "=0.20.22" +NearestNeighbors = "=0.4.21" +Parameters = "=0.12.3" +PartitionedArrays = "=0.3.4" +Pkg = "=1.11.0" +Random = "=1.11.0" +Revise = "=3.8.0" +ScatteredInterpolation = "=0.3.6" +SparseArrays = "=1.11.0" +Statistics = "=1.11.1" +SyntheticEddyMethod = "=0.4.4" +Test = "=1.11.0" +Trapz = "=2.0.3" +UnPack = "=1.0.2" \ No newline at end of file From e7428a2cea6474afd41e3776ae9dc6a1ffe7815a Mon Sep 17 00:00:00 2001 From: carlodev Date: Mon, 20 Oct 2025 16:56:23 +0200 Subject: [PATCH 26/42] normalization tgv error with anlytical --- src/Commons/ExportUtility.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Commons/ExportUtility.jl b/src/Commons/ExportUtility.jl index 48fd0dde..dbf366a9 100644 --- a/src/Commons/ExportUtility.jl +++ b/src/Commons/ExportUtility.jl @@ -456,8 +456,8 @@ function compute_error(simcase::TaylorGreen{Periodic}, params::Dict{Symbol,Any}, ep = ph_analytic - ph #error pressure #L2 norm error velocity and pressure - l2eu = sqrt(sum(∫(eu ⋅ eu) * dΩ)) ./sqrt(sum(∫(uh ⋅ uh) * dΩ)) - l2ep = sqrt(sum(∫(ep * ep) * dΩ)) ./ sqrt(sum(∫(ph ⋅ ph) * dΩ)) + l2eu = sqrt(sum(∫(eu ⋅ eu) * dΩ)) ./sqrt(sum(∫(uh_analytic ⋅ uh_analytic) * dΩ)) + l2ep = sqrt(sum(∫(ep * ep) * dΩ)) ./ sqrt(sum(∫(uh_analytic ⋅ uh_analytic) * dΩ)) ALLOWED_EXPORTS = ["VelocityError", "PressureError"] selected_exports = intersect(ALLOWED_EXPORTS, simcase.simulationp.exportp.extra_export) From 19c8fa4a32311ef2a6489c44d142204731c5af15 Mon Sep 17 00:00:00 2001 From: carlodev Date: Mon, 20 Oct 2025 17:19:13 +0200 Subject: [PATCH 27/42] bug fix --- src/Commons/ExportUtility.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commons/ExportUtility.jl b/src/Commons/ExportUtility.jl index dbf366a9..0c03c23e 100644 --- a/src/Commons/ExportUtility.jl +++ b/src/Commons/ExportUtility.jl @@ -457,7 +457,7 @@ function compute_error(simcase::TaylorGreen{Periodic}, params::Dict{Symbol,Any}, #L2 norm error velocity and pressure l2eu = sqrt(sum(∫(eu ⋅ eu) * dΩ)) ./sqrt(sum(∫(uh_analytic ⋅ uh_analytic) * dΩ)) - l2ep = sqrt(sum(∫(ep * ep) * dΩ)) ./ sqrt(sum(∫(uh_analytic ⋅ uh_analytic) * dΩ)) + l2ep = sqrt(sum(∫(ep * ep) * dΩ)) ./ sqrt(sum(∫(ph_analytic ⋅ ph_analytic) * dΩ)) ALLOWED_EXPORTS = ["VelocityError", "PressureError"] selected_exports = intersect(ALLOWED_EXPORTS, simcase.simulationp.exportp.extra_export) From 11442e0ff5803ebc679e9b1d62eb5e6a19c38167 Mon Sep 17 00:00:00 2001 From: carlodev <100294007+carlodev@users.noreply.github.com> Date: Mon, 20 Oct 2025 19:53:47 +0200 Subject: [PATCH 28/42] revert uh ph to normalize error --- src/Commons/ExportUtility.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Commons/ExportUtility.jl b/src/Commons/ExportUtility.jl index 0c03c23e..a8faddbe 100644 --- a/src/Commons/ExportUtility.jl +++ b/src/Commons/ExportUtility.jl @@ -456,8 +456,8 @@ function compute_error(simcase::TaylorGreen{Periodic}, params::Dict{Symbol,Any}, ep = ph_analytic - ph #error pressure #L2 norm error velocity and pressure - l2eu = sqrt(sum(∫(eu ⋅ eu) * dΩ)) ./sqrt(sum(∫(uh_analytic ⋅ uh_analytic) * dΩ)) - l2ep = sqrt(sum(∫(ep * ep) * dΩ)) ./ sqrt(sum(∫(ph_analytic ⋅ ph_analytic) * dΩ)) + l2eu = sqrt(sum(∫(eu ⋅ eu) * dΩ)) ./sqrt(sum(∫(uh ⋅ uh) * dΩ)) + l2ep = sqrt(sum(∫(ep * ep) * dΩ)) ./ sqrt(sum(∫(ph ⋅ ph) * dΩ)) ALLOWED_EXPORTS = ["VelocityError", "PressureError"] selected_exports = intersect(ALLOWED_EXPORTS, simcase.simulationp.exportp.extra_export) @@ -557,4 +557,4 @@ end -end # end module \ No newline at end of file +end # end module From 19589909694769d4ae122039b1fa88f435bf53f8 Mon Sep 17 00:00:00 2001 From: carlodev Date: Wed, 22 Oct 2025 11:07:01 +0200 Subject: [PATCH 29/42] tgv 2D error absolute and relative --- TGV_L2_absolute_ERRRORS.csv | 146 ++++++++++++++++++++++++++++++++++++ TGV_L2_relative_ERRRORS.csv | 146 ++++++++++++++++++++++++++++++++++++ 2 files changed, 292 insertions(+) create mode 100644 TGV_L2_absolute_ERRRORS.csv create mode 100644 TGV_L2_relative_ERRRORS.csv diff --git a/TGV_L2_absolute_ERRRORS.csv b/TGV_L2_absolute_ERRRORS.csv new file mode 100644 index 00000000..37e920db --- /dev/null +++ b/TGV_L2_absolute_ERRRORS.csv @@ -0,0 +1,146 @@ +time,VelocityError,PressureError +0.01,0.00025253817108120325,0.004069576172133254 +0.02,0.0005136425431054051,0.002163953989422518 +0.03,0.0007556446480630974,0.002435962603319504 +0.04,0.0010049306414511474,0.0027118445040605053 +0.05,0.0012535414473614304,0.002642529652029848 +0.06,0.0015012949632415376,0.0027582265715153324 +0.07,0.0017488707529352836,0.002868091131212968 +0.08,0.001996062458326427,0.0029691955564937816 +0.09,0.002242944768297834,0.0030939594103017234 +0.1,0.0024895773837432075,0.0032260667140354663 +0.11,0.0027360205568579786,0.003366730036958924 +0.12,0.0029823379285940613,0.0035165389969408524 +0.13,0.0032286153738063923,0.0036746792386952694 +0.14,0.003474930946613479,0.003840218060243836 +0.15,0.003721382391202468,0.004013730742154784 +0.16,0.003968062663460289,0.004194268433179395 +0.17,0.0042150806998400535,0.00438247300830002 +0.18,0.004462542109598001,0.004577631090086977 +0.19,0.004710565408661543,0.004780480615960376 +0.2,0.004959266029749038,0.0049903799885994155 +0.21,0.0052087693549472,0.0052080910487915955 +0.22,0.0054591975066000595,0.005432929171637645 +0.23,0.005710679896884896,0.0056655603768461715 +0.24,0.0059633422897594,0.005905159140185867 +0.25,0.006217315368610169,0.0061522325528514275 +0.26,0.006472725689067154,0.006405809863931449 +0.27,0.006729702685336403,0.0066662861702886985 +0.28,0.006988371202586094,0.00693263016638791 +0.29,0.007248857230751169,0.007205225033732663 +0.3,0.0075112817243973935,0.007483063231709162 +0.31,0.007775765267469429,0.0077665530956409256 +0.32,0.008042422979262028,0.008054698483096215 +0.33,0.008311368321830688,0.008347867062247003 +0.34,0.00858270898405765,0.008644981354161975 +0.35,0.008856550017156418,0.00894626931515349 +0.36,0.009132990588647538,0.009250508401499567 +0.37,0.00941212656118114,0.009557764194859703 +0.38,0.009694047974337733,0.009866692903610428 +0.39,0.00997884113926613,0.01017727524436516 +0.4,0.010266586693507931,0.010488155129256473 +0.41,0.010557361277396548,0.010799336050987068 +0.42,0.010851236023541232,0.011109548618597502 +0.43,0.011148277884936511,0.011418886048574595 +0.44,0.011448548468986323,0.011726199046752853 +0.45,0.011752105084361197,0.012031666348309168 +0.46,0.012058999891950868,0.012334228143094829 +0.47,0.012369280719718857,0.01263409874805922 +0.48,0.012682990553674224,0.012930250186526736 +0.49,0.013000168122936332,0.01322287898188284 +0.5,0.013320847752266177,0.013510958240374599 +0.51,0.013645059662131488,0.013794649999679137 +0.52,0.013972830167940356,0.014072936612007007 +0.53,0.014304181630618893,0.01434597744452148 +0.54,0.014639132957975257,0.014612812444367542 +0.55,0.014977699203455977,0.014873652605174573 +0.56,0.015319892313185306,0.015127648648851173 +0.57,0.015665720469139926,0.015375103531783195 +0.58,0.016015189009829428,0.01561530297253511 +0.59,0.01636829968499036,0.015848645131980105 +0.6,0.016725051645750052,0.016074537184012472 +0.61,0.01708544078577942,0.016293444734399087 +0.62,0.017449460664530618,0.016504863294593723 +0.63,0.017817102056363904,0.016709292484418752 +0.64,0.018188353669589128,0.016906290064431232 +0.65,0.018563201951689066,0.017096373134850414 +0.66,0.018941631534553922,0.017279157398416976 +0.67,0.019323625296365412,0.01745518281034661 +0.68,0.01970916457773177,0.01762413597611763 +0.69,0.020098229460202666,0.017786594628885915 +0.7,0.020490798870921565,0.017942329323006687 +0.71,0.020886850968773716,0.018091961529573264 +0.72,0.021286363241577073,0.018235342529879447 +0.73,0.021689312827546058,0.018373123300631147 +0.74,0.022095676659206753,0.01850521198693088 +0.75,0.02250543156404538,0.0186322577408617 +0.76,0.022918554487711695,0.01875419064651661 +0.77,0.02333502231529468,0.01887162377488761 +0.78,0.02375481219805694,0.018984479283733126 +0.79,0.024177901130538297,0.019093312348200445 +0.8,0.024604266367370734,0.019198024893090852 +0.81,0.02503388482914124,0.019299112914854026 +0.82,0.0254667335529717,0.019396466805524083 +0.83,0.02590278901210108,0.019490541639951005 +0.84,0.026342027549073176,0.019581241762584526 +0.85,0.026784424710779818,0.019669012715296193 +0.86,0.027229955659988786,0.019753807766524644 +0.87,0.027678594627981404,0.01983610003113995 +0.88,0.028130315333223913,0.01991592988409526 +0.89,0.028585090611551466,0.01999383306279235 +0.9,0.029042892859111262,0.0200699701391524 +0.91,0.029503693832163502,0.020144972556690538 +0.92,0.029967465095718814,0.02021914628055536 +0.93,0.030434177938053295,0.02029323684695323 +0.94,0.03090380378606869,0.020367709445091607 +0.95,0.031376314176048595,0.02044343034490591 +0.96,0.03185168110138661,0.02052102351017648 +0.97,0.032329877006329506,0.020601468966473715 +0.98,0.032810875045250834,0.02068553575169221 +0.99,0.03329464909189366,0.02077429841296378 +1.0,0.033781173903252235,0.02086864580510614 +1.01,0.03427042515228208,0.020969717106644484 +1.02,0.03476237950108574,0.021078485503963414 +1.03,0.03525701466004588,0.02119611445826831 +1.04,0.03575430937348616,0.021323615461725533 +1.05,0.03625424348097713,0.021462126210667655 +1.06,0.03675679781578854,0.02161263854224481 +1.07,0.0372619542333528,0.0217762022497357 +1.08,0.037769695454457464,0.02195372112492891 +1.09,0.03828000505926295,0.02214608455606048 +1.1,0.03879286735174141,0.022354030772050094 +1.11,0.03930826733877937,0.022578210785429122 +1.12,0.039826190671316264,0.02281911734466804 +1.13,0.04034662358735621,0.023077087849674226 +1.14,0.04086955291149626,0.023352297758835575 +1.15,0.04139496590940323,0.023644710338321627 +1.16,0.04192285030272606,0.023954133020527946 +1.17,0.04245319403330929,0.024280121438507874 +1.18,0.04298598529510981,0.024622096315133964 +1.19,0.04352121227573942,0.024979208549647476 +1.2,0.044058863226943454,0.025350511011170498 +1.21,0.04459892625232805,0.025734789829648854 +1.22,0.04514138940379841,0.02613078279619582 +1.23,0.04568624054113001,0.026536979623447712 +1.24,0.04623346741558134,0.02695187712746065 +1.25,0.04678305760188496,0.027373750320138668 +1.26,0.04733499854060246,0.027800934718277014 +1.27,0.047889277534856764,0.028231570995727987 +1.28,0.04844588174277508,0.02866390684390375 +1.29,0.04900479822554646,0.02909601977775547 +1.3,0.04956601390533133,0.029526133678795433 +1.31,0.050129515660990984,0.029952325863829052 +1.32,0.05069529029328392,0.03037285526670859 +1.33,0.05126332466978508,0.030785859932065198 +1.34,0.05183360572629681,0.031189694033326044 +1.35,0.052406120627332506,0.03158262053007921 +1.36,0.052980856778843684,0.0319631533566473 +1.37,0.05355780193662498,0.03232974807038597 +1.38,0.05413694418621842,0.032681144693182916 +1.39,0.05471827196393145,0.03301605790293186 +1.4,0.055301774003231254,0.033333515973923124 +1.41,0.055887439296969495,0.033632551851921065 +1.42,0.05647525704208753,0.03391253438971939 +1.43,0.057065216581841154,0.03417286213192027 +1.44,0.0576573073509969,0.034413283759068714 +1.45,0.058251518793764834,0.034633598389629414 diff --git a/TGV_L2_relative_ERRRORS.csv b/TGV_L2_relative_ERRRORS.csv new file mode 100644 index 00000000..44d57655 --- /dev/null +++ b/TGV_L2_relative_ERRRORS.csv @@ -0,0 +1,146 @@ +time,VelocityError,PressureError +0.01,0.0003182909775530546,0.016293461972734322 +0.02,0.0006476320382118551,0.00867243080653409 +0.03,0.0009531361772987464,0.00977219375624413 +0.04,0.001268070509886834,0.010889673724248733 +0.05,0.0015823988135456903,0.01062181137219153 +0.06,0.0018958901909226968,0.01109780999179004 +0.07,0.0022094019538651693,0.011551248449727753 +0.08,0.002522673106718679,0.011970255265338568 +0.09,0.0028357975787342187,0.012485555032655428 +0.1,0.003148850489520286,0.013031524265364722 +0.11,0.0034619077740450934,0.013613155266565934 +0.12,0.0037750497757108492,0.014232938529514908 +0.13,0.004088385118336737,0.014887686086390926 +0.14,0.004402012688250767,0.015573717210430714 +0.15,0.004716056479084079,0.016293457983805118 +0.16,0.005030634607349068,0.017043150675206623 +0.17,0.005345885641333005,0.01782549271694544 +0.18,0.005661944143607086,0.018637674157611233 +0.19,0.005978961267987444,0.019482788574338137 +0.2,0.0062970844882565,0.020358313763494108 +0.21,0.006616474145352784,0.021267448365432103 +0.22,0.006937286686614005,0.022207490946673073 +0.23,0.007259688068936767,0.02318125551945218 +0.24,0.007583839866555548,0.024185458193214035 +0.25,0.007909910162212094,0.025222265227280126 +0.26,0.008238062044795774,0.026287786581194482 +0.27,0.00856846251990242,0.027383727283422397 +0.28,0.008901273005387619,0.028505933780539172 +0.29,0.009236656626242352,0.02965605784093297 +0.3,0.00957477033960897,0.03083002786834327 +0.31,0.009915770870954847,0.03202959515808711 +0.32,0.010259808214749927,0.033250719942232505 +0.33,0.010607030480055289,0.03449498187737334 +0.34,0.010957578631680478,0.03575798921724163 +0.35,0.011311590480616434,0.037040737704736766 +0.36,0.011669196530142685,0.038338215394451425 +0.37,0.012030523257539994,0.03965073426943191 +0.38,0.01239568988596764,0.04097275485368077 +0.39,0.012764811049512556,0.04230422133620636 +0.4,0.013137994294789308,0.04363951540799619 +0.41,0.01351534221300716,0.04497865909930145 +0.42,0.013896950495615156,0.046316367782523855 +0.43,0.014282909622214441,0.04765302234030131 +0.44,0.014673303355822998,0.048983814837302846 +0.45,0.015068210071885265,0.050309471409918594 +0.46,0.015467701658582191,0.05162553710778252 +0.47,0.015871844549663446,0.052932877609070984 +0.48,0.016280699060285304,0.05422715211553848 +0.49,0.016694320126314815,0.05550914314445412 +0.5,0.01711275710431916,0.0567744954552763 +0.51,0.01753605414626009,0.05802383763264872 +0.52,0.017964250445444717,0.05925283388666415 +0.53,0.01839738016325646,0.06046209200954544 +0.54,0.018835473064403592,0.06164749978794238 +0.55,0.019278553991869608,0.06280987409268801 +0.56,0.019726643819244532,0.06394555332779232 +0.57,0.020179758596900972,0.06505573695339076 +0.58,0.020637910729047675,0.06613732090138577 +0.59,0.021101108005835267,0.0671919053064007 +0.6,0.02156935487136529,0.0682168912584039 +0.61,0.022042651567199156,0.06921416593770871 +0.62,0.022520995315795492,0.07018149914896128 +0.63,0.023004379732537734,0.07112092591042253 +0.64,0.023492795747516337,0.07203047659739202 +0.65,0.023986231348681317,0.07291226534481662 +0.66,0.024484672151711396,0.07376456675868046 +0.67,0.024988101475489483,0.07458959831743457 +0.68,0.02549650061730607,0.07538593629364577 +0.69,0.02600984920943618,0.07615596699573114 +0.7,0.026528125351460714,0.0768986268589808 +0.71,0.02705130610747496,0.07761649880084083 +0.72,0.02757936763007062,0.07830886864234558 +0.73,0.028112285575296343,0.07897845709126242 +0.74,0.02865003528836612,0.07962479947463379 +0.75,0.029192591933676137,0.08025062099621194 +0.76,0.029739930784155193,0.08085555762081004 +0.77,0.030292026989528115,0.08144219148930094 +0.78,0.030848856000449846,0.0820101304234548 +0.79,0.03141039301974767,0.08256171804665371 +0.8,0.031976613543713915,0.08309647983040207 +0.81,0.03254749259027358,0.08361651338073375 +0.82,0.033123005284166354,0.08412129821970961 +0.83,0.033703125971897105,0.08461276331508036 +0.84,0.03428782878415498,0.0850904521411241 +0.85,0.03487708676959526,0.08555626054897113 +0.86,0.035470872428896,0.08600994855525831 +0.87,0.036069157000480134,0.08645354099561256 +0.88,0.03667191100395512,0.08688718286248875 +0.89,0.037279103756508815,0.08731318303239871 +0.9,0.037890703948555496,0.08773221959369502 +0.91,0.03850667938131792,0.08814703372124834 +0.92,0.03912699755095932,0.08855895187867788 +0.93,0.03975162553642039,0.08897123299769885 +0.94,0.04038053054142935,0.08938591856714137 +0.95,0.0410136798565961,0.08980682006336267 +0.96,0.04165104131436832,0.09023669851653589 +0.97,0.042292583281966535,0.09067989307712361 +0.98,0.04293827500178995,0.0911398303781718 +0.99,0.043588086605273246,0.09162129790428879 +1.0,0.04424198932929698,0.09212828218215852 +1.01,0.04489995556123628,0.09266589154909553 +1.02,0.0455619589371594,0.09323852012254358 +1.03,0.04622797442182275,0.09385142169075227 +1.04,0.04689797829247363,0.09450919704275776 +1.05,0.047571948221871045,0.09521702481281565 +1.06,0.0482498631477178,0.09597945608415001 +1.07,0.048931703312516346,0.09680131725665378 +1.08,0.049617450060123955,0.0976868038182962 +1.09,0.05030708583004866,0.09864006332917201 +1.1,0.05100059398137223,0.09966458542422364 +1.11,0.05169795876707006,0.10076348389366689 +1.12,0.05239916525831969,0.10193917740478298 +1.13,0.05310419927109791,0.10319339907743065 +1.14,0.05381304736702222,0.10452716356574711 +1.15,0.05452569666312879,0.1059405383456118 +1.16,0.05524213485261908,0.10743289179339996 +1.17,0.0559623498951775,0.10900245890948089 +1.18,0.05668633005960202,0.11064686100630475 +1.19,0.057414063583463945,0.11236249582325084 +1.2,0.05814553876609166,0.11414530504114495 +1.21,0.058880743688471154,0.11599001167298152 +1.22,0.059619666340229416,0.11789109941779462 +1.23,0.06036229443395188,0.1198419095001197 +1.24,0.061108615515199874,0.12183578863183614 +1.25,0.061858616872299904,0.12386505330771536 +1.26,0.06261228559191068,0.1259222634821244 +1.27,0.06336960855434783,0.12799906612530754 +1.28,0.06413057242322065,0.13008756074482783 +1.29,0.06489516370869391,0.1321790424488993 +1.3,0.06566336871147019,0.134265437481572 +1.31,0.06643517364929316,0.1363379730496876 +1.32,0.06721056461068334,0.1383886692537883 +1.33,0.06798952774693097,0.14040896340972242 +1.34,0.06877204927412343,0.14239124584742685 +1.35,0.06955811568631246,0.1443274601933947 +1.36,0.07034771377297748,0.14621066652956316 +1.37,0.07114083076361666,0.14803363050326718 +1.38,0.0719374543019144,0.14979039331665558 +1.39,0.0727375724745015,0.15147485671934416 +1.4,0.07354117374054336,0.15308233894252127 +1.41,0.07434824688222595,0.1546081616296403 +1.42,0.07515878093181173,0.15604917408494023 +1.43,0.07597276509522624,0.1574023504141882 +1.44,0.07679018867942694,0.15866626761406014 +1.45,0.07761104098328185,0.15983973035920085 From 5b55339e8f0a2db1b576060bce455ff66e908de4 Mon Sep 17 00:00:00 2001 From: carlodev Date: Wed, 22 Oct 2025 11:12:20 +0200 Subject: [PATCH 30/42] tgv2d error update --- src/Commons/ExportUtility.jl | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/src/Commons/ExportUtility.jl b/src/Commons/ExportUtility.jl index a8faddbe..55513bb5 100644 --- a/src/Commons/ExportUtility.jl +++ b/src/Commons/ExportUtility.jl @@ -447,35 +447,50 @@ Compute L2 error norm for velocity and pressure for TGV2D case. https://doi.org/ """ function compute_error(simcase::TaylorGreen{Periodic}, params::Dict{Symbol,Any}, tn::Float64, fields::Tuple) uh, ph = fields - + @unpack U,P = params uh_analytic = simcase.bc_type.a_solution[:velocity](tn) # Compute analytic velocity at tn ph_analytic = simcase.bc_type.a_solution[:pressure](tn) # Compute analytic pressure at tn + uha =interpolate(uh_analytic, U(tn)) + pha = interpolate(ph_analytic, P(tn)) + @unpack dΩ,parts = params eu = uh_analytic - uh #error velocity ep = ph_analytic - ph #error pressure + + + #L2 norm error velocity and pressure - l2eu = sqrt(sum(∫(eu ⋅ eu) * dΩ)) ./sqrt(sum(∫(uh ⋅ uh) * dΩ)) - l2ep = sqrt(sum(∫(ep * ep) * dΩ)) ./ sqrt(sum(∫(ph ⋅ ph) * dΩ)) + l2eu_rel = sqrt(sum(∫(eu ⋅ eu) * dΩ)) ./sqrt(sum(∫(uha ⋅ uha) * dΩ)) + l2ep_rel = sqrt(sum(∫(ep * ep) * dΩ)) ./ sqrt(sum(∫(pha ⋅ pha) * dΩ)) + + #L2 norm error velocity and pressure + l2eu_abs = sqrt(sum(∫(eu ⋅ eu) * dΩ)) + l2ep_abs = sqrt(sum(∫(ep * ep) * dΩ)) + ALLOWED_EXPORTS = ["VelocityError", "PressureError"] selected_exports = intersect(ALLOWED_EXPORTS, simcase.simulationp.exportp.extra_export) # Construct data array dynamically - data = [tn] + data_rel = [tn] + data_abs = [tn] headers = ["time"] if "VelocityError" in selected_exports - push!(data, l2eu) + push!(data_rel, l2eu_rel) + push!(data_abs, l2eu_abs) push!(headers, "VelocityError") end if "PressureError" in selected_exports - push!(data, l2ep) + push!(data_rel, l2ep_rel) + push!(data_abs, l2ep_abs) push!(headers, "PressureError") end - write_to_csv("TGV_ERRRORS.csv", data, headers, parts) + write_to_csv("TGV_L2_relative_ERRRORS.csv", data_rel, headers, parts) + write_to_csv("TGV_L2_absolute_ERRRORS.csv", data_abs, headers, parts) end From 62f4c2cc8d7629127e3daa4976c441402faba642 Mon Sep 17 00:00:00 2001 From: carlodev Date: Wed, 22 Oct 2025 11:31:09 +0200 Subject: [PATCH 31/42] PartitionedArrays = "=0.3.5" --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 846d4f48..d385384c 100644 --- a/Project.toml +++ b/Project.toml @@ -47,7 +47,7 @@ LinearAlgebra = "=1.11.0" MPI = "=0.20.22" NearestNeighbors = "=0.4.21" Parameters = "=0.12.3" -PartitionedArrays = "=0.3.4" +PartitionedArrays = "=0.3.5" Pkg = "=1.11.0" Random = "=1.11.0" Revise = "=3.8.0" From aa7497564ac9684cbdf8fc6b04f1ee292b13fe80 Mon Sep 17 00:00:00 2001 From: carlodev Date: Wed, 22 Oct 2025 17:19:29 +0200 Subject: [PATCH 32/42] abs errors tgv --- src/Commons/ExportUtility.jl | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/Commons/ExportUtility.jl b/src/Commons/ExportUtility.jl index 55513bb5..06839499 100644 --- a/src/Commons/ExportUtility.jl +++ b/src/Commons/ExportUtility.jl @@ -447,7 +447,7 @@ Compute L2 error norm for velocity and pressure for TGV2D case. https://doi.org/ """ function compute_error(simcase::TaylorGreen{Periodic}, params::Dict{Symbol,Any}, tn::Float64, fields::Tuple) uh, ph = fields - @unpack U,P = params + @unpack U,P,V,Q = params uh_analytic = simcase.bc_type.a_solution[:velocity](tn) # Compute analytic velocity at tn ph_analytic = simcase.bc_type.a_solution[:pressure](tn) # Compute analytic pressure at tn @@ -458,7 +458,12 @@ function compute_error(simcase::TaylorGreen{Periodic}, params::Dict{Symbol,Any}, eu = uh_analytic - uh #error velocity ep = ph_analytic - ph #error pressure + # m_eu = maximum(norm(eu)) + m_eu = maximum(norm.(get_free_dof_values((interpolate(eu, V(tn)))))) + m_ep = maximum(abs.(get_free_dof_values((interpolate(ep, Q(tn)))))) + println(m_eu) + println(m_ep) #L2 norm error velocity and pressure @@ -476,21 +481,28 @@ function compute_error(simcase::TaylorGreen{Periodic}, params::Dict{Symbol,Any}, # Construct data array dynamically data_rel = [tn] data_abs = [tn] + data_max = [tn] + headers = ["time"] if "VelocityError" in selected_exports push!(data_rel, l2eu_rel) push!(data_abs, l2eu_abs) + push!(data_max, m_eu) + push!(headers, "VelocityError") end if "PressureError" in selected_exports push!(data_rel, l2ep_rel) push!(data_abs, l2ep_abs) + push!(data_max, m_ep) push!(headers, "PressureError") end write_to_csv("TGV_L2_relative_ERRRORS.csv", data_rel, headers, parts) write_to_csv("TGV_L2_absolute_ERRRORS.csv", data_abs, headers, parts) + write_to_csv("TGV_max_absolute_ERRRORS.csv", data_max, headers, parts) + end From 42bae00a16d9dcd6a95fc47977d07e728f7def05 Mon Sep 17 00:00:00 2001 From: carlodev Date: Thu, 23 Oct 2025 16:58:00 +0200 Subject: [PATCH 33/42] export Tm and Tc --- src/Commons/Equations/StabilizedEquations.jl | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Commons/Equations/StabilizedEquations.jl b/src/Commons/Equations/StabilizedEquations.jl index af51afc8..bb644e6d 100644 --- a/src/Commons/Equations/StabilizedEquations.jl +++ b/src/Commons/Equations/StabilizedEquations.jl @@ -7,10 +7,10 @@ Wrapper for the convective term cconv(u, ∇u) = (∇u') ⋅ u function segregated_equations(u_adv,params::Dict{Symbol,Any},simcase::SimulationCase) - @sunpack skew, ν,dt, θ,D = simcase + @sunpack skew, ν,dt, θ,D, order = simcase sprob = simcase.sprob - @unpack dΩ = params + @unpack dΩ, Ω = params @unpack skew = sprob skewcoeff = skew * 0.5 # ==0 if skew == false @@ -50,6 +50,11 @@ function segregated_equations(u_adv,params::Dict{Symbol,Any},simcase::Simulation rhs(v) = 0.0 + if typeof(simcase) <: TaylorGreen + writevtk(Ω, "Stab_$dt", nsubcells=order, cellfields=["tm"=>Tm, "tc"=>Tc] ) + @info "Exporting Stabilization Parameters" + end + return Tuu,Tpu,Auu,Aup,Apu,App,ML,S,rhs end From b34f9f6e3374374f8b8c84aac417dc7ac17a1527 Mon Sep 17 00:00:00 2001 From: carlodev Date: Mon, 27 Oct 2025 15:38:40 +0100 Subject: [PATCH 34/42] tau_m vms computation options --- .../Equations/StabilizationOperations.jl | 21 ++++++++++++------- src/Commons/MatrixCreation.jl | 2 +- .../ParametersDef/StabilizationStruct.jl | 7 ++++++- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/Commons/Equations/StabilizationOperations.jl b/src/Commons/Equations/StabilizationOperations.jl index 3a802c12..a05cd83e 100644 --- a/src/Commons/Equations/StabilizationOperations.jl +++ b/src/Commons/Equations/StabilizationOperations.jl @@ -29,23 +29,26 @@ function momentum_stabilization(uu, stab_coeff::TensorStabilization,simcase::Sim @unpack G,GG,gg = stab_coeff @unpack sprob = simcase @unpack Ci = sprob.coeff_method - + @unpack r = sprob.coeff_method + @sunpack ν, dt = simcase function τm(uun, G, GG) - τ₁ = Ci[1] * (2 / dt)^2 #Here, you can increse the 2 if CFL high - τ₃ = Ci[2] * (ν^2 * GG) + τ₁ = Ci[1] * (2 / dt)^r #Here, you can increse the 2 if CFL high + τ₃ = Ci[2] * (ν^r * (GG)^r/2 ) uu_new = VectorValue(val_u.(uun)...) if iszero(norm(uu_new)) - return (τ₁ .+ τ₃) .^ (-1 / 2) + return (τ₁ .+ τ₃) .^ (-1 / r) end τ₂ = uu_new ⋅ G ⋅ uu_new - return (τ₁ .+ τ₂ .+ τ₃) .^ (-1 / 2) + return (τ₁ .+ τ₂ .+ τ₃) .^ (-1 / r) end + + return τm ∘ (uu, G, GG) @@ -60,8 +63,12 @@ Bazilevs, Y., Calo, V. M., Cottrell, J. A., Hughes, T. J. R., Reali, A., & Scova """ function continuity_stabilization(uu, stab_coeff::TensorStabilization,simcase::SimulationCase) @unpack gg = stab_coeff - return 1 / (momentum_stabilization(uu,stab_coeff,simcase) ⋅ gg) - + @sunpack τm_comp = simcase + if τm_comp > 0 + return (uu ⋅ uu) * momentum_stabilization(uu, stab_coeff, simcase) #More SUPG-style + elseif τm_comp <0 + return 1 / (momentum_stabilization(uu,stab_coeff,simcase) ⋅ gg) #Standard VMS + end end diff --git a/src/Commons/MatrixCreation.jl b/src/Commons/MatrixCreation.jl index b45b679f..196a4232 100644 --- a/src/Commons/MatrixCreation.jl +++ b/src/Commons/MatrixCreation.jl @@ -99,7 +99,7 @@ end function initialize_matrices(u_adv, params, simcase) @info "allocation matrix and vectors" - matrices = allocate_all_matrices_vectors(u_adv, params, simcase) + @time matrices = allocate_all_matrices_vectors(u_adv, params, simcase) @info "matrix and vectors allocated" @info "updating matrix and vectors" diff --git a/src/Commons/ParametersDef/StabilizationStruct.jl b/src/Commons/ParametersDef/StabilizationStruct.jl index 3a12a1b4..db5e0377 100644 --- a/src/Commons/ParametersDef/StabilizationStruct.jl +++ b/src/Commons/ParametersDef/StabilizationStruct.jl @@ -27,7 +27,12 @@ end @with_kw struct TensorFormulation <: StabilizationFormulation r::Int64 = 2 - Ci::Vector{Int64} = [4,36] + Ci::Vector{Real} = [4,36] + τm_comp::Real = -1 #Standard VMS; τm_comp = 1 SUPG standard + @assert length(Ci) == 2 "Ci length must be 2" + @assert (Ci[1]>=0 && Ci[2]>=0) "Ci values must be non-negative" + @assert τm_comp==1 || τm_comp==-1 " τm values +1 or -1 in TensorFormulation" + end From 93bc63e97a6193a03424b0ccb3c71b07d7a5e87b Mon Sep 17 00:00:00 2001 From: carlodev Date: Wed, 29 Oct 2025 08:43:43 +0100 Subject: [PATCH 35/42] Revert "tau_m vms computation options" This reverts commit b34f9f6e3374374f8b8c84aac417dc7ac17a1527. --- src/Commons/Equations/StabilizationOperations.jl | 9 ++++----- src/Commons/MatrixCreation.jl | 2 +- src/Commons/ParametersDef/StabilizationStruct.jl | 7 +------ 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/Commons/Equations/StabilizationOperations.jl b/src/Commons/Equations/StabilizationOperations.jl index a05cd83e..ce7e907d 100644 --- a/src/Commons/Equations/StabilizationOperations.jl +++ b/src/Commons/Equations/StabilizationOperations.jl @@ -29,22 +29,21 @@ function momentum_stabilization(uu, stab_coeff::TensorStabilization,simcase::Sim @unpack G,GG,gg = stab_coeff @unpack sprob = simcase @unpack Ci = sprob.coeff_method - @unpack r = sprob.coeff_method @sunpack ν, dt = simcase function τm(uun, G, GG) - τ₁ = Ci[1] * (2 / dt)^r #Here, you can increse the 2 if CFL high - τ₃ = Ci[2] * (ν^r * (GG)^r/2 ) + τ₁ = Ci[1] * (2 / dt)^2 + τ₃ = Ci[2] * (ν^2 * GG ) uu_new = VectorValue(val_u.(uun)...) if iszero(norm(uu_new)) - return (τ₁ .+ τ₃) .^ (-1 / r) + return (τ₁ .+ τ₃) .^ (-1 / 2) end τ₂ = uu_new ⋅ G ⋅ uu_new - return (τ₁ .+ τ₂ .+ τ₃) .^ (-1 / r) + return (τ₁ .+ τ₂ .+ τ₃) .^ (-1 / 2) end diff --git a/src/Commons/MatrixCreation.jl b/src/Commons/MatrixCreation.jl index 196a4232..b45b679f 100644 --- a/src/Commons/MatrixCreation.jl +++ b/src/Commons/MatrixCreation.jl @@ -99,7 +99,7 @@ end function initialize_matrices(u_adv, params, simcase) @info "allocation matrix and vectors" - @time matrices = allocate_all_matrices_vectors(u_adv, params, simcase) + matrices = allocate_all_matrices_vectors(u_adv, params, simcase) @info "matrix and vectors allocated" @info "updating matrix and vectors" diff --git a/src/Commons/ParametersDef/StabilizationStruct.jl b/src/Commons/ParametersDef/StabilizationStruct.jl index db5e0377..3a12a1b4 100644 --- a/src/Commons/ParametersDef/StabilizationStruct.jl +++ b/src/Commons/ParametersDef/StabilizationStruct.jl @@ -27,12 +27,7 @@ end @with_kw struct TensorFormulation <: StabilizationFormulation r::Int64 = 2 - Ci::Vector{Real} = [4,36] - τm_comp::Real = -1 #Standard VMS; τm_comp = 1 SUPG standard - @assert length(Ci) == 2 "Ci length must be 2" - @assert (Ci[1]>=0 && Ci[2]>=0) "Ci values must be non-negative" - @assert τm_comp==1 || τm_comp==-1 " τm values +1 or -1 in TensorFormulation" - + Ci::Vector{Int64} = [4,36] end From 92802a6135216725794951419772a9f9279020a0 Mon Sep 17 00:00:00 2001 From: carlodev Date: Wed, 29 Oct 2025 10:22:19 +0100 Subject: [PATCH 36/42] bug fix --- src/Commons/Equations/StabilizationOperations.jl | 8 ++------ src/Commons/ParametersDef/StabilizationStruct.jl | 3 ++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Commons/Equations/StabilizationOperations.jl b/src/Commons/Equations/StabilizationOperations.jl index ce7e907d..e8d97ac3 100644 --- a/src/Commons/Equations/StabilizationOperations.jl +++ b/src/Commons/Equations/StabilizationOperations.jl @@ -62,12 +62,8 @@ Bazilevs, Y., Calo, V. M., Cottrell, J. A., Hughes, T. J. R., Reali, A., & Scova """ function continuity_stabilization(uu, stab_coeff::TensorStabilization,simcase::SimulationCase) @unpack gg = stab_coeff - @sunpack τm_comp = simcase - if τm_comp > 0 - return (uu ⋅ uu) * momentum_stabilization(uu, stab_coeff, simcase) #More SUPG-style - elseif τm_comp <0 - return 1 / (momentum_stabilization(uu,stab_coeff,simcase) ⋅ gg) #Standard VMS - end + + return 1 / (momentum_stabilization(uu,stab_coeff,simcase) ⋅ gg) #Standard VMS end diff --git a/src/Commons/ParametersDef/StabilizationStruct.jl b/src/Commons/ParametersDef/StabilizationStruct.jl index 3a12a1b4..11314daa 100644 --- a/src/Commons/ParametersDef/StabilizationStruct.jl +++ b/src/Commons/ParametersDef/StabilizationStruct.jl @@ -27,7 +27,8 @@ end @with_kw struct TensorFormulation <: StabilizationFormulation r::Int64 = 2 - Ci::Vector{Int64} = [4,36] + Ci::Vector{Real} = [4,36] + @assert (Ci[1]>=0 && Ci[2]>=0) "Ci values must be non-negative" end From 4dbbf78c02d4aebea27a4e02eb2892dad56d20bd Mon Sep 17 00:00:00 2001 From: Bart Janssens Date: Tue, 9 Dec 2025 21:02:00 +0100 Subject: [PATCH 37/42] Update Project.toml for Julia 1.12 compatibility --- Project.toml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Project.toml b/Project.toml index d385384c..cd15fb26 100644 --- a/Project.toml +++ b/Project.toml @@ -43,18 +43,18 @@ Gridap = "=0.18.12" GridapDistributed = "=0.4.7" GridapGmsh = "=0.7.2" GridapPETSc = "=0.5.3" -LinearAlgebra = "=1.11.0" +LinearAlgebra = "1.11.0" MPI = "=0.20.22" NearestNeighbors = "=0.4.21" Parameters = "=0.12.3" PartitionedArrays = "=0.3.5" -Pkg = "=1.11.0" -Random = "=1.11.0" +Pkg = "1.11.0" +Random = "1.11.0" Revise = "=3.8.0" ScatteredInterpolation = "=0.3.6" -SparseArrays = "=1.11.0" -Statistics = "=1.11.1" +SparseArrays = "1.11.0" +Statistics = "1.11.1" SyntheticEddyMethod = "=0.4.4" -Test = "=1.11.0" +Test = "1.11.0" Trapz = "=2.0.3" UnPack = "=1.0.2" \ No newline at end of file From 83eb21f8a0203cde5276841c99ff8d040ba00e1f Mon Sep 17 00:00:00 2001 From: carlodev Date: Fri, 20 Mar 2026 12:05:06 +0100 Subject: [PATCH 38/42] first commit --- Manifest.toml | 1615 +++++++++++++++++++++++++++++++++ TGV2D.jl | 61 ++ TGV_L2_absolute_ERRRORS.csv | 146 --- TGV_L2_relative_ERRRORS.csv | 146 --- src/Commons/MatrixCreation.jl | 4 +- src/Commons/SolveProblem.jl | 1 + 6 files changed, 1679 insertions(+), 294 deletions(-) create mode 100644 Manifest.toml create mode 100644 TGV2D.jl delete mode 100644 TGV_L2_absolute_ERRRORS.csv delete mode 100644 TGV_L2_relative_ERRRORS.csv diff --git a/Manifest.toml b/Manifest.toml new file mode 100644 index 00000000..4b5e1087 --- /dev/null +++ b/Manifest.toml @@ -0,0 +1,1615 @@ +# This file is machine-generated - editing it directly is not advised + +julia_version = "1.12.5" +manifest_format = "2.0" +project_hash = "d8d9566dcba9340269aa6bca4b40577ee9d65168" + +[[deps.ADTypes]] +git-tree-sha1 = "f7304359109c768cf32dc5fa2d371565bb63b68a" +uuid = "47edcb42-4c32-4615-8424-f2b9edc5f35b" +version = "1.21.0" + + [deps.ADTypes.extensions] + ADTypesChainRulesCoreExt = "ChainRulesCore" + ADTypesConstructionBaseExt = "ConstructionBase" + ADTypesEnzymeCoreExt = "EnzymeCore" + + [deps.ADTypes.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ConstructionBase = "187b0558-2788-49d3-abe0-74a17ed4e7c9" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + +[[deps.AbstractFFTs]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "d92ad398961a3ed262d8bf04a1a2b8340f915fef" +uuid = "621f4979-c628-5d54-868e-fcf4e3e8185c" +version = "1.5.0" +weakdeps = ["ChainRulesCore", "Test"] + + [deps.AbstractFFTs.extensions] + AbstractFFTsChainRulesCoreExt = "ChainRulesCore" + AbstractFFTsTestExt = "Test" + +[[deps.AbstractTrees]] +git-tree-sha1 = "2d9c9a55f9c93e8887ad391fbae72f8ef55e1177" +uuid = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" +version = "0.4.5" + +[[deps.Adapt]] +deps = ["LinearAlgebra", "Requires"] +git-tree-sha1 = "35ea197a51ce46fcd01c4a44befce0578a1aaeca" +uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +version = "4.5.0" +weakdeps = ["SparseArrays", "StaticArrays"] + + [deps.Adapt.extensions] + AdaptSparseArraysExt = "SparseArrays" + AdaptStaticArraysExt = "StaticArrays" + +[[deps.ArgCheck]] +git-tree-sha1 = "f9e9a66c9b7be1ad7372bbd9b062d9230c30c5ce" +uuid = "dce04be8-c92d-5529-be00-80e4d2c0e197" +version = "2.5.0" + +[[deps.ArgTools]] +uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f" +version = "1.1.2" + +[[deps.ArrayInterface]] +deps = ["Adapt", "LinearAlgebra"] +git-tree-sha1 = "78b3a7a536b4b0a747a0f296ea77091ca0a9f9a3" +uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" +version = "7.23.0" + + [deps.ArrayInterface.extensions] + ArrayInterfaceAMDGPUExt = "AMDGPU" + ArrayInterfaceBandedMatricesExt = "BandedMatrices" + ArrayInterfaceBlockBandedMatricesExt = "BlockBandedMatrices" + ArrayInterfaceCUDAExt = "CUDA" + ArrayInterfaceCUDSSExt = ["CUDSS", "CUDA"] + ArrayInterfaceChainRulesCoreExt = "ChainRulesCore" + ArrayInterfaceChainRulesExt = "ChainRules" + ArrayInterfaceGPUArraysCoreExt = "GPUArraysCore" + ArrayInterfaceMetalExt = "Metal" + ArrayInterfaceReverseDiffExt = "ReverseDiff" + ArrayInterfaceSparseArraysExt = "SparseArrays" + ArrayInterfaceStaticArraysCoreExt = "StaticArraysCore" + ArrayInterfaceTrackerExt = "Tracker" + + [deps.ArrayInterface.weakdeps] + AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + CUDSS = "45b445bb-4962-46a0-9369-b4df9d0f772e" + ChainRules = "082447d4-558c-5d27-93f4-14fc19e9eca2" + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + +[[deps.ArrayLayouts]] +deps = ["FillArrays", "LinearAlgebra", "StaticArrays"] +git-tree-sha1 = "e0b47732a192dd59b9d079a06d04235e2f833963" +uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" +version = "1.12.2" +weakdeps = ["SparseArrays"] + + [deps.ArrayLayouts.extensions] + ArrayLayoutsSparseArraysExt = "SparseArrays" + +[[deps.Artifacts]] +uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" +version = "1.11.0" + +[[deps.Atomix]] +deps = ["UnsafeAtomics"] +git-tree-sha1 = "29bb0eb6f578a587a49da16564705968667f5fa8" +uuid = "a9b6321e-bd34-4604-b9c9-b65b8de01458" +version = "1.1.2" + + [deps.Atomix.extensions] + AtomixCUDAExt = "CUDA" + AtomixMetalExt = "Metal" + AtomixOpenCLExt = "OpenCL" + AtomixoneAPIExt = "oneAPI" + + [deps.Atomix.weakdeps] + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + Metal = "dde4c033-4e86-420c-a63e-0dd931031962" + OpenCL = "08131aa3-fb12-5dee-8b74-c09406e224a2" + oneAPI = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b" + +[[deps.AutoHashEquals]] +git-tree-sha1 = "4ec6b48702dacc5994a835c1189831755e4e76ef" +uuid = "15f4f7f2-30c1-5605-9d31-71845cf9641f" +version = "2.2.0" + +[[deps.AxisAlgorithms]] +deps = ["LinearAlgebra", "Random", "SparseArrays", "WoodburyMatrices"] +git-tree-sha1 = "01b8ccb13d68535d73d2b0c23e39bd23155fb712" +uuid = "13072b0f-2c55-5437-9ae7-d433b7a33950" +version = "1.1.0" + +[[deps.BSON]] +git-tree-sha1 = "4c3e506685c527ac6a54ccc0c8c76fd6f91b42fb" +uuid = "fbb218c0-5317-5bc6-957e-2ee96dd4b1f0" +version = "0.3.9" + +[[deps.Base64]] +uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f" +version = "1.11.0" + +[[deps.BitTwiddlingConvenienceFunctions]] +deps = ["Static"] +git-tree-sha1 = "f21cfd4950cb9f0587d5067e69405ad2acd27b87" +uuid = "62783981-4cbd-42fc-bca8-16325de8dc4b" +version = "0.1.6" + +[[deps.BlockArrays]] +deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra"] +git-tree-sha1 = "0f606a9894e2bcda541ceb82a91a13c5d450ed97" +uuid = "8e7c35d0-a365-5155-bbbb-fb81a777f24e" +version = "1.9.3" + + [deps.BlockArrays.extensions] + BlockArraysAdaptExt = "Adapt" + BlockArraysBandedMatricesExt = "BandedMatrices" + + [deps.BlockArrays.weakdeps] + Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + +[[deps.Bzip2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1b96ea4a01afe0ea4090c5c8039690672dd13f2e" +uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0" +version = "1.0.9+0" + +[[deps.CEnum]] +git-tree-sha1 = "389ad5c84de1ae7cf0e28e381131c98ea87d54fc" +uuid = "fa961155-64e5-5f13-b03f-caf6b980ea82" +version = "0.5.0" + +[[deps.CPUSummary]] +deps = ["CpuId", "IfElse", "PrecompileTools", "Preferences", "Static"] +git-tree-sha1 = "f3a21d7fc84ba618a779d1ed2fcca2e682865bab" +uuid = "2a0fbf3d-bb9c-48f3-b0a9-814d99fd7ab9" +version = "0.2.7" + +[[deps.CSV]] +deps = ["CodecZlib", "Dates", "FilePathsBase", "InlineStrings", "Mmap", "Parsers", "PooledArrays", "PrecompileTools", "SentinelArrays", "Tables", "Unicode", "WeakRefStrings", "WorkerUtilities"] +git-tree-sha1 = "deddd8725e5e1cc49ee205a1964256043720a6c3" +uuid = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" +version = "0.10.15" + +[[deps.Cairo_jll]] +deps = ["Artifacts", "Bzip2_jll", "CompilerSupportLibraries_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "a21c5464519504e41e0cbc91f0188e8ca23d7440" +uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a" +version = "1.18.5+1" + +[[deps.ChainRulesCore]] +deps = ["Compat", "LinearAlgebra"] +git-tree-sha1 = "e4c6a16e77171a5f5e25e9646617ab1c276c5607" +uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" +version = "1.26.0" +weakdeps = ["SparseArrays"] + + [deps.ChainRulesCore.extensions] + ChainRulesCoreSparseArraysExt = "SparseArrays" + +[[deps.CircularArrays]] +deps = ["OffsetArrays"] +git-tree-sha1 = "2ab6493bc581a03ffe5c49c84e2acccde156eaed" +uuid = "7a955b69-7140-5f4e-a0ed-f168c5e2e749" +version = "1.5.0" + +[[deps.CloseOpenIntervals]] +deps = ["Static", "StaticArrayInterface"] +git-tree-sha1 = "05ba0d07cd4fd8b7a39541e31a7b0254704ea581" +uuid = "fb6a15b2-703c-40df-9091-08a04967cfa9" +version = "0.1.13" + +[[deps.CodeTracking]] +deps = ["InteractiveUtils", "UUIDs"] +git-tree-sha1 = "062c5e1a5bf6ada13db96a4ae4749a4c2234f521" +uuid = "da1fd8a2-8d9e-5ec2-8556-3022fb5608a2" +version = "1.3.9" + +[[deps.CodecInflate64]] +deps = ["TranscodingStreams"] +git-tree-sha1 = "d981a6e8656b1e363a2731716f46851a2257deb7" +uuid = "6309b1aa-fc58-479c-8956-599a07234577" +version = "0.1.3" + +[[deps.CodecZlib]] +deps = ["TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "962834c22b66e32aa10f7611c08c8ca4e20749a9" +uuid = "944b1d66-785c-5afd-91f1-9de20f533193" +version = "0.7.8" + +[[deps.Combinatorics]] +git-tree-sha1 = "c761b00e7755700f9cdf5b02039939d1359330e1" +uuid = "861a8166-3701-5b0c-9a16-15d98fcdc6aa" +version = "1.1.0" + +[[deps.CommonSubexpressions]] +deps = ["MacroTools"] +git-tree-sha1 = "cda2cfaebb4be89c9084adaca7dd7333369715c5" +uuid = "bbf7d656-a473-5ed7-a52c-81e309532950" +version = "0.3.1" + +[[deps.CommonWorldInvalidations]] +git-tree-sha1 = "ae52d1c52048455e85a387fbee9be553ec2b68d0" +uuid = "f70d9fcc-98c5-4d4a-abd7-e4cdeebd8ca8" +version = "1.0.0" + +[[deps.Compat]] +deps = ["TOML", "UUIDs"] +git-tree-sha1 = "9d8a54ce4b17aa5bdce0ea5c34bc5e7c340d16ad" +uuid = "34da2185-b29b-5c13-b0c7-acf172513d20" +version = "4.18.1" +weakdeps = ["Dates", "LinearAlgebra"] + + [deps.Compat.extensions] + CompatLinearAlgebraExt = "LinearAlgebra" + +[[deps.Compiler]] +git-tree-sha1 = "382d79bfe72a406294faca39ef0c3cef6e6ce1f1" +uuid = "807dbc54-b67e-4c79-8afb-eafe4df6f2e1" +version = "0.1.1" + +[[deps.CompilerSupportLibraries_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae" +version = "1.3.0+1" + +[[deps.ConstructionBase]] +git-tree-sha1 = "b4b092499347b18a015186eae3042f72267106cb" +uuid = "187b0558-2788-49d3-abe0-74a17ed4e7c9" +version = "1.6.0" + + [deps.ConstructionBase.extensions] + ConstructionBaseIntervalSetsExt = "IntervalSets" + ConstructionBaseLinearAlgebraExt = "LinearAlgebra" + ConstructionBaseStaticArraysExt = "StaticArrays" + + [deps.ConstructionBase.weakdeps] + IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" + LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.CpuId]] +deps = ["Markdown"] +git-tree-sha1 = "fcbb72b032692610bfbdb15018ac16a36cf2e406" +uuid = "adafc99b-e345-5852-983c-f28acb93d879" +version = "0.3.1" + +[[deps.Crayons]] +git-tree-sha1 = "249fe38abf76d48563e2f4556bebd215aa317e15" +uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f" +version = "4.1.1" + +[[deps.DataAPI]] +git-tree-sha1 = "abe83f3a2f1b857aac70ef8b269080af17764bbe" +uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a" +version = "1.16.0" + +[[deps.DataFrames]] +deps = ["Compat", "DataAPI", "DataStructures", "Future", "InlineStrings", "InvertedIndices", "IteratorInterfaceExtensions", "LinearAlgebra", "Markdown", "Missings", "PooledArrays", "PrecompileTools", "PrettyTables", "Printf", "Random", "Reexport", "SentinelArrays", "SortingAlgorithms", "Statistics", "TableTraits", "Tables", "Unicode"] +git-tree-sha1 = "fb61b4812c49343d7ef0b533ba982c46021938a6" +uuid = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" +version = "1.7.0" + +[[deps.DataInterpolations]] +deps = ["EnumX", "FindFirstFunctions", "ForwardDiff", "LinearAlgebra", "PrettyTables", "RecipesBase", "Reexport"] +git-tree-sha1 = "b6fc25b5dbff016d8aae1e0ae2740347bccb6f65" +uuid = "82cc6244-b520-54b8-b5a6-8a565e85f1d0" +version = "8.0.1" + + [deps.DataInterpolations.extensions] + DataInterpolationsChainRulesCoreExt = "ChainRulesCore" + DataInterpolationsOptimExt = "Optim" + DataInterpolationsRegularizationToolsExt = "RegularizationTools" + DataInterpolationsSymbolicsExt = "Symbolics" + + [deps.DataInterpolations.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + Optim = "429524aa-4258-5aef-a3af-852621145aeb" + RegularizationTools = "29dad682-9a27-4bc3-9c72-016788665182" + Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.DataStructures]] +deps = ["Compat", "InteractiveUtils", "OrderedCollections"] +git-tree-sha1 = "4e1fe97fdaed23e9dc21d4d664bea76b65fc50a0" +uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" +version = "0.18.22" + +[[deps.DataValueInterfaces]] +git-tree-sha1 = "bfc1187b79289637fa0ef6d4436ebdfe6905cbd6" +uuid = "e2d170a0-9d28-54be-80f0-106bbe20a464" +version = "1.0.0" + +[[deps.Dates]] +deps = ["Printf"] +uuid = "ade2ca70-3891-5945-98fb-dc099432e06a" +version = "1.11.0" + +[[deps.DelimitedFiles]] +deps = ["Mmap"] +git-tree-sha1 = "9e2f36d3c96a820c678f2f1f1782582fcf685bae" +uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab" +version = "1.9.1" + +[[deps.DiffResults]] +deps = ["StaticArraysCore"] +git-tree-sha1 = "782dd5f4561f5d267313f23853baaaa4c52ea621" +uuid = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" +version = "1.1.0" + +[[deps.DiffRules]] +deps = ["IrrationalConstants", "LogExpFunctions", "NaNMath", "Random", "SpecialFunctions"] +git-tree-sha1 = "23163d55f885173722d1e4cf0f6110cdbaf7e272" +uuid = "b552c78f-8df3-52c6-915a-8e097449b14b" +version = "1.15.1" + +[[deps.DifferentiationInterface]] +deps = ["ADTypes", "LinearAlgebra"] +git-tree-sha1 = "7ae99144ea44715402c6c882bfef2adbeadbc4ce" +uuid = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" +version = "0.7.16" + + [deps.DifferentiationInterface.extensions] + DifferentiationInterfaceChainRulesCoreExt = "ChainRulesCore" + DifferentiationInterfaceDiffractorExt = "Diffractor" + DifferentiationInterfaceEnzymeExt = ["EnzymeCore", "Enzyme"] + DifferentiationInterfaceFastDifferentiationExt = "FastDifferentiation" + DifferentiationInterfaceFiniteDiffExt = "FiniteDiff" + DifferentiationInterfaceFiniteDifferencesExt = "FiniteDifferences" + DifferentiationInterfaceForwardDiffExt = ["ForwardDiff", "DiffResults"] + DifferentiationInterfaceGPUArraysCoreExt = "GPUArraysCore" + DifferentiationInterfaceGTPSAExt = "GTPSA" + DifferentiationInterfaceMooncakeExt = "Mooncake" + DifferentiationInterfacePolyesterForwardDiffExt = ["PolyesterForwardDiff", "ForwardDiff", "DiffResults"] + DifferentiationInterfaceReverseDiffExt = ["ReverseDiff", "DiffResults"] + DifferentiationInterfaceSparseArraysExt = "SparseArrays" + DifferentiationInterfaceSparseConnectivityTracerExt = "SparseConnectivityTracer" + DifferentiationInterfaceSparseMatrixColoringsExt = "SparseMatrixColorings" + DifferentiationInterfaceStaticArraysExt = "StaticArrays" + DifferentiationInterfaceSymbolicsExt = "Symbolics" + DifferentiationInterfaceTrackerExt = "Tracker" + DifferentiationInterfaceZygoteExt = ["Zygote", "ForwardDiff"] + + [deps.DifferentiationInterface.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5" + Diffractor = "9f5e2b26-1114-432f-b630-d3fe2085c51c" + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + EnzymeCore = "f151be2c-9106-41f4-ab19-57ee4f262869" + FastDifferentiation = "eb9bf01b-bf85-4b60-bf87-ee5de06c00be" + FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41" + FiniteDifferences = "26cc04aa-876d-5657-8c51-4c34ba976000" + ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" + GPUArraysCore = "46192b85-c4d5-4398-a991-12ede77f4527" + GTPSA = "b27dd330-f138-47c5-815b-40db9dd9b6e8" + Mooncake = "da2b9cff-9c12-43a0-ae48-6db2b0edb7d6" + PolyesterForwardDiff = "98d1487c-24ca-40b6-b7ab-df2af84e126b" + ReverseDiff = "37e2e3b7-166d-5795-8a7a-e32c996b4267" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + SparseConnectivityTracer = "9f842d2f-2579-4b1d-911e-f412cf18a3f5" + SparseMatrixColorings = "0a514795-09f3-496d-8182-132a7b665d35" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + Symbolics = "0c5d862f-8b57-4792-8d23-62f2024744c7" + Tracker = "9f7883ad-71c0-57eb-9f7f-b5c9e6d3789c" + Zygote = "e88e6eb3-aa80-5325-afca-941959d7151f" + +[[deps.Distances]] +deps = ["LinearAlgebra", "Statistics", "StatsAPI"] +git-tree-sha1 = "c7e3a542b999843086e2f29dac96a618c105be1d" +uuid = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" +version = "0.10.12" +weakdeps = ["ChainRulesCore", "SparseArrays"] + + [deps.Distances.extensions] + DistancesChainRulesCoreExt = "ChainRulesCore" + DistancesSparseArraysExt = "SparseArrays" + +[[deps.Distributed]] +deps = ["Random", "Serialization", "Sockets"] +uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b" +version = "1.11.0" + +[[deps.DocStringExtensions]] +git-tree-sha1 = "7442a5dfe1ebb773c29cc2962a8980f47221d76c" +uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae" +version = "0.9.5" + +[[deps.Downloads]] +deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"] +uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6" +version = "1.7.0" + +[[deps.EnumX]] +git-tree-sha1 = "c49898e8438c828577f04b92fc9368c388ac783c" +uuid = "4e289a0a-7415-4d19-859d-a7e5c4648b56" +version = "1.0.7" + +[[deps.Expat_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "27af30de8b5445644e8ffe3bcb0d72049c089cf1" +uuid = "2e619515-83b5-522b-bb60-26c02a35a201" +version = "2.7.3+0" + +[[deps.EzXML]] +deps = ["Printf", "XML2_jll"] +git-tree-sha1 = "7ea1aa5869e2626ccae84480e4f37185bc6f41d3" +uuid = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615" +version = "1.2.3" + +[[deps.FFTW]] +deps = ["AbstractFFTs", "FFTW_jll", "LinearAlgebra", "MKL_jll", "Preferences", "Reexport"] +git-tree-sha1 = "797762812ed063b9b94f6cc7742bc8883bb5e69e" +uuid = "7a1cc6ca-52ef-59f5-83cd-3a7055c09341" +version = "1.9.0" + +[[deps.FFTW_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "6d6219a004b8cf1e0b4dbe27a2860b8e04eba0be" +uuid = "f5851436-0d7a-5f13-b9de-f02708fd171a" +version = "3.3.11+0" + +[[deps.FLTK_jll]] +deps = ["Artifacts", "Fontconfig_jll", "FreeType2_jll", "JLLWrappers", "JpegTurbo_jll", "Libdl", "Libglvnd_jll", "Pkg", "Xorg_libX11_jll", "Xorg_libXext_jll", "Xorg_libXfixes_jll", "Xorg_libXft_jll", "Xorg_libXinerama_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "72a4842f93e734f378cf381dae2ca4542f019d23" +uuid = "4fce6fc7-ba6a-5f4c-898f-77e99806d6f8" +version = "1.3.8+0" + +[[deps.FastGaussQuadrature]] +deps = ["LinearAlgebra", "SpecialFunctions", "StaticArrays"] +git-tree-sha1 = "0044e9f5e49a57e88205e8f30ab73928b05fe5b6" +uuid = "442a2c76-b920-505d-bb47-c5924d526838" +version = "1.1.0" + +[[deps.FileIO]] +deps = ["Pkg", "Requires", "UUIDs"] +git-tree-sha1 = "b66970a70db13f45b7e57fbda1736e1cf72174ea" +uuid = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549" +version = "1.17.0" + + [deps.FileIO.extensions] + HTTPExt = "HTTP" + + [deps.FileIO.weakdeps] + HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3" + +[[deps.FilePathsBase]] +deps = ["Compat", "Dates"] +git-tree-sha1 = "3bab2c5aa25e7840a4b065805c0cdfc01f3068d2" +uuid = "48062228-2e41-5def-b9a4-89aafe57970f" +version = "0.9.24" +weakdeps = ["Mmap", "Test"] + + [deps.FilePathsBase.extensions] + FilePathsBaseMmapExt = "Mmap" + FilePathsBaseTestExt = "Test" + +[[deps.FileWatching]] +uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee" +version = "1.11.0" + +[[deps.FillArrays]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "6a70198746448456524cb442b8af316927ff3e1a" +uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" +version = "1.13.0" + + [deps.FillArrays.extensions] + FillArraysPDMatsExt = "PDMats" + FillArraysSparseArraysExt = "SparseArrays" + FillArraysStatisticsExt = "Statistics" + + [deps.FillArrays.weakdeps] + PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" + +[[deps.FindFirstFunctions]] +deps = ["PrecompileTools"] +git-tree-sha1 = "27b495de668ccea58de6b06d6d13181396598ea0" +uuid = "64ca27bc-2ba2-4a57-88aa-44e436879224" +version = "1.8.0" + +[[deps.FiniteDiff]] +deps = ["ArrayInterface", "LinearAlgebra", "Setfield"] +git-tree-sha1 = "9340ca07ca27093ff68418b7558ca37b05f8aeb1" +uuid = "6a86dc24-6348-571c-b903-95158fe2bd41" +version = "2.29.0" + + [deps.FiniteDiff.extensions] + FiniteDiffBandedMatricesExt = "BandedMatrices" + FiniteDiffBlockBandedMatricesExt = "BlockBandedMatrices" + FiniteDiffSparseArraysExt = "SparseArrays" + FiniteDiffStaticArraysExt = "StaticArrays" + + [deps.FiniteDiff.weakdeps] + BandedMatrices = "aae01518-5342-5314-be14-df237901396f" + BlockBandedMatrices = "ffab5731-97b5-5995-9138-79e8c1846df0" + SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" + StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[[deps.Fontconfig_jll]] +deps = ["Artifacts", "Bzip2_jll", "Expat_jll", "FreeType2_jll", "JLLWrappers", "Libdl", "Libuuid_jll", "Zlib_jll"] +git-tree-sha1 = "f85dac9a96a01087df6e3a749840015a0ca3817d" +uuid = "a3f928ae-7b40-5064-980b-68af3947d34b" +version = "2.17.1+0" + +[[deps.ForwardDiff]] +deps = ["CommonSubexpressions", "DiffResults", "DiffRules", "LinearAlgebra", "LogExpFunctions", "NaNMath", "Preferences", "Printf", "Random", "SpecialFunctions"] +git-tree-sha1 = "afb7c51ac63e40708a3071f80f5e84a752299d4f" +uuid = "f6369f11-7733-5829-9624-2563aa707210" +version = "0.10.39" +weakdeps = ["StaticArrays"] + + [deps.ForwardDiff.extensions] + ForwardDiffStaticArraysExt = "StaticArrays" + +[[deps.FreeType2_jll]] +deps = ["Artifacts", "Bzip2_jll", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "2c5512e11c791d1baed2049c5652441b28fc6a31" +uuid = "d7e528f0-a631-5988-bf34-fe36492bcfd7" +version = "2.13.4+0" + +[[deps.Future]] +deps = ["Random"] +uuid = "9fa8497b-333b-5362-9e8d-4d0656e87820" +version = "1.11.0" + +[[deps.GLU_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libglvnd_jll", "Pkg"] +git-tree-sha1 = "65af046f4221e27fb79b28b6ca89dd1d12bc5ec7" +uuid = "bd17208b-e95e-5925-bf81-e2f59b3e5c61" +version = "9.0.1+0" + +[[deps.GMP_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "781609d7-10c4-51f6-84f2-b8444358ff6d" +version = "6.3.0+2" + +[[deps.GettextRuntime_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Libiconv_jll"] +git-tree-sha1 = "45288942190db7c5f760f59c04495064eedf9340" +uuid = "b0724c58-0f36-5564-988d-3bb0596ebc4a" +version = "0.22.4+0" + +[[deps.Glib_jll]] +deps = ["Artifacts", "GettextRuntime_jll", "JLLWrappers", "Libdl", "Libffi_jll", "Libiconv_jll", "Libmount_jll", "PCRE2_jll", "Zlib_jll"] +git-tree-sha1 = "24f6def62397474a297bfcec22384101609142ed" +uuid = "7746bdde-850d-59dc-9ae8-88ece973131d" +version = "2.86.3+0" + +[[deps.Gridap]] +deps = ["AbstractTrees", "BSON", "BlockArrays", "Combinatorics", "DataStructures", "DocStringExtensions", "FastGaussQuadrature", "FileIO", "FillArrays", "ForwardDiff", "JLD2", "JSON", "LineSearches", "LinearAlgebra", "NLsolve", "NearestNeighbors", "PolynomialBases", "Preferences", "QuadGK", "Random", "SparseArrays", "SparseMatricesCSR", "StaticArrays", "Statistics", "Test", "WriteVTK"] +git-tree-sha1 = "f6468946ed376100d38252f9793c9d53623207b9" +uuid = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e" +version = "0.18.12" + +[[deps.GridapDistributed]] +deps = ["BlockArrays", "FillArrays", "ForwardDiff", "Gridap", "LinearAlgebra", "MPI", "PartitionedArrays", "SparseArrays", "SparseMatricesCSR", "WriteVTK"] +git-tree-sha1 = "4d603a3173dca7504a67b91c3f33f62d34df1c8d" +uuid = "f9701e48-63b3-45aa-9a63-9bc6c271f355" +version = "0.4.7" + +[[deps.GridapGmsh]] +deps = ["Gridap", "GridapDistributed", "Libdl", "Metis", "PartitionedArrays", "gmsh_jll"] +git-tree-sha1 = "3f4e7fc7c777b794f204d4f0c23853a44c3bc9a8" +uuid = "3025c34a-b394-11e9-2a55-3fee550c04c8" +version = "0.7.2" + +[[deps.GridapPETSc]] +deps = ["Gridap", "GridapDistributed", "Libdl", "LinearAlgebra", "MPI", "PETSc_jll", "PartitionedArrays", "Random", "SparseArrays", "SparseMatricesCSR"] +git-tree-sha1 = "601899a547ac1f473be900e6b3157e62cb2db8fc" +uuid = "bcdc36c2-0c3e-11ea-095a-c9dadae499f1" +version = "0.5.3" + +[[deps.HDF5_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "LibCURL_jll", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "OpenSSL_jll", "TOML", "Zlib_jll", "libaec_jll"] +git-tree-sha1 = "e94f84da9af7ce9c6be049e9067e511e17ff89ec" +uuid = "0234f1f7-429e-5d53-9886-15a909be8d59" +version = "1.14.6+0" + +[[deps.HashArrayMappedTries]] +git-tree-sha1 = "2eaa69a7cab70a52b9687c8bf950a5a93ec895ae" +uuid = "076d061b-32b6-4027-95e0-9a2c6f6d7e74" +version = "0.2.0" + +[[deps.Hwloc_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "92f65c4d78ce8cdbb6b68daf88889950b0a99d11" +uuid = "e33a78d0-f292-5ffc-b300-72abe9b543c8" +version = "2.12.1+0" + +[[deps.IfElse]] +git-tree-sha1 = "debdd00ffef04665ccbb3e150747a77560e8fad1" +uuid = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173" +version = "0.1.1" + +[[deps.InlineStrings]] +git-tree-sha1 = "8f3d257792a522b4601c24a577954b0a8cd7334d" +uuid = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" +version = "1.4.5" + + [deps.InlineStrings.extensions] + ArrowTypesExt = "ArrowTypes" + ParsersExt = "Parsers" + + [deps.InlineStrings.weakdeps] + ArrowTypes = "31f734f8-188a-4ce0-8406-c8a06bd891cd" + Parsers = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" + +[[deps.InputBuffers]] +git-tree-sha1 = "e5392ea00942566b631e991dd896942189937b2f" +uuid = "0c81fc1b-5583-44fc-8770-48be1e1cca08" +version = "1.1.1" + +[[deps.IntelOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "ec1debd61c300961f98064cfb21287613ad7f303" +uuid = "1d5cc7b8-4909-519e-a0f8-d0f5ad9712d0" +version = "2025.2.0+0" + +[[deps.InteractiveUtils]] +deps = ["Markdown"] +uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240" +version = "1.11.0" + +[[deps.Interpolations]] +deps = ["Adapt", "AxisAlgorithms", "ChainRulesCore", "LinearAlgebra", "OffsetArrays", "Random", "Ratios", "Requires", "SharedArrays", "SparseArrays", "StaticArrays", "WoodburyMatrices"] +git-tree-sha1 = "88a101217d7cb38a7b481ccd50d21876e1d1b0e0" +uuid = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" +version = "0.15.1" + + [deps.Interpolations.extensions] + InterpolationsUnitfulExt = "Unitful" + + [deps.Interpolations.weakdeps] + Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" + +[[deps.InvertedIndices]] +git-tree-sha1 = "6da3c4316095de0f5ee2ebd875df8721e7e0bdbe" +uuid = "41ab1584-1d38-5bbf-9106-f11c6c58b48f" +version = "1.3.1" + +[[deps.IrrationalConstants]] +git-tree-sha1 = "b2d91fe939cae05960e760110b328288867b5758" +uuid = "92d709cd-6900-40b7-9082-c6be49f344b6" +version = "0.2.6" + +[[deps.IterativeSolvers]] +deps = ["LinearAlgebra", "Printf", "Random", "RecipesBase", "SparseArrays"] +git-tree-sha1 = "59545b0a2b27208b0650df0a46b8e3019f85055b" +uuid = "42fd0dbc-a981-5370-80f2-aaf504508153" +version = "0.9.4" + +[[deps.IteratorInterfaceExtensions]] +git-tree-sha1 = "a3f24677c21f5bbe9d2a714f95dcd58337fb2856" +uuid = "82899510-4779-5014-852e-03e436cf321d" +version = "1.0.0" + +[[deps.JLD2]] +deps = ["FileIO", "MacroTools", "Mmap", "OrderedCollections", "PrecompileTools", "ScopedValues", "TranscodingStreams"] +git-tree-sha1 = "d97791feefda45729613fafeccc4fbef3f539151" +uuid = "033835bb-8acc-5ee8-8aae-3f567f8a3819" +version = "0.5.15" +weakdeps = ["UnPack"] + + [deps.JLD2.extensions] + UnPackExt = "UnPack" + +[[deps.JLLWrappers]] +deps = ["Artifacts", "Preferences"] +git-tree-sha1 = "0533e564aae234aff59ab625543145446d8b6ec2" +uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210" +version = "1.7.1" + +[[deps.JSON]] +deps = ["Dates", "Mmap", "Parsers", "Unicode"] +git-tree-sha1 = "31e996f0a15c7b280ba9f76636b3ff9e2ae58c9a" +uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" +version = "0.21.4" + +[[deps.JpegTurbo_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "b6893345fd6658c8e475d40155789f4860ac3b21" +uuid = "aacddb02-875f-59d6-b918-886e6ef4fbf8" +version = "3.1.4+0" + +[[deps.JuliaInterpreter]] +deps = ["CodeTracking", "InteractiveUtils", "Random", "UUIDs"] +git-tree-sha1 = "6ac9e4acc417a5b534ace12690bc6973c25b862f" +uuid = "aa1ae85d-cabe-5617-a682-6adf51b2e16a" +version = "0.10.3" + +[[deps.JuliaSyntaxHighlighting]] +deps = ["StyledStrings"] +uuid = "ac6e5ff7-fb65-4e79-a425-ec3bc9c03011" +version = "1.12.0" + +[[deps.LLVMOpenMP_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "eb62a3deb62fc6d8822c0c4bef73e4412419c5d8" +uuid = "1d63c593-3942-5779-bab2-d838dc0a180e" +version = "18.1.8+0" + +[[deps.LZO_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1c602b1127f4751facb671441ca72715cc95938a" +uuid = "dd4b983a-f0e5-5f8d-a1b7-129d4a5fb1ac" +version = "2.10.3+0" + +[[deps.LaTeXStrings]] +git-tree-sha1 = "dda21b8cbd6a6c40d9d02a73230f9d70fed6918c" +uuid = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f" +version = "1.4.0" + +[[deps.LayoutPointers]] +deps = ["ArrayInterface", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface"] +git-tree-sha1 = "a9eaadb366f5493a5654e843864c13d8b107548c" +uuid = "10f19ff3-798f-405d-979b-55457f8fc047" +version = "0.1.17" + +[[deps.LazyArtifacts]] +deps = ["Artifacts", "Pkg"] +uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3" +version = "1.11.0" + +[[deps.LibCURL]] +deps = ["LibCURL_jll", "MozillaCACerts_jll"] +uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21" +version = "0.6.4" + +[[deps.LibCURL_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll", "Zlib_jll", "nghttp2_jll"] +uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0" +version = "8.15.0+0" + +[[deps.LibGit2]] +deps = ["LibGit2_jll", "NetworkOptions", "Printf", "SHA"] +uuid = "76f85450-5226-5b5a-8eaa-529ad045b433" +version = "1.11.0" + +[[deps.LibGit2_jll]] +deps = ["Artifacts", "LibSSH2_jll", "Libdl", "OpenSSL_jll"] +uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5" +version = "1.9.0+0" + +[[deps.LibSSH2_jll]] +deps = ["Artifacts", "Libdl", "OpenSSL_jll"] +uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8" +version = "1.11.3+1" + +[[deps.Libdl]] +uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" +version = "1.11.0" + +[[deps.Libffi_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "c8da7e6a91781c41a863611c7e966098d783c57a" +uuid = "e9f186c6-92d2-5b65-8a66-fee21dc1b490" +version = "3.4.7+0" + +[[deps.Libglvnd_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll", "Xorg_libXext_jll"] +git-tree-sha1 = "d36c21b9e7c172a44a10484125024495e2625ac0" +uuid = "7e76a0d4-f3c7-5321-8279-8d96eeed0f29" +version = "1.7.1+1" + +[[deps.Libiconv_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "be484f5c92fad0bd8acfef35fe017900b0b73809" +uuid = "94ce4f54-9a6c-5748-9c1c-f9c7231a4531" +version = "1.18.0+0" + +[[deps.Libmount_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "97bbca976196f2a1eb9607131cb108c69ec3f8a6" +uuid = "4b2f31a3-9ecc-558c-b454-b3730dcb73e9" +version = "2.41.3+0" + +[[deps.Libuuid_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "d0205286d9eceadc518742860bf23f703779a3d6" +uuid = "38a345b3-de98-5d2b-a5d3-14cd9215e700" +version = "2.41.3+0" + +[[deps.LightXML]] +deps = ["Libdl", "XML2_jll"] +git-tree-sha1 = "aa971a09f0f1fe92fe772713a564aa48abe510df" +uuid = "9c8b4983-aa76-5018-a973-4c85ecc9e179" +version = "0.9.3" + +[[deps.LineSearches]] +deps = ["LinearAlgebra", "NLSolversBase", "NaNMath", "Printf"] +git-tree-sha1 = "9ea3422d03222c6de679934d1c08f0a99405aa03" +uuid = "d3d80556-e9d4-5f37-9878-2ab0fcc64255" +version = "7.5.1" + +[[deps.LinearAlgebra]] +deps = ["Libdl", "OpenBLAS_jll", "libblastrampoline_jll"] +uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" +version = "1.12.0" + +[[deps.LinearElasticity_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "71e8ee0f9fe0e86a8f8c7f28361e5118eab2f93f" +uuid = "18c40d15-f7cd-5a6d-bc92-87468d86c5db" +version = "5.0.0+0" + +[[deps.LogExpFunctions]] +deps = ["DocStringExtensions", "IrrationalConstants", "LinearAlgebra"] +git-tree-sha1 = "13ca9e2586b89836fd20cccf56e57e2b9ae7f38f" +uuid = "2ab3a3ac-af41-5b50-aa03-7779005ae688" +version = "0.3.29" + + [deps.LogExpFunctions.extensions] + LogExpFunctionsChainRulesCoreExt = "ChainRulesCore" + LogExpFunctionsChangesOfVariablesExt = "ChangesOfVariables" + LogExpFunctionsInverseFunctionsExt = "InverseFunctions" + + [deps.LogExpFunctions.weakdeps] + ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4" + ChangesOfVariables = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0" + InverseFunctions = "3587e190-3f89-42d0-90ee-14403ec27112" + +[[deps.Logging]] +uuid = "56ddb016-857b-54e1-b83d-db4d58db5568" +version = "1.11.0" + +[[deps.LoweredCodeUtils]] +deps = ["Compiler", "JuliaInterpreter"] +git-tree-sha1 = "b882a7dd7ef37643066ae8f9380beea8fdd89cae" +uuid = "6f1432cf-f94c-5a45-995e-cdbf5db27b0b" +version = "3.4.2" + +[[deps.METIS_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "2eefa8baa858871ae7770c98c3c2a7e46daba5b4" +uuid = "d00139f3-1899-568f-a2f0-47f597d42d70" +version = "5.1.3+0" + +[[deps.MKL_jll]] +deps = ["Artifacts", "IntelOpenMP_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "oneTBB_jll"] +git-tree-sha1 = "282cadc186e7b2ae0eeadbd7a4dffed4196ae2aa" +uuid = "856f044c-d86e-5d09-b602-aeab76dc8ba7" +version = "2025.2.0+0" + +[[deps.MMG_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "LinearElasticity_jll", "Pkg", "SCOTCH_jll"] +git-tree-sha1 = "70a59df96945782bb0d43b56d0fbfdf1ce2e4729" +uuid = "86086c02-e288-5929-a127-40944b0018b7" +version = "5.6.0+0" + +[[deps.MPI]] +deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "PkgVersion", "PrecompileTools", "Requires", "Serialization", "Sockets"] +git-tree-sha1 = "892676019c58f34e38743bc989b0eca5bce5edc5" +uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195" +version = "0.20.22" + + [deps.MPI.extensions] + AMDGPUExt = "AMDGPU" + CUDAExt = "CUDA" + + [deps.MPI.weakdeps] + AMDGPU = "21141c5a-9bdb-4563-92ae-f87d6854732e" + CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" + +[[deps.MPICH_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "9341048b9f723f2ae2a72a5269ac2f15f80534dc" +uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4" +version = "4.3.2+0" + +[[deps.MPIPreferences]] +deps = ["Libdl", "Preferences"] +git-tree-sha1 = "8e98d5d80b87403c311fd51e8455d4546ba7a5f8" +uuid = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267" +version = "0.1.12" + +[[deps.MPItrampoline_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML"] +git-tree-sha1 = "36c2d142e7d45fb98b5f83925213feb3292ca348" +uuid = "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748" +version = "5.5.5+0" + +[[deps.MacroTools]] +git-tree-sha1 = "1e0228a030642014fe5cfe68c2c0a818f9e3f522" +uuid = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" +version = "0.5.16" + +[[deps.ManualMemory]] +git-tree-sha1 = "bcaef4fc7a0cfe2cba636d84cda54b5e4e4ca3cd" +uuid = "d125e4d3-2237-4719-b19c-fa641b8a4667" +version = "0.1.8" + +[[deps.Markdown]] +deps = ["Base64", "JuliaSyntaxHighlighting", "StyledStrings"] +uuid = "d6f4376e-aef5-505a-96c1-9c027394607a" +version = "1.11.0" + +[[deps.Metis]] +deps = ["CEnum", "LinearAlgebra", "METIS_jll", "SparseArrays"] +git-tree-sha1 = "54aca4fd53d39dcd2c3f1bef367b6921e8178628" +uuid = "2679e427-3c69-5b7f-982b-ece356f1e94b" +version = "1.5.0" + + [deps.Metis.extensions] + MetisGraphs = "Graphs" + MetisLightGraphs = "LightGraphs" + MetisSimpleWeightedGraphs = ["SimpleWeightedGraphs", "Graphs"] + + [deps.Metis.weakdeps] + Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6" + LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d" + SimpleWeightedGraphs = "47aef6b3-ad0c-573a-a1e2-d07658019622" + +[[deps.MicrosoftMPI_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"] +git-tree-sha1 = "bc95bf4149bf535c09602e3acdf950d9b4376227" +uuid = "9237b28f-5490-5468-be7b-bb81f5f5e6cf" +version = "10.1.4+3" + +[[deps.Missings]] +deps = ["DataAPI"] +git-tree-sha1 = "ec4f7fbeab05d7747bdf98eb74d130a2a2ed298d" +uuid = "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28" +version = "1.2.0" + +[[deps.Mmap]] +uuid = "a63ad114-7e13-5084-954f-fe012c677804" +version = "1.11.0" + +[[deps.MozillaCACerts_jll]] +uuid = "14a3606d-f60d-562e-9121-12d972cd8159" +version = "2025.11.4" + +[[deps.NLSolversBase]] +deps = ["ADTypes", "DifferentiationInterface", "Distributed", "FiniteDiff", "ForwardDiff"] +git-tree-sha1 = "25a6638571a902ecfb1ae2a18fc1575f86b1d4df" +uuid = "d41bc354-129a-5804-8e4c-c37616107c6c" +version = "7.10.0" + +[[deps.NLsolve]] +deps = ["Distances", "LineSearches", "LinearAlgebra", "NLSolversBase", "Printf", "Reexport"] +git-tree-sha1 = "019f12e9a1a7880459d0173c182e6a99365d7ac1" +uuid = "2774e3e8-f4cf-5e23-947b-6d7e65073b56" +version = "4.5.1" + +[[deps.NaNMath]] +deps = ["OpenLibm_jll"] +git-tree-sha1 = "9b8215b1ee9e78a293f99797cd31375471b2bcae" +uuid = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3" +version = "1.1.3" + +[[deps.NearestNeighbors]] +deps = ["Distances", "StaticArrays"] +git-tree-sha1 = "8a3271d8309285f4db73b4f662b1b290c715e85e" +uuid = "b8a86587-4115-5ab1-83bc-aa920d37bbce" +version = "0.4.21" + +[[deps.NetworkOptions]] +uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908" +version = "1.3.0" + +[[deps.OCCT_jll]] +deps = ["Artifacts", "FreeType2_jll", "JLLWrappers", "Libdl", "Libglvnd_jll", "Xorg_libX11_jll", "Xorg_libXext_jll", "Xorg_libXfixes_jll", "Xorg_libXft_jll", "Xorg_libXinerama_jll", "Xorg_libXrender_jll"] +git-tree-sha1 = "f130ae166e244c5791d211d482d153360c34a94a" +uuid = "baad4e97-8daa-5946-aac2-2edac59d34e1" +version = "7.9.2+0" + +[[deps.OffsetArrays]] +git-tree-sha1 = "117432e406b5c023f665fa73dc26e79ec3630151" +uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881" +version = "1.17.0" +weakdeps = ["Adapt"] + + [deps.OffsetArrays.extensions] + OffsetArraysAdaptExt = "Adapt" + +[[deps.OpenBLAS32_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "46cce8b42186882811da4ce1f4c7208b02deb716" +uuid = "656ef2d0-ae68-5445-9ca0-591084a874a2" +version = "0.3.30+0" + +[[deps.OpenBLAS_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "4536629a-c528-5b80-bd46-f80d51c5b363" +version = "0.3.29+0" + +[[deps.OpenLibm_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "05823500-19ac-5b8b-9628-191a04bc5112" +version = "0.8.7+0" + +[[deps.OpenMPI_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Hwloc_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "TOML", "Zlib_jll"] +git-tree-sha1 = "2f3d05e419b6125ffe06e55784102e99325bdbe2" +uuid = "fe0851c0-eecd-5654-98d4-656369965a5c" +version = "5.0.10+0" + +[[deps.OpenSSL_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "458c3c95-2e84-50aa-8efc-19380b2a3a95" +version = "3.5.4+0" + +[[deps.OpenSpecFun_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl"] +git-tree-sha1 = "1346c9208249809840c91b26703912dff463d335" +uuid = "efe28fd5-8261-553b-a9e1-b2916fc3738e" +version = "0.5.6+0" + +[[deps.OrderedCollections]] +git-tree-sha1 = "05868e21324cede2207c6f0f466b4bfef6d5e7ee" +uuid = "bac558e1-5e72-5ebc-8fee-abe8a469f55d" +version = "1.8.1" + +[[deps.PCRE2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "efcefdf7-47ab-520b-bdef-62a2eaa19f15" +version = "10.44.0+1" + +[[deps.PETSc_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "MPICH_jll", "MicrosoftMPI_jll", "OpenBLAS32_jll", "Pkg"] +git-tree-sha1 = "8384198eba24438cee406ec7ca8854acdcbbd2c8" +uuid = "8fa3689e-f0b9-5420-9873-adf6ccf46f2d" +version = "3.15.2+0" + +[[deps.Parameters]] +deps = ["OrderedCollections", "UnPack"] +git-tree-sha1 = "34c0e9ad262e5f7fc75b10a9952ca7692cfc5fbe" +uuid = "d96e819e-fc66-5662-9728-84c9c7592b0a" +version = "0.12.3" + +[[deps.Parsers]] +deps = ["Dates", "PrecompileTools", "UUIDs"] +git-tree-sha1 = "7d2f8f21da5db6a806faf7b9b292296da42b2810" +uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0" +version = "2.8.3" + +[[deps.PartitionedArrays]] +deps = ["CircularArrays", "Distances", "FillArrays", "IterativeSolvers", "LinearAlgebra", "MPI", "Printf", "Random", "SparseArrays", "SparseMatricesCSR"] +git-tree-sha1 = "03d64368a526494ea667acc52fb0e0f8084d381a" +uuid = "5a9dfac6-5c52-46f7-8278-5e2210713be9" +version = "0.3.5" + +[[deps.Pixman_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LLVMOpenMP_jll", "Libdl"] +git-tree-sha1 = "db76b1ecd5e9715f3d043cec13b2ec93ce015d53" +uuid = "30392449-352a-5448-841d-b1acce4e97dc" +version = "0.44.2+0" + +[[deps.Pkg]] +deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "Random", "SHA", "TOML", "Tar", "UUIDs", "p7zip_jll"] +uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f" +version = "1.12.1" +weakdeps = ["REPL"] + + [deps.Pkg.extensions] + REPLExt = "REPL" + +[[deps.PkgVersion]] +deps = ["Pkg"] +git-tree-sha1 = "f9501cc0430a26bc3d156ae1b5b0c1b47af4d6da" +uuid = "eebad327-c553-4316-9ea0-9fa01ccd7688" +version = "0.3.3" + +[[deps.Polyester]] +deps = ["ArrayInterface", "BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "ManualMemory", "PolyesterWeave", "Static", "StaticArrayInterface", "StrideArraysCore", "ThreadingUtilities"] +git-tree-sha1 = "16bbc30b5ebea91e9ce1671adc03de2832cff552" +uuid = "f517fe37-dbe3-4b94-8317-1923a5111588" +version = "0.7.19" + +[[deps.PolyesterWeave]] +deps = ["BitTwiddlingConvenienceFunctions", "CPUSummary", "IfElse", "Static", "ThreadingUtilities"] +git-tree-sha1 = "645bed98cd47f72f67316fd42fc47dee771aefcd" +uuid = "1d0040c9-8b98-4ee7-8388-3f51789ca0ad" +version = "0.2.2" + +[[deps.PolynomialBases]] +deps = ["ArgCheck", "AutoHashEquals", "FFTW", "FastGaussQuadrature", "LinearAlgebra", "Requires", "SimpleUnPack", "SpecialFunctions"] +git-tree-sha1 = "d04bec789dce5ff61e8f128b6aee0eda09a3855f" +uuid = "c74db56a-226d-5e98-8bb0-a6049094aeea" +version = "0.4.25" + +[[deps.PooledArrays]] +deps = ["DataAPI", "Future"] +git-tree-sha1 = "36d8b4b899628fb92c2749eb488d884a926614d3" +uuid = "2dfb63ee-cc39-5dd5-95bd-886bf059d720" +version = "1.4.3" + +[[deps.PrecompileTools]] +deps = ["Preferences"] +git-tree-sha1 = "07a921781cab75691315adc645096ed5e370cb77" +uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a" +version = "1.3.3" + +[[deps.Preferences]] +deps = ["TOML"] +git-tree-sha1 = "8b770b60760d4451834fe79dd483e318eee709c4" +uuid = "21216c6a-2e73-6563-6e65-726566657250" +version = "1.5.2" + +[[deps.PrettyTables]] +deps = ["Crayons", "LaTeXStrings", "Markdown", "PrecompileTools", "Printf", "Reexport", "StringManipulation", "Tables"] +git-tree-sha1 = "1101cd475833706e4d0e7b122218257178f48f34" +uuid = "08abe8d2-0d0c-5749-adfa-8a2ac140af0d" +version = "2.4.0" + +[[deps.Printf]] +deps = ["Unicode"] +uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7" +version = "1.11.0" + +[[deps.QuadGK]] +deps = ["DataStructures", "LinearAlgebra"] +git-tree-sha1 = "9da16da70037ba9d701192e27befedefb91ec284" +uuid = "1fd47b50-473d-5c70-9696-f719f8f3bcdc" +version = "2.11.2" + + [deps.QuadGK.extensions] + QuadGKEnzymeExt = "Enzyme" + + [deps.QuadGK.weakdeps] + Enzyme = "7da242da-08ed-463a-9acd-ee780be4f1d9" + +[[deps.REPL]] +deps = ["InteractiveUtils", "JuliaSyntaxHighlighting", "Markdown", "Sockets", "StyledStrings", "Unicode"] +uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" +version = "1.11.0" + +[[deps.Random]] +deps = ["SHA"] +uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +version = "1.11.0" + +[[deps.Ratios]] +deps = ["Requires"] +git-tree-sha1 = "1342a47bf3260ee108163042310d26f2be5ec90b" +uuid = "c84ed2f1-dad5-54f0-aa8e-dbefe2724439" +version = "0.4.5" + + [deps.Ratios.extensions] + RatiosFixedPointNumbersExt = "FixedPointNumbers" + + [deps.Ratios.weakdeps] + FixedPointNumbers = "53c48c17-4a7d-5ca2-90c5-79b7896eea93" + +[[deps.RecipesBase]] +deps = ["PrecompileTools"] +git-tree-sha1 = "5c3d09cc4f31f5fc6af001c250bf1278733100ff" +uuid = "3cdcf5f2-1ef4-517c-9805-6587b60abb01" +version = "1.3.4" + +[[deps.Reexport]] +git-tree-sha1 = "45e428421666073eab6f2da5c9d310d99bb12f9b" +uuid = "189a3867-3050-52da-a836-e630ba90ab69" +version = "1.2.2" + +[[deps.Requires]] +deps = ["UUIDs"] +git-tree-sha1 = "62389eeff14780bfe55195b7204c0d8738436d64" +uuid = "ae029012-a4dd-5104-9daa-d747884805df" +version = "1.3.1" + +[[deps.Revise]] +deps = ["CodeTracking", "FileWatching", "JuliaInterpreter", "LibGit2", "LoweredCodeUtils", "OrderedCollections", "REPL", "Requires", "UUIDs", "Unicode"] +git-tree-sha1 = "f6f7d30fb0d61c64d0cfe56cf085a7c9e7d5bc80" +uuid = "295af30f-e4ad-537b-8983-00126c2a3abe" +version = "3.8.0" +weakdeps = ["Distributed"] + + [deps.Revise.extensions] + DistributedExt = "Distributed" + +[[deps.SCOTCH_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll"] +git-tree-sha1 = "7110b749766853054ce8a2afaa73325d72d32129" +uuid = "a8d0f55d-b80e-548d-aff6-1a04c175f0f9" +version = "6.1.3+0" + +[[deps.SHA]] +uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce" +version = "0.7.0" + +[[deps.SIMDTypes]] +git-tree-sha1 = "330289636fb8107c5f32088d2741e9fd7a061a5c" +uuid = "94e857df-77ce-4151-89e5-788b33177be4" +version = "0.1.0" + +[[deps.ScatteredInterpolation]] +deps = ["Combinatorics", "Distances", "LinearAlgebra", "NearestNeighbors"] +git-tree-sha1 = "0d642a08199bbeccd874b33fe3a1b699d345ca79" +uuid = "3f865c0f-6dca-5f4d-999b-29fe1e7e3c92" +version = "0.3.6" + +[[deps.SciMLPublic]] +git-tree-sha1 = "0ba076dbdce87ba230fff48ca9bca62e1f345c9b" +uuid = "431bcebd-1456-4ced-9d72-93c2757fff0b" +version = "1.0.1" + +[[deps.ScopedValues]] +deps = ["HashArrayMappedTries", "Logging"] +git-tree-sha1 = "ac4b837d89a58c848e85e698e2a2514e9d59d8f6" +uuid = "7e506255-f358-4e82-b7e4-beb19740aa63" +version = "1.6.0" + +[[deps.SegregatedVMSSolver]] +deps = ["CSV", "DataFrames", "DataInterpolations", "DelimitedFiles", "FFTW", "FileIO", "FillArrays", "Gridap", "GridapDistributed", "GridapGmsh", "GridapPETSc", "LinearAlgebra", "MPI", "NearestNeighbors", "Parameters", "PartitionedArrays", "Pkg", "Random", "Revise", "ScatteredInterpolation", "SparseArrays", "Statistics", "SyntheticEddyMethod", "Test", "Trapz", "UnPack"] +path = "." +uuid = "90220dfc-fac3-4908-b895-51c1a1f4cb85" +version = "3.0.1" + +[[deps.SentinelArrays]] +deps = ["Dates", "Random"] +git-tree-sha1 = "ebe7e59b37c400f694f52b58c93d26201387da70" +uuid = "91c51154-3ec4-41a3-a24f-3f23e20d615c" +version = "1.4.9" + +[[deps.Serialization]] +uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b" +version = "1.11.0" + +[[deps.Setfield]] +deps = ["ConstructionBase", "Future", "MacroTools", "StaticArraysCore"] +git-tree-sha1 = "c5391c6ace3bc430ca630251d02ea9687169ca68" +uuid = "efcf1570-3423-57d1-acb7-fd33fddbac46" +version = "1.1.2" + +[[deps.SharedArrays]] +deps = ["Distributed", "Mmap", "Random", "Serialization"] +uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383" +version = "1.11.0" + +[[deps.SimpleUnPack]] +git-tree-sha1 = "58e6353e72cde29b90a69527e56df1b5c3d8c437" +uuid = "ce78b400-467f-4804-87d8-8f486da07d0a" +version = "1.1.0" + +[[deps.Sockets]] +uuid = "6462fe0b-24de-5631-8697-dd941f90decc" +version = "1.11.0" + +[[deps.SortingAlgorithms]] +deps = ["DataStructures"] +git-tree-sha1 = "64d974c2e6fdf07f8155b5b2ca2ffa9069b608d9" +uuid = "a2af1166-a08f-5f64-846c-94a0d3cef48c" +version = "1.2.2" + +[[deps.SparseArrays]] +deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"] +uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" +version = "1.12.0" + +[[deps.SparseMatricesCSR]] +deps = ["Atomix", "LinearAlgebra", "Polyester", "SparseArrays", "SuiteSparse"] +git-tree-sha1 = "914e64f3d7a3c7452200c2c637ad12f1aae8aacb" +uuid = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" +version = "0.6.12" + +[[deps.SpecialFunctions]] +deps = ["IrrationalConstants", "LogExpFunctions", "OpenLibm_jll", "OpenSpecFun_jll"] +git-tree-sha1 = "5acc6a41b3082920f79ca3c759acbcecf18a8d78" +uuid = "276daf66-3868-5448-9aa4-cd146d93841b" +version = "2.7.1" +weakdeps = ["ChainRulesCore"] + + [deps.SpecialFunctions.extensions] + SpecialFunctionsChainRulesCoreExt = "ChainRulesCore" + +[[deps.Static]] +deps = ["CommonWorldInvalidations", "IfElse", "PrecompileTools", "SciMLPublic"] +git-tree-sha1 = "49440414711eddc7227724ae6e570c7d5559a086" +uuid = "aedffcd0-7271-4cad-89d0-dc628f76c6d3" +version = "1.3.1" + +[[deps.StaticArrayInterface]] +deps = ["ArrayInterface", "Compat", "IfElse", "LinearAlgebra", "PrecompileTools", "SciMLPublic", "Static"] +git-tree-sha1 = "aa1ea41b3d45ac449d10477f65e2b40e3197a0d2" +uuid = "0d7ed370-da01-4f52-bd93-41d350b8b718" +version = "1.9.0" +weakdeps = ["OffsetArrays", "StaticArrays"] + + [deps.StaticArrayInterface.extensions] + StaticArrayInterfaceOffsetArraysExt = "OffsetArrays" + StaticArrayInterfaceStaticArraysExt = "StaticArrays" + +[[deps.StaticArrays]] +deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"] +git-tree-sha1 = "246a8bb2e6667f832eea063c3a56aef96429a3db" +uuid = "90137ffa-7385-5640-81b9-e52037218182" +version = "1.9.18" +weakdeps = ["ChainRulesCore", "Statistics"] + + [deps.StaticArrays.extensions] + StaticArraysChainRulesCoreExt = "ChainRulesCore" + StaticArraysStatisticsExt = "Statistics" + +[[deps.StaticArraysCore]] +git-tree-sha1 = "6ab403037779dae8c514bad259f32a447262455a" +uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c" +version = "1.4.4" + +[[deps.Statistics]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "ae3bb1eb3bba077cd276bc5cfc337cc65c3075c0" +uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" +version = "1.11.1" +weakdeps = ["SparseArrays"] + + [deps.Statistics.extensions] + SparseArraysExt = ["SparseArrays"] + +[[deps.StatsAPI]] +deps = ["LinearAlgebra"] +git-tree-sha1 = "178ed29fd5b2a2cfc3bd31c13375ae925623ff36" +uuid = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +version = "1.8.0" + +[[deps.StrideArraysCore]] +deps = ["ArrayInterface", "CloseOpenIntervals", "IfElse", "LayoutPointers", "LinearAlgebra", "ManualMemory", "SIMDTypes", "Static", "StaticArrayInterface", "ThreadingUtilities"] +git-tree-sha1 = "83151ba8065a73f53ca2ae98bc7274d817aa30f2" +uuid = "7792a7ef-975c-4747-a70f-980b88e8d1da" +version = "0.5.8" + +[[deps.StringManipulation]] +deps = ["PrecompileTools"] +git-tree-sha1 = "d05693d339e37d6ab134c5ab53c29fce5ee5d7d5" +uuid = "892a3eda-7b42-436c-8928-eab12a02cf0e" +version = "0.4.4" + +[[deps.StyledStrings]] +uuid = "f489334b-da3d-4c2e-b8f0-e476e12c162b" +version = "1.11.0" + +[[deps.SuiteSparse]] +deps = ["Libdl", "LinearAlgebra", "Serialization", "SparseArrays"] +uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9" + +[[deps.SuiteSparse_jll]] +deps = ["Artifacts", "Libdl", "libblastrampoline_jll"] +uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c" +version = "7.8.3+2" + +[[deps.SyntheticEddyMethod]] +deps = ["DataFrames", "FFTW", "FileIO", "Interpolations", "LinearAlgebra", "Statistics", "Test", "XLSX"] +git-tree-sha1 = "c8e1ddd628399b3e9dc4e8d4f66c32d8c50e9666" +uuid = "57cf2c78-4fcb-4d27-9f1f-369b8b08b789" +version = "0.4.4" + +[[deps.TOML]] +deps = ["Dates"] +uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76" +version = "1.0.3" + +[[deps.TableTraits]] +deps = ["IteratorInterfaceExtensions"] +git-tree-sha1 = "c06b2f539df1c6efa794486abfb6ed2022561a39" +uuid = "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c" +version = "1.0.1" + +[[deps.Tables]] +deps = ["DataAPI", "DataValueInterfaces", "IteratorInterfaceExtensions", "OrderedCollections", "TableTraits"] +git-tree-sha1 = "f2c1efbc8f3a609aadf318094f8fc5204bdaf344" +uuid = "bd369af6-aec1-5ad0-b16a-f7cc5008161c" +version = "1.12.1" + +[[deps.Tar]] +deps = ["ArgTools", "SHA"] +uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e" +version = "1.10.0" + +[[deps.Test]] +deps = ["InteractiveUtils", "Logging", "Random", "Serialization"] +uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +version = "1.11.0" + +[[deps.ThreadingUtilities]] +deps = ["ManualMemory"] +git-tree-sha1 = "d969183d3d244b6c33796b5ed01ab97328f2db85" +uuid = "8290d209-cae3-49c0-8002-c8c24d57dab5" +version = "0.5.5" + +[[deps.TranscodingStreams]] +git-tree-sha1 = "0c45878dcfdcfa8480052b6ab162cdd138781742" +uuid = "3bb67fe8-82b1-5028-8e26-92a6c54297fa" +version = "0.11.3" + +[[deps.Trapz]] +git-tree-sha1 = "79eb0ed763084a3e7de81fe1838379ac6a23b6a0" +uuid = "592b5752-818d-11e9-1e9a-2b8ca4a44cd1" +version = "2.0.3" + +[[deps.UUIDs]] +deps = ["Random", "SHA"] +uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" +version = "1.11.0" + +[[deps.UnPack]] +git-tree-sha1 = "387c1f73762231e86e0c9c5443ce3b4a0a9a0c2b" +uuid = "3a884ed6-31ef-47d7-9d2a-63182c4928ed" +version = "1.0.2" + +[[deps.Unicode]] +uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5" +version = "1.11.0" + +[[deps.UnsafeAtomics]] +git-tree-sha1 = "b13c4edda90890e5b04ba24e20a310fbe6f249ff" +uuid = "013be700-e6cd-48c3-b4a1-df204f14c38f" +version = "0.3.0" + + [deps.UnsafeAtomics.extensions] + UnsafeAtomicsLLVM = ["LLVM"] + + [deps.UnsafeAtomics.weakdeps] + LLVM = "929cbde3-209d-540e-8aea-75f648917ca0" + +[[deps.VTKBase]] +git-tree-sha1 = "c2d0db3ef09f1942d08ea455a9e252594be5f3b6" +uuid = "4004b06d-e244-455f-a6ce-a5f9919cc534" +version = "1.0.1" + +[[deps.WeakRefStrings]] +deps = ["DataAPI", "InlineStrings", "Parsers"] +git-tree-sha1 = "b1be2855ed9ed8eac54e5caff2afcdb442d52c23" +uuid = "ea10d353-3f73-51f8-a26c-33c1cb351aa5" +version = "1.4.2" + +[[deps.WoodburyMatrices]] +deps = ["LinearAlgebra", "SparseArrays"] +git-tree-sha1 = "248a7031b3da79a127f14e5dc5f417e26f9f6db7" +uuid = "efce3f68-66dc-5838-9240-27a6d6f5f9b6" +version = "1.1.0" + +[[deps.WorkerUtilities]] +git-tree-sha1 = "cd1659ba0d57b71a464a29e64dbc67cfe83d54e7" +uuid = "76eceee3-57b5-4d4a-8e66-0e911cebbf60" +version = "1.6.1" + +[[deps.WriteVTK]] +deps = ["Base64", "CodecZlib", "FillArrays", "LightXML", "TranscodingStreams", "VTKBase"] +git-tree-sha1 = "a329e0b6310244173690d6a4dfc6d1141f9b9370" +uuid = "64499a7a-5c06-52f2-abe2-ccb03c286192" +version = "1.21.2" + +[[deps.XLSX]] +deps = ["Artifacts", "Dates", "EzXML", "Printf", "Tables", "ZipArchives", "ZipFile"] +git-tree-sha1 = "7fca49e6dbb35b7b7471956c2a9d3d921360a00f" +uuid = "fdbf4ff8-1666-58a4-91e7-1b58723a45e0" +version = "0.10.4" + +[[deps.XML2_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Libiconv_jll", "Zlib_jll"] +git-tree-sha1 = "5c959b708667b34cb758e8d7c6f8e69b94c32deb" +uuid = "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a" +version = "2.15.1+0" + +[[deps.Xorg_libX11_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libxcb_jll", "Xorg_xtrans_jll"] +git-tree-sha1 = "808090ede1d41644447dd5cbafced4731c56bd2f" +uuid = "4f6342f7-b3d2-589e-9d20-edeb45f2b2bc" +version = "1.8.13+0" + +[[deps.Xorg_libXau_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "aa1261ebbac3ccc8d16558ae6799524c450ed16b" +uuid = "0c0b7dd1-d40b-584c-a123-a41640f87eec" +version = "1.0.13+0" + +[[deps.Xorg_libXdmcp_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "52858d64353db33a56e13c341d7bf44cd0d7b309" +uuid = "a3789734-cfe1-5b06-b2d0-1dd0d9d62d05" +version = "1.1.6+0" + +[[deps.Xorg_libXext_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "1a4a26870bf1e5d26cd585e38038d399d7e65706" +uuid = "1082639a-0dae-5f34-9b06-72781eeb8cb3" +version = "1.3.8+0" + +[[deps.Xorg_libXfixes_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "75e00946e43621e09d431d9b95818ee751e6b2ef" +uuid = "d091e8ba-531a-589c-9de9-94069b037ed8" +version = "6.0.2+0" + +[[deps.Xorg_libXft_jll]] +deps = ["Artifacts", "Fontconfig_jll", "JLLWrappers", "Libdl", "Xorg_libXrender_jll"] +git-tree-sha1 = "d893c27836da7986c3248997a2a9535e5e4d8a95" +uuid = "2c808117-e144-5220-80d1-69d4eaa9352c" +version = "2.3.9+0" + +[[deps.Xorg_libXinerama_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXext_jll"] +git-tree-sha1 = "0ba01bc7396896a4ace8aab67db31403c71628f4" +uuid = "d1454406-59df-5ea1-beac-c340f2130bc3" +version = "1.1.7+0" + +[[deps.Xorg_libXrender_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libX11_jll"] +git-tree-sha1 = "7ed9347888fac59a618302ee38216dd0379c480d" +uuid = "ea2f1a96-1ddc-540d-b46f-429655e07cfa" +version = "0.9.12+0" + +[[deps.Xorg_libxcb_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Xorg_libXau_jll", "Xorg_libXdmcp_jll"] +git-tree-sha1 = "bfcaf7ec088eaba362093393fe11aa141fa15422" +uuid = "c7cfdc94-dc32-55de-ac96-5a1b8d977c5b" +version = "1.17.1+0" + +[[deps.Xorg_xtrans_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "a63799ff68005991f9d9491b6e95bd3478d783cb" +uuid = "c5fb5394-a638-5e4d-96e5-b29de1b5cf10" +version = "1.6.0+0" + +[[deps.ZipArchives]] +deps = ["ArgCheck", "CodecInflate64", "CodecZlib", "InputBuffers", "PrecompileTools", "TranscodingStreams", "Zlib_jll"] +git-tree-sha1 = "83f728ecb873c58b794964f8b4bed811814d4b0d" +uuid = "49080126-0e18-4c2a-b176-c102e4b3760c" +version = "2.6.0" + +[[deps.ZipFile]] +deps = ["Libdl", "Printf", "Zlib_jll"] +git-tree-sha1 = "f492b7fe1698e623024e873244f10d89c95c340a" +uuid = "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea" +version = "0.10.1" + +[[deps.Zlib_jll]] +deps = ["Libdl"] +uuid = "83775a58-1f1d-513f-b197-d71354ab007a" +version = "1.3.1+2" + +[[deps.gmsh_jll]] +deps = ["Artifacts", "Cairo_jll", "CompilerSupportLibraries_jll", "FLTK_jll", "FreeType2_jll", "GLU_jll", "GMP_jll", "HDF5_jll", "JLLWrappers", "JpegTurbo_jll", "LLVMOpenMP_jll", "Libdl", "Libglvnd_jll", "METIS_jll", "MMG_jll", "OCCT_jll", "Xorg_libX11_jll", "Xorg_libXext_jll", "Xorg_libXfixes_jll", "Xorg_libXft_jll", "Xorg_libXinerama_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"] +git-tree-sha1 = "fdca60995cf57a52a571b3eb13284703a0b79f93" +uuid = "630162c2-fc9b-58b3-9910-8442a8a132e6" +version = "4.15.0+0" + +[[deps.libaec_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl"] +git-tree-sha1 = "13b760f97c6e753b47df30cb438d4dc3b50df282" +uuid = "477f73a3-ac25-53e9-8cc3-50b2fa2566f0" +version = "1.1.5+0" + +[[deps.libblastrampoline_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850b90-86db-534c-a0d3-1478176c7d93" +version = "5.15.0+0" + +[[deps.libpng_jll]] +deps = ["Artifacts", "JLLWrappers", "Libdl", "Zlib_jll"] +git-tree-sha1 = "e015f211ebb898c8180887012b938f3851e719ac" +uuid = "b53b4c65-9356-5827-b1ea-8c7a1a84506f" +version = "1.6.55+0" + +[[deps.nghttp2_jll]] +deps = ["Artifacts", "Libdl"] +uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d" +version = "1.64.0+1" + +[[deps.oneTBB_jll]] +deps = ["Artifacts", "JLLWrappers", "LazyArtifacts", "Libdl"] +git-tree-sha1 = "1350188a69a6e46f799d3945beef36435ed7262f" +uuid = "1317d2d5-d96f-522e-a858-c73665f53c3e" +version = "2022.0.0+1" + +[[deps.p7zip_jll]] +deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"] +uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0" +version = "17.7.0+0" diff --git a/TGV2D.jl b/TGV2D.jl new file mode 100644 index 00000000..d2ba0b9e --- /dev/null +++ b/TGV2D.jl @@ -0,0 +1,61 @@ +using PartitionedArrays +using SegregatedVMSSolver +using SegregatedVMSSolver.ParametersDef +using SegregatedVMSSolver.SolverOptions +using MPI + + + + + +t0 = 0.0 +dt = 0.01 +tF = 10*dt +vortex_diameter = 1.0 +N = 16 +Re = 1600 +D = 2 + +backend = with_debug + +rank_partition = (2,2) + + + + + +# solver_options = petsc_options(; vel_ksp="gmres", vel_pc="gamg", pres_ksp="cg", pres_pc="gamg") +solver_options = " -vel_ksp_type gmres -vel_pc_type gamg -vel_ksp_rtol 1.e-10 -vel_ksp_converged_reason \ + -pres_ksp_type cg -pres_pc_type gamg -pres_ksp_rtol 1.e-6 -pres_ksp_converged_reason \ + -ksp_atol 0.0 -vec_type cuda -mat_type aijcusparse -log_view" +sprob = StabilizedProblem(VMS(3)) +timep = TimeParameters(t0=t0, dt=dt, tF=tF) + +physicalp = PhysicalParameters(Re=Re, c=vortex_diameter) +solverp = SolverParameters(matrix_freq_update=1, Number_Skip_Expansion=10e6, M=40, +petsc_options=solver_options) +exportp = ExportParameters(printinitial=true, printmodel=true, +vtu_export = ["uh","ph","uh_analytic", "ph_analytic"], extra_export=["VelocityError","PressureError"]) + + + + +meshp = MeshParameters(rank_partition, D; N=N, L=0.5 * vortex_diameter) +simparams = SimulationParameters(timep, physicalp, solverp, exportp) +bc_tgv = Periodic(meshp, physicalp) + + + +mcase = TaylorGreen(bc_tgv, meshp, simparams, sprob) + + + +# Create folder and file +# mkdir("Log") +# open("Log/PrintSim.txt", "w") do file +# end + + + +SegregatedVMSSolver.solve(mcase, backend) + diff --git a/TGV_L2_absolute_ERRRORS.csv b/TGV_L2_absolute_ERRRORS.csv deleted file mode 100644 index 37e920db..00000000 --- a/TGV_L2_absolute_ERRRORS.csv +++ /dev/null @@ -1,146 +0,0 @@ -time,VelocityError,PressureError -0.01,0.00025253817108120325,0.004069576172133254 -0.02,0.0005136425431054051,0.002163953989422518 -0.03,0.0007556446480630974,0.002435962603319504 -0.04,0.0010049306414511474,0.0027118445040605053 -0.05,0.0012535414473614304,0.002642529652029848 -0.06,0.0015012949632415376,0.0027582265715153324 -0.07,0.0017488707529352836,0.002868091131212968 -0.08,0.001996062458326427,0.0029691955564937816 -0.09,0.002242944768297834,0.0030939594103017234 -0.1,0.0024895773837432075,0.0032260667140354663 -0.11,0.0027360205568579786,0.003366730036958924 -0.12,0.0029823379285940613,0.0035165389969408524 -0.13,0.0032286153738063923,0.0036746792386952694 -0.14,0.003474930946613479,0.003840218060243836 -0.15,0.003721382391202468,0.004013730742154784 -0.16,0.003968062663460289,0.004194268433179395 -0.17,0.0042150806998400535,0.00438247300830002 -0.18,0.004462542109598001,0.004577631090086977 -0.19,0.004710565408661543,0.004780480615960376 -0.2,0.004959266029749038,0.0049903799885994155 -0.21,0.0052087693549472,0.0052080910487915955 -0.22,0.0054591975066000595,0.005432929171637645 -0.23,0.005710679896884896,0.0056655603768461715 -0.24,0.0059633422897594,0.005905159140185867 -0.25,0.006217315368610169,0.0061522325528514275 -0.26,0.006472725689067154,0.006405809863931449 -0.27,0.006729702685336403,0.0066662861702886985 -0.28,0.006988371202586094,0.00693263016638791 -0.29,0.007248857230751169,0.007205225033732663 -0.3,0.0075112817243973935,0.007483063231709162 -0.31,0.007775765267469429,0.0077665530956409256 -0.32,0.008042422979262028,0.008054698483096215 -0.33,0.008311368321830688,0.008347867062247003 -0.34,0.00858270898405765,0.008644981354161975 -0.35,0.008856550017156418,0.00894626931515349 -0.36,0.009132990588647538,0.009250508401499567 -0.37,0.00941212656118114,0.009557764194859703 -0.38,0.009694047974337733,0.009866692903610428 -0.39,0.00997884113926613,0.01017727524436516 -0.4,0.010266586693507931,0.010488155129256473 -0.41,0.010557361277396548,0.010799336050987068 -0.42,0.010851236023541232,0.011109548618597502 -0.43,0.011148277884936511,0.011418886048574595 -0.44,0.011448548468986323,0.011726199046752853 -0.45,0.011752105084361197,0.012031666348309168 -0.46,0.012058999891950868,0.012334228143094829 -0.47,0.012369280719718857,0.01263409874805922 -0.48,0.012682990553674224,0.012930250186526736 -0.49,0.013000168122936332,0.01322287898188284 -0.5,0.013320847752266177,0.013510958240374599 -0.51,0.013645059662131488,0.013794649999679137 -0.52,0.013972830167940356,0.014072936612007007 -0.53,0.014304181630618893,0.01434597744452148 -0.54,0.014639132957975257,0.014612812444367542 -0.55,0.014977699203455977,0.014873652605174573 -0.56,0.015319892313185306,0.015127648648851173 -0.57,0.015665720469139926,0.015375103531783195 -0.58,0.016015189009829428,0.01561530297253511 -0.59,0.01636829968499036,0.015848645131980105 -0.6,0.016725051645750052,0.016074537184012472 -0.61,0.01708544078577942,0.016293444734399087 -0.62,0.017449460664530618,0.016504863294593723 -0.63,0.017817102056363904,0.016709292484418752 -0.64,0.018188353669589128,0.016906290064431232 -0.65,0.018563201951689066,0.017096373134850414 -0.66,0.018941631534553922,0.017279157398416976 -0.67,0.019323625296365412,0.01745518281034661 -0.68,0.01970916457773177,0.01762413597611763 -0.69,0.020098229460202666,0.017786594628885915 -0.7,0.020490798870921565,0.017942329323006687 -0.71,0.020886850968773716,0.018091961529573264 -0.72,0.021286363241577073,0.018235342529879447 -0.73,0.021689312827546058,0.018373123300631147 -0.74,0.022095676659206753,0.01850521198693088 -0.75,0.02250543156404538,0.0186322577408617 -0.76,0.022918554487711695,0.01875419064651661 -0.77,0.02333502231529468,0.01887162377488761 -0.78,0.02375481219805694,0.018984479283733126 -0.79,0.024177901130538297,0.019093312348200445 -0.8,0.024604266367370734,0.019198024893090852 -0.81,0.02503388482914124,0.019299112914854026 -0.82,0.0254667335529717,0.019396466805524083 -0.83,0.02590278901210108,0.019490541639951005 -0.84,0.026342027549073176,0.019581241762584526 -0.85,0.026784424710779818,0.019669012715296193 -0.86,0.027229955659988786,0.019753807766524644 -0.87,0.027678594627981404,0.01983610003113995 -0.88,0.028130315333223913,0.01991592988409526 -0.89,0.028585090611551466,0.01999383306279235 -0.9,0.029042892859111262,0.0200699701391524 -0.91,0.029503693832163502,0.020144972556690538 -0.92,0.029967465095718814,0.02021914628055536 -0.93,0.030434177938053295,0.02029323684695323 -0.94,0.03090380378606869,0.020367709445091607 -0.95,0.031376314176048595,0.02044343034490591 -0.96,0.03185168110138661,0.02052102351017648 -0.97,0.032329877006329506,0.020601468966473715 -0.98,0.032810875045250834,0.02068553575169221 -0.99,0.03329464909189366,0.02077429841296378 -1.0,0.033781173903252235,0.02086864580510614 -1.01,0.03427042515228208,0.020969717106644484 -1.02,0.03476237950108574,0.021078485503963414 -1.03,0.03525701466004588,0.02119611445826831 -1.04,0.03575430937348616,0.021323615461725533 -1.05,0.03625424348097713,0.021462126210667655 -1.06,0.03675679781578854,0.02161263854224481 -1.07,0.0372619542333528,0.0217762022497357 -1.08,0.037769695454457464,0.02195372112492891 -1.09,0.03828000505926295,0.02214608455606048 -1.1,0.03879286735174141,0.022354030772050094 -1.11,0.03930826733877937,0.022578210785429122 -1.12,0.039826190671316264,0.02281911734466804 -1.13,0.04034662358735621,0.023077087849674226 -1.14,0.04086955291149626,0.023352297758835575 -1.15,0.04139496590940323,0.023644710338321627 -1.16,0.04192285030272606,0.023954133020527946 -1.17,0.04245319403330929,0.024280121438507874 -1.18,0.04298598529510981,0.024622096315133964 -1.19,0.04352121227573942,0.024979208549647476 -1.2,0.044058863226943454,0.025350511011170498 -1.21,0.04459892625232805,0.025734789829648854 -1.22,0.04514138940379841,0.02613078279619582 -1.23,0.04568624054113001,0.026536979623447712 -1.24,0.04623346741558134,0.02695187712746065 -1.25,0.04678305760188496,0.027373750320138668 -1.26,0.04733499854060246,0.027800934718277014 -1.27,0.047889277534856764,0.028231570995727987 -1.28,0.04844588174277508,0.02866390684390375 -1.29,0.04900479822554646,0.02909601977775547 -1.3,0.04956601390533133,0.029526133678795433 -1.31,0.050129515660990984,0.029952325863829052 -1.32,0.05069529029328392,0.03037285526670859 -1.33,0.05126332466978508,0.030785859932065198 -1.34,0.05183360572629681,0.031189694033326044 -1.35,0.052406120627332506,0.03158262053007921 -1.36,0.052980856778843684,0.0319631533566473 -1.37,0.05355780193662498,0.03232974807038597 -1.38,0.05413694418621842,0.032681144693182916 -1.39,0.05471827196393145,0.03301605790293186 -1.4,0.055301774003231254,0.033333515973923124 -1.41,0.055887439296969495,0.033632551851921065 -1.42,0.05647525704208753,0.03391253438971939 -1.43,0.057065216581841154,0.03417286213192027 -1.44,0.0576573073509969,0.034413283759068714 -1.45,0.058251518793764834,0.034633598389629414 diff --git a/TGV_L2_relative_ERRRORS.csv b/TGV_L2_relative_ERRRORS.csv deleted file mode 100644 index 44d57655..00000000 --- a/TGV_L2_relative_ERRRORS.csv +++ /dev/null @@ -1,146 +0,0 @@ -time,VelocityError,PressureError -0.01,0.0003182909775530546,0.016293461972734322 -0.02,0.0006476320382118551,0.00867243080653409 -0.03,0.0009531361772987464,0.00977219375624413 -0.04,0.001268070509886834,0.010889673724248733 -0.05,0.0015823988135456903,0.01062181137219153 -0.06,0.0018958901909226968,0.01109780999179004 -0.07,0.0022094019538651693,0.011551248449727753 -0.08,0.002522673106718679,0.011970255265338568 -0.09,0.0028357975787342187,0.012485555032655428 -0.1,0.003148850489520286,0.013031524265364722 -0.11,0.0034619077740450934,0.013613155266565934 -0.12,0.0037750497757108492,0.014232938529514908 -0.13,0.004088385118336737,0.014887686086390926 -0.14,0.004402012688250767,0.015573717210430714 -0.15,0.004716056479084079,0.016293457983805118 -0.16,0.005030634607349068,0.017043150675206623 -0.17,0.005345885641333005,0.01782549271694544 -0.18,0.005661944143607086,0.018637674157611233 -0.19,0.005978961267987444,0.019482788574338137 -0.2,0.0062970844882565,0.020358313763494108 -0.21,0.006616474145352784,0.021267448365432103 -0.22,0.006937286686614005,0.022207490946673073 -0.23,0.007259688068936767,0.02318125551945218 -0.24,0.007583839866555548,0.024185458193214035 -0.25,0.007909910162212094,0.025222265227280126 -0.26,0.008238062044795774,0.026287786581194482 -0.27,0.00856846251990242,0.027383727283422397 -0.28,0.008901273005387619,0.028505933780539172 -0.29,0.009236656626242352,0.02965605784093297 -0.3,0.00957477033960897,0.03083002786834327 -0.31,0.009915770870954847,0.03202959515808711 -0.32,0.010259808214749927,0.033250719942232505 -0.33,0.010607030480055289,0.03449498187737334 -0.34,0.010957578631680478,0.03575798921724163 -0.35,0.011311590480616434,0.037040737704736766 -0.36,0.011669196530142685,0.038338215394451425 -0.37,0.012030523257539994,0.03965073426943191 -0.38,0.01239568988596764,0.04097275485368077 -0.39,0.012764811049512556,0.04230422133620636 -0.4,0.013137994294789308,0.04363951540799619 -0.41,0.01351534221300716,0.04497865909930145 -0.42,0.013896950495615156,0.046316367782523855 -0.43,0.014282909622214441,0.04765302234030131 -0.44,0.014673303355822998,0.048983814837302846 -0.45,0.015068210071885265,0.050309471409918594 -0.46,0.015467701658582191,0.05162553710778252 -0.47,0.015871844549663446,0.052932877609070984 -0.48,0.016280699060285304,0.05422715211553848 -0.49,0.016694320126314815,0.05550914314445412 -0.5,0.01711275710431916,0.0567744954552763 -0.51,0.01753605414626009,0.05802383763264872 -0.52,0.017964250445444717,0.05925283388666415 -0.53,0.01839738016325646,0.06046209200954544 -0.54,0.018835473064403592,0.06164749978794238 -0.55,0.019278553991869608,0.06280987409268801 -0.56,0.019726643819244532,0.06394555332779232 -0.57,0.020179758596900972,0.06505573695339076 -0.58,0.020637910729047675,0.06613732090138577 -0.59,0.021101108005835267,0.0671919053064007 -0.6,0.02156935487136529,0.0682168912584039 -0.61,0.022042651567199156,0.06921416593770871 -0.62,0.022520995315795492,0.07018149914896128 -0.63,0.023004379732537734,0.07112092591042253 -0.64,0.023492795747516337,0.07203047659739202 -0.65,0.023986231348681317,0.07291226534481662 -0.66,0.024484672151711396,0.07376456675868046 -0.67,0.024988101475489483,0.07458959831743457 -0.68,0.02549650061730607,0.07538593629364577 -0.69,0.02600984920943618,0.07615596699573114 -0.7,0.026528125351460714,0.0768986268589808 -0.71,0.02705130610747496,0.07761649880084083 -0.72,0.02757936763007062,0.07830886864234558 -0.73,0.028112285575296343,0.07897845709126242 -0.74,0.02865003528836612,0.07962479947463379 -0.75,0.029192591933676137,0.08025062099621194 -0.76,0.029739930784155193,0.08085555762081004 -0.77,0.030292026989528115,0.08144219148930094 -0.78,0.030848856000449846,0.0820101304234548 -0.79,0.03141039301974767,0.08256171804665371 -0.8,0.031976613543713915,0.08309647983040207 -0.81,0.03254749259027358,0.08361651338073375 -0.82,0.033123005284166354,0.08412129821970961 -0.83,0.033703125971897105,0.08461276331508036 -0.84,0.03428782878415498,0.0850904521411241 -0.85,0.03487708676959526,0.08555626054897113 -0.86,0.035470872428896,0.08600994855525831 -0.87,0.036069157000480134,0.08645354099561256 -0.88,0.03667191100395512,0.08688718286248875 -0.89,0.037279103756508815,0.08731318303239871 -0.9,0.037890703948555496,0.08773221959369502 -0.91,0.03850667938131792,0.08814703372124834 -0.92,0.03912699755095932,0.08855895187867788 -0.93,0.03975162553642039,0.08897123299769885 -0.94,0.04038053054142935,0.08938591856714137 -0.95,0.0410136798565961,0.08980682006336267 -0.96,0.04165104131436832,0.09023669851653589 -0.97,0.042292583281966535,0.09067989307712361 -0.98,0.04293827500178995,0.0911398303781718 -0.99,0.043588086605273246,0.09162129790428879 -1.0,0.04424198932929698,0.09212828218215852 -1.01,0.04489995556123628,0.09266589154909553 -1.02,0.0455619589371594,0.09323852012254358 -1.03,0.04622797442182275,0.09385142169075227 -1.04,0.04689797829247363,0.09450919704275776 -1.05,0.047571948221871045,0.09521702481281565 -1.06,0.0482498631477178,0.09597945608415001 -1.07,0.048931703312516346,0.09680131725665378 -1.08,0.049617450060123955,0.0976868038182962 -1.09,0.05030708583004866,0.09864006332917201 -1.1,0.05100059398137223,0.09966458542422364 -1.11,0.05169795876707006,0.10076348389366689 -1.12,0.05239916525831969,0.10193917740478298 -1.13,0.05310419927109791,0.10319339907743065 -1.14,0.05381304736702222,0.10452716356574711 -1.15,0.05452569666312879,0.1059405383456118 -1.16,0.05524213485261908,0.10743289179339996 -1.17,0.0559623498951775,0.10900245890948089 -1.18,0.05668633005960202,0.11064686100630475 -1.19,0.057414063583463945,0.11236249582325084 -1.2,0.05814553876609166,0.11414530504114495 -1.21,0.058880743688471154,0.11599001167298152 -1.22,0.059619666340229416,0.11789109941779462 -1.23,0.06036229443395188,0.1198419095001197 -1.24,0.061108615515199874,0.12183578863183614 -1.25,0.061858616872299904,0.12386505330771536 -1.26,0.06261228559191068,0.1259222634821244 -1.27,0.06336960855434783,0.12799906612530754 -1.28,0.06413057242322065,0.13008756074482783 -1.29,0.06489516370869391,0.1321790424488993 -1.3,0.06566336871147019,0.134265437481572 -1.31,0.06643517364929316,0.1363379730496876 -1.32,0.06721056461068334,0.1383886692537883 -1.33,0.06798952774693097,0.14040896340972242 -1.34,0.06877204927412343,0.14239124584742685 -1.35,0.06955811568631246,0.1443274601933947 -1.36,0.07034771377297748,0.14621066652956316 -1.37,0.07114083076361666,0.14803363050326718 -1.38,0.0719374543019144,0.14979039331665558 -1.39,0.0727375724745015,0.15147485671934416 -1.4,0.07354117374054336,0.15308233894252127 -1.41,0.07434824688222595,0.1546081616296403 -1.42,0.07515878093181173,0.15604917408494023 -1.43,0.07597276509522624,0.1574023504141882 -1.44,0.07679018867942694,0.15866626761406014 -1.45,0.07761104098328185,0.15983973035920085 diff --git a/src/Commons/MatrixCreation.jl b/src/Commons/MatrixCreation.jl index b45b679f..5e67063a 100644 --- a/src/Commons/MatrixCreation.jl +++ b/src/Commons/MatrixCreation.jl @@ -52,7 +52,7 @@ function inv_lump_vel_mass!(Mat_inv_ML::PVector, Mat_ML::PSparseMatrix) j = 1 for i in rowvals(val) V[i] += vals[j] - j + 1 + j = j + 1 end V = 1 ./ V @@ -172,7 +172,7 @@ function update_all_matrices_vectors!(matrices::Tuple, u_adv, params, simcase) update_matrix!(S,Mat_S,Ptn1, Q) - Mat_inv_ML = allocate_Mat_inv_ML(Mat_ML) + # Mat_inv_ML = allocate_Mat_inv_ML(Mat_ML) inv_lump_vel_mass!(Mat_inv_ML, Mat_ML) Vec_Ap .= Vec_Apu + Vec_App diff --git a/src/Commons/SolveProblem.jl b/src/Commons/SolveProblem.jl index ede79f9b..cc8f5f20 100644 --- a/src/Commons/SolveProblem.jl +++ b/src/Commons/SolveProblem.jl @@ -82,6 +82,7 @@ matrices, vectors, (uh_avg,ph_avg) = init_values GridapPETSc.with(args=split(petsc_options)) do + run(`nvidia-smi`) Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, From 34e7de0908c0e7652b141b021b8eef73a91b0af7 Mon Sep 17 00:00:00 2001 From: carlodev Date: Mon, 4 May 2026 11:03:56 +0200 Subject: [PATCH 39/42] run(`nvidia-smi`) if cuda type --- src/Commons/SolveProblem.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commons/SolveProblem.jl b/src/Commons/SolveProblem.jl index cc8f5f20..f20ca6bc 100644 --- a/src/Commons/SolveProblem.jl +++ b/src/Commons/SolveProblem.jl @@ -82,7 +82,7 @@ matrices, vectors, (uh_avg,ph_avg) = init_values GridapPETSc.with(args=split(petsc_options)) do - run(`nvidia-smi`) + any(kw -> occursin(kw, petsc_options), ["cuda", "aijcusparse"]) && run(`nvidia-smi`) Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, From d307b11db6bd7512f6132c0af65aa75d56b48765 Mon Sep 17 00:00:00 2001 From: carlodev Date: Thu, 7 May 2026 09:49:48 +0200 Subject: [PATCH 40/42] custom limiter dt --- .../Equations/StabilizationOperations.jl | 117 +++++++++++------- src/Commons/ParametersDef/ParametersDef.jl | 7 ++ .../ParametersDef/StabilizationStruct.jl | 102 +++++++++++++-- 3 files changed, 167 insertions(+), 59 deletions(-) diff --git a/src/Commons/Equations/StabilizationOperations.jl b/src/Commons/Equations/StabilizationOperations.jl index e8d97ac3..cec8bc13 100644 --- a/src/Commons/Equations/StabilizationOperations.jl +++ b/src/Commons/Equations/StabilizationOperations.jl @@ -1,43 +1,86 @@ val_u(x) = x val_u(x::Gridap.Fields.ForwardDiff.Dual) = x.value -function compute_stab_coeff(coeff_method::ScalarFormulation,Ω,D::Int64) +# ── Effective Δt computation ─────────────────────────────────────────────────── + +""" + compute_dt_eff(dt, limiter, uun, G, GG, ν) -> Float64 + +Return the effective Δt to be used in τ_M, based on the chosen limiter. +All methods guarantee Δt_eff ≥ dt. +""" +function compute_dt_eff(dt::Float64, ::NoLimiter, uun, G, GG, ν::Float64) + return dt +end + +function compute_dt_eff(dt::Float64, limiter::AdvectiveLimiter, uun, G, GG, ν::Float64) + uu_new = VectorValue(val_u.(uun)...) + iszero(norm(uu_new)) && return dt + adv = uu_new ⋅ G ⋅ uu_new + iszero(adv) && return dt + return max(dt, limiter.C_adv / sqrt(adv)) +end + +function compute_dt_eff(dt::Float64, limiter::DiffusiveLimiter, uun, G, GG, ν::Float64) + iszero(ν) && return dt + return max(dt, limiter.C_diff / (ν * sqrt(GG))) +end + +function compute_dt_eff(dt::Float64, limiter::CombinedLimiter, uun, G, GG, ν::Float64) + uu_new = VectorValue(val_u.(uun)...) + adv = uu_new ⋅ G ⋅ uu_new + dt_adv = (iszero(norm(uu_new)) || iszero(adv)) ? Inf : limiter.C_adv / sqrt(adv) + dt_diff = iszero(ν) ? Inf : limiter.C_diff / (ν * sqrt(GG)) + return max(dt, min(dt_adv, dt_diff)) +end + +function compute_dt_eff(dt::Float64, limiter::CustomLimiter, uun, G, GG, ν::Float64) + return limiter.f(dt, uun, G, GG, ν) +end + +# ── Stabilization coefficient dispatch ──────────────────────────────────────── + +function compute_stab_coeff(coeff_method::ScalarFormulation, Ω, D::Int64) h = h_param(Ω, D) return ScalarStabilization(h) end -function compute_stab_coeff(coeff_method::TensorFormulation,Ω,D::Int64) +function compute_stab_coeff(coeff_method::TensorFormulation, Ω, D::Int64) G, GG, gg = G_params(Ω, D) return TensorStabilization(G, GG, gg) end -function compute_stab_coeff(simcase::SimulationCase,params::Dict{Symbol,Any}) +function compute_stab_coeff(simcase::SimulationCase, params::Dict{Symbol,Any}) @unpack Ω = params - @sunpack D,coeff_method =simcase - compute_stab_coeff(coeff_method,Ω,D) + @sunpack D, coeff_method = simcase + compute_stab_coeff(coeff_method, Ω, D) end - +# ── Momentum stabilization ───────────────────────────────────────────────────── """ - momentum_stabilization(uu, stab_coeff::TensorStabilization,simcase::SimulationCase ) + momentum_stabilization(uu, stab_coeff::TensorStabilization, simcase) -Stabilization parameter momentum stabilization -Bazilevs, Y., Calo, V. M., Cottrell, J. A., Hughes, T. J. R., Reali, A., & Scovazzi, G. (2007). Variational multiscale residual-based turbulence modeling for large eddy simulation of incompressible flows. Computer Methods in Applied Mechanics and Engineering, 197(1–4), 173–201. https://doi.org/10.1016/j.cma.2007.07.016 +τ_M from Bazilevs et al. (2007), with an optional Δt floor enforced +through the `dt_limiter` field of `TensorFormulation`. This prevents +τ_M → 0 (and consequently τ_C → ∞) when Δt is very small relative to +the mesh advective or diffusive time scales. """ -function momentum_stabilization(uu, stab_coeff::TensorStabilization,simcase::SimulationCase ) - @unpack G,GG,gg = stab_coeff +function momentum_stabilization(uu, stab_coeff::TensorStabilization, simcase::SimulationCase) + @unpack G, GG, gg = stab_coeff @unpack sprob = simcase - @unpack Ci = sprob.coeff_method + @unpack Ci, dt_limiter = sprob.coeff_method @sunpack ν, dt = simcase function τm(uun, G, GG) - τ₁ = Ci[1] * (2 / dt)^2 - τ₃ = Ci[2] * (ν^2 * GG ) + dt_eff = compute_dt_eff(dt, dt_limiter, uun, G, GG, ν) + println("Stabilization Using: dt = $(dt_eff), while physical dt = $dt") - uu_new = VectorValue(val_u.(uun)...) + τ₁ = Ci[1] * (2 / dt_eff)^2 + τ₃ = Ci[2] * (ν^2 * GG) + uu_new = VectorValue(val_u.(uun)...) if iszero(norm(uu_new)) return (τ₁ .+ τ₃) .^ (-1 / 2) end @@ -46,63 +89,41 @@ function momentum_stabilization(uu, stab_coeff::TensorStabilization,simcase::Sim return (τ₁ .+ τ₂ .+ τ₃) .^ (-1 / 2) end - - return τm ∘ (uu, G, GG) - - end - """ - continuity_stabilization(uu, stab_coeff::TensorStabilization,simcase::SimulationCase ) + continuity_stabilization(uu, stab_coeff::TensorStabilization, simcase) -Stabilization parameter continuity -Bazilevs, Y., Calo, V. M., Cottrell, J. A., Hughes, T. J. R., Reali, A., & Scovazzi, G. (2007). Variational multiscale residual-based turbulence modeling for large eddy simulation of incompressible flows. Computer Methods in Applied Mechanics and Engineering, 197(1–4), 173–201. https://doi.org/10.1016/j.cma.2007.07.016 +τ_C = 1 / (τ_M · g·g). Inherits the Δt floor through τ_M automatically. """ -function continuity_stabilization(uu, stab_coeff::TensorStabilization,simcase::SimulationCase) - @unpack gg = stab_coeff - - return 1 / (momentum_stabilization(uu,stab_coeff,simcase) ⋅ gg) #Standard VMS - +function continuity_stabilization(uu, stab_coeff::TensorStabilization, simcase::SimulationCase) + @unpack gg = stab_coeff + return 1 / (momentum_stabilization(uu, stab_coeff, simcase) ⋅ gg) end -""" - momentum_stabilization(uu, stab_coeff::ScalarStabilization,simcase::SimulationCase ) - -Stabilization parameters momentum equation -Janssens, B. (2014). Numerical modeling and experimental investigation of fine particle coagulation and dispersion in dilute flows. -""" -function momentum_stabilization(uu, stab_coeff::ScalarStabilization,simcase::SimulationCase ) - @unpack h=stab_coeff +# Scalar formulation unchanged +function momentum_stabilization(uu, stab_coeff::ScalarStabilization, simcase::SimulationCase) + @unpack h = stab_coeff @unpack sprob = simcase @unpack r = sprob.coeff_method - @sunpack ν,dt = simcase + @sunpack ν, dt = simcase function τsu(u, h) τ₂ = h^2 / (4 * ν) τ₃ = dt / 2 - u = val_u(norm(u)) if iszero(u) return (1 / τ₂^r + 1 / τ₃^r)^(-1 / r) end τ₁ = h / (2 * u) return (1 / τ₁^r + 1 / τ₂^r + 1 / τ₃^r)^(-1 / r) - end return τsu ∘ (uu, h) end - -""" - continuity_stabilization(uu, stab_coeff::ScalarStabilization,simcase::SimulationCase ) - -Stabilization parameters continuity equation -Janssens, B. (2014). Numerical modeling and experimental investigation of fine particle coagulation and dispersion in dilute flows. -""" -function continuity_stabilization(uu, stab_coeff::ScalarStabilization,simcase::SimulationCase ) +function continuity_stabilization(uu, stab_coeff::ScalarStabilization, simcase::SimulationCase) return (uu ⋅ uu) * momentum_stabilization(uu, stab_coeff, simcase) -end +end \ No newline at end of file diff --git a/src/Commons/ParametersDef/ParametersDef.jl b/src/Commons/ParametersDef/ParametersDef.jl index 1889f386..99498a00 100644 --- a/src/Commons/ParametersDef/ParametersDef.jl +++ b/src/Commons/ParametersDef/ParametersDef.jl @@ -60,6 +60,13 @@ export TensorFormulation export VMS export SUPG +export TimestepLimiter +export NoLimiter +export AdvectiveLimiter +export DiffusiveLimiter +export CombinedLimiter +export CustomLimiter + include("AnalyticalSolution.jl") include("Params.jl") include("StabilizationStruct.jl") diff --git a/src/Commons/ParametersDef/StabilizationStruct.jl b/src/Commons/ParametersDef/StabilizationStruct.jl index 11314daa..56e1dcf8 100644 --- a/src/Commons/ParametersDef/StabilizationStruct.jl +++ b/src/Commons/ParametersDef/StabilizationStruct.jl @@ -1,15 +1,96 @@ - abstract type StabilizationMethod end abstract type StabilizationFormulation end abstract type StabilizationParameters end +# ── Timestep limiter hierarchy ───────────────────────────────────────────────── + +abstract type TimestepLimiter end + +""" + NoLimiter() + +Default behaviour: Δt is used as-is inside τ_M and τ_C. +No minimum is imposed on the temporal contribution 4/Δt². +""" +struct NoLimiter <: TimestepLimiter end + +""" + AdvectiveLimiter(; C_adv = 1.0) + +Clamps Δt from below using the local advective time scale: + + Δt_eff = max(Δt, C_adv / √(u · G · u)) + +Prevents τ_M → 0 when Δt is small but the flow is fast relative to the mesh. +`C_adv` is an O(1) coefficient tuned so the limiter only activates well below +the advective CFL scale. +""" +@with_kw struct AdvectiveLimiter <: TimestepLimiter + C_adv::Float64 = 1.0 + @assert C_adv > 0.0 "C_adv must be positive" +end + +""" + DiffusiveLimiter(; C_diff = 1.0) + +Clamps Δt from below using the local diffusive time scale: + + Δt_eff = max(Δt, C_diff / (ν √(G:G))) + +Useful for low-Reynolds or boundary-layer dominated flows where +diffusion sets the relevant time scale. +""" +@with_kw struct DiffusiveLimiter <: TimestepLimiter + C_diff::Float64 = 1.0 + @assert C_diff > 0.0 "C_diff must be positive" +end + +""" + CombinedLimiter(; C_adv = 1.0, C_diff = 1.0) + +Takes the smaller of the advective and diffusive time scales as the floor: + + Δt_adv = C_adv / √(u · G · u) + Δt_diff = C_diff / (ν √(G:G)) + Δt_eff = max(Δt, min(Δt_adv, Δt_diff)) + +Recommended for the Taylor-Green vortex validation and general LES +where both regimes may be encountered. +""" +@with_kw struct CombinedLimiter <: TimestepLimiter + C_adv::Float64 = 1.0 + C_diff::Float64 = 1.0 + @assert C_adv > 0.0 "C_adv must be positive" + @assert C_diff > 0.0 "C_diff must be positive" +end + +""" + CustomLimiter(f) + +User-supplied limiter. `f` must satisfy -@with_kw struct StabilizedProblem{T<:StabilizationMethod,S<:StabilizationFormulation} - method::T = VMS() - coeff_method::S=TensorFormulation() - skew::Bool=false + f(dt::Float64, uun, G, GG, ν::Float64) -> Float64 + +and return the effective Δt to use inside τ_M. The returned value must be +≥ `dt`; no safety check is performed, so the user is responsible for +ensuring stability. + +# Example +```julia +my_lim = CustomLimiter((dt, uun, G, GG, ν) -> max(dt, 0.5 / (ν * sqrt(GG)))) +``` +""" +struct CustomLimiter <: TimestepLimiter + f::Function end +# ── Stabilization parameter containers ──────────────────────────────────────── + +@with_kw struct StabilizedProblem{T<:StabilizationMethod, S<:StabilizationFormulation} + method::T = VMS() + coeff_method::S = TensorFormulation() + skew::Bool = false +end struct ScalarStabilization <: StabilizationParameters h @@ -26,12 +107,12 @@ end end @with_kw struct TensorFormulation <: StabilizationFormulation - r::Int64 = 2 - Ci::Vector{Real} = [4,36] - @assert (Ci[1]>=0 && Ci[2]>=0) "Ci values must be non-negative" + r::Int64 = 2 + Ci::Vector{Real} = [4, 36] + dt_limiter::TimestepLimiter = NoLimiter() + @assert (Ci[1] >= 0 && Ci[2] >= 0) "Ci values must be non-negative" end - @with_kw struct VMS <: StabilizationMethod order::Int64 = 1 end @@ -46,5 +127,4 @@ end function StabilizedProblem(method::SUPG) StabilizedProblem(method, ScalarFormulation(), true) -end - +end \ No newline at end of file From 8c95a89dc2da640e7bfa010a779c384f68edd8bb Mon Sep 17 00:00:00 2001 From: carlodev Date: Thu, 7 May 2026 13:13:51 +0200 Subject: [PATCH 41/42] rm print stabilization dt --- src/Commons/Equations/StabilizationOperations.jl | 1 - 1 file changed, 1 deletion(-) diff --git a/src/Commons/Equations/StabilizationOperations.jl b/src/Commons/Equations/StabilizationOperations.jl index cec8bc13..29eed09d 100644 --- a/src/Commons/Equations/StabilizationOperations.jl +++ b/src/Commons/Equations/StabilizationOperations.jl @@ -75,7 +75,6 @@ function momentum_stabilization(uu, stab_coeff::TensorStabilization, simcase::Si function τm(uun, G, GG) dt_eff = compute_dt_eff(dt, dt_limiter, uun, G, GG, ν) - println("Stabilization Using: dt = $(dt_eff), while physical dt = $dt") τ₁ = Ci[1] * (2 / dt_eff)^2 τ₃ = Ci[2] * (ν^2 * GG) From e10c95c50a1e96305b66c76a7c48c8f279f8f639 Mon Sep 17 00:00:00 2001 From: carlodev Date: Mon, 18 May 2026 16:26:05 +0200 Subject: [PATCH 42/42] in place rhs compute --- TGV2D_limiter.jl | 82 +++++++ src/Commons/MatrixCreation.jl | 224 ++++++++--------- src/Commons/SolveProblem.jl | 447 +++++++++++++++++++--------------- 3 files changed, 440 insertions(+), 313 deletions(-) create mode 100644 TGV2D_limiter.jl diff --git a/TGV2D_limiter.jl b/TGV2D_limiter.jl new file mode 100644 index 00000000..a6aa4d7a --- /dev/null +++ b/TGV2D_limiter.jl @@ -0,0 +1,82 @@ +using PartitionedArrays +using SegregatedVMSSolver +using SegregatedVMSSolver.ParametersDef +using SegregatedVMSSolver.SolverOptions +using MPI +using Gridap + + + + N = 128 + dt = 0.025 + + order = 2 + t0 =0.0 + vortex_diameter = 1.0 + L = 0.5 * vortex_diameter + + u_conv = 0.2 + Re = 1_000 + + D = 2 + + CFL_eff = u_conv*N * dt * order / (2*L) + + backend = with_debug + + rank_partition = (4,4) + tF = 0.1 #dt*10 + + + println("------------------------") + println("CFL = $(CFL_eff)") + println("------------------------") + + function petsc_options_cstm() + return " -vel_ksp_type gmres -vel_pc_type gamg -vel_ksp_rtol 1.e-8 -vel_ksp_converged_reason \ + -pres_ksp_type cg -pres_pc_type gamg -pres_ksp_rtol 1.e-8 -pres_ksp_converged_reason" + end + + + my_lim = CustomLimiter() do dt, uun, G, GG, ν + h = L /(order*N) + dt_eff = h/u_conv + return max(dt_eff,dt) + + end + + + + sprob = StabilizedProblem(VMS(order), TensorFormulation(dt_limiter = my_lim), false) + + + + + # sprob = StabilizedProblem(method=VMS(order), coeff_method=TensorFormulation(r=2, Ci=[4, 36]), skew=false) + timep = TimeParameters(t0=t0,dt=dt,tF=tF) + + physicalp = PhysicalParameters(Re=Re,c=vortex_diameter, u_in_mag=u_conv) + + solverp = SolverParameters(matrix_freq_update = 1, Number_Skip_Expansion=10e6, M = 40, a_err_threshold=10_000, + petsc_options = petsc_options_cstm()) + exportp = ExportParameters(printinitial=true,printmodel=true, extra_export=["VelocityError","PressureError"]) + + + meshp= MeshParameters(rank_partition,D;N=N,L=L) + + + simparams = SimulationParameters(timep,physicalp,solverp,exportp) + + params_tvg = TaylorGreenParameters(Vs=u_conv, Ua=0.3*u_conv, Va = 0.2*u_conv) + bc_tgv = Periodic(meshp,physicalp,params_tvg ) + + + + mcase = TaylorGreen(bc_tgv, meshp,simparams,sprob) + + + SegregatedVMSSolver.solve(mcase,backend) + + + + diff --git a/src/Commons/MatrixCreation.jl b/src/Commons/MatrixCreation.jl index 5e67063a..615ccafb 100644 --- a/src/Commons/MatrixCreation.jl +++ b/src/Commons/MatrixCreation.jl @@ -20,189 +20,177 @@ export update_all_matrices_vectors! """ - allocate_Mat_inv_ML(Mat_ML::PSparseMatrix) + allocate_Mat_inv_ML(Mat_ML::PSparseMatrix) -It allocates a zero vector where to store the inverse of the lumped matrix +Allocate a zero PVector where the inverse of the lumped mass matrix is stored. """ function allocate_Mat_inv_ML(Mat_ML::PSparseMatrix) - return pzeros(Mat_ML.row_partition) + return pzeros(Mat_ML.row_partition) end -# function allocate_Mat_inv_ML(Mat_ML::SparseMatrixCSC) -# l = size(Mat_ML)[1] - -# return zeros(l) -# end - - - """ - inv_lump_vel_mass!(Mat_inv_ML::PVector,Mat_ML::PSparseMatrix) + inv_lump_vel_mass!(Mat_inv_ML::PVector, Mat_ML::PSparseMatrix) -It computes the lumped matrix, takes the inverse of the diagonal elements. +Compute the row-sum (lumped) approximation of `Mat_ML`, then store its +reciprocal in `Mat_inv_ML`. Operates locally on each rank. """ function inv_lump_vel_mass!(Mat_inv_ML::PVector, Mat_ML::PSparseMatrix) - values = map(Mat_ML.matrix_partition) do val - N = maximum(rowvals(val)) - - V = zeros(N) - vals = nonzeros(val) - - j = 1 - for i in rowvals(val) - V[i] += vals[j] - j = j + 1 + values = map(Mat_ML.matrix_partition) do val + N = maximum(rowvals(val)) + V = zeros(N) + vals = nonzeros(val) + j = 1 + for i in rowvals(val) + V[i] += vals[j] + j += 1 + end + @. V = 1 / V + V end - V = 1 ./ V - - end - Mat_inv_ML .= PVector(values, Mat_ML.row_partition) + Mat_inv_ML .= PVector(values, Mat_ML.row_partition) end -# function inv_lump_vel_mass!(Mat_inv_ML::Vector, Mat_ML::SparseMatrixCSC) -# inv_ML_vec = 1 ./ sum(Mat_ML, dims=2)[:,1] -# if !isempty(inv_ML_vec[inv_ML_vec.==Inf]) -# error("The matrix ML can not be inverted because after lumping zero values are detected") -# end - -# Mat_inv_ML.=inv_ML_vec - -# end - """ - initialize_vectors(matrices::Tuple,uh0,ph0) + initialize_vectors(matrices::Tuple, uh0, ph0) -It initializes vectors where velocity, pressure, acceleration and all the increments will be stored. +Allocate the persistent vectors used by the segregated solver: velocity, +pressure, acceleration, their increments, and the RHS buffers `b1` and `b2`. """ function initialize_vectors(matrices::Tuple, uh0, ph0) - Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, Mat_ML, Mat_inv_ML, Mat_S, Vec_Auu, Vec_Aup, Vec_Apu, Vec_App, Vec_Au, Vec_Ap = matrices - vec_pm = GridapDistributed.change_ghost(get_free_dof_values(ph0), Mat_Aup) - vec_um = GridapDistributed.change_ghost(get_free_dof_values(uh0), Mat_Auu) + Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, + Mat_ML, Mat_inv_ML, Mat_S, + Vec_Auu, Vec_Aup, Vec_Apu, Vec_App, Vec_Au, Vec_Ap = matrices + vec_pm = GridapDistributed.change_ghost(get_free_dof_values(ph0), Mat_Aup) + vec_um = GridapDistributed.change_ghost(get_free_dof_values(uh0), Mat_Auu) - vec_am = pazeros(Mat_ML) - vec_sum_pm = pazeros(Mat_Aup) - Δa_star = pazeros(Mat_Apu) - Δpm1 = pazeros(Mat_S) - Δa = pazeros(Mat_Tpu) + vec_am = pazeros(Mat_ML) + vec_sum_pm = pazeros(Mat_Aup) + Δa_star = pazeros(Mat_Apu) + Δpm1 = pazeros(Mat_S) + Δa = pazeros(Mat_Tpu) - b1 = pazeros(Vec_Au) - b2 = pazeros(Vec_Ap) - ũ_vector = create_ũ_vector(vec_um) + b1 = pazeros(Vec_Au) + b2 = pazeros(Vec_Ap) + ũ_vector = create_ũ_vector(vec_um) - return vec_pm, vec_um, vec_am, vec_sum_pm, Δa_star, Δpm1, Δa, b1, b2, ũ_vector + return vec_pm, vec_um, vec_am, vec_sum_pm, Δa_star, Δpm1, Δa, b1, b2, ũ_vector end - function initialize_matrices(u_adv, params, simcase) - @info "allocation matrix and vectors" - matrices = allocate_all_matrices_vectors(u_adv, params, simcase) - @info "matrix and vectors allocated" + @info "allocating matrices and vectors" + matrices = allocate_all_matrices_vectors(u_adv, params, simcase) + @info "matrices and vectors allocated" - @info "updating matrix and vectors" - @time update_all_matrices_vectors!(matrices, u_adv, params, simcase) - @info "matrix and vectors updated" + @info "filling matrices and vectors with values" + @time update_all_matrices_vectors!(matrices, u_adv, params, simcase) + @info "matrices and vectors updated" - return matrices + return matrices end function allocate_all_matrices_vectors(u_adv, params, simcase) - Tuu, Tpu, Auu, Aup, Apu, App, ML, S, rhs = segregated_equations(u_adv, params, simcase) + Tuu, Tpu, Auu, Aup, Apu, App, ML, S, rhs = segregated_equations(u_adv, params, simcase) - @unpack Utn1, Ptn1, tests = params - V, Q = tests + @unpack Utn1, Ptn1, tests = params + V, Q = tests - Mat_Tuu = allocate_matrix(Tuu, rhs, Utn1, V) - Mat_Tpu = allocate_matrix(Tpu, rhs, Utn1, Q) + Mat_Tuu = allocate_matrix(Tuu, rhs, Utn1, V) + Mat_Tpu = allocate_matrix(Tpu, rhs, Utn1, Q) - Mat_Auu, Vec_Auu = allocate_matrix_and_vector(Auu, rhs, Utn1, V) - Mat_Aup, Vec_Aup = allocate_matrix_and_vector(Aup, rhs, Ptn1, V) - Mat_Apu, Vec_Apu = allocate_matrix_and_vector(Apu, rhs, Utn1, Q) - Mat_App, Vec_App = allocate_matrix_and_vector(App, rhs, Ptn1, Q) + Mat_Auu, Vec_Auu = allocate_matrix_and_vector(Auu, rhs, Utn1, V) + Mat_Aup, Vec_Aup = allocate_matrix_and_vector(Aup, rhs, Ptn1, V) + Mat_Apu, Vec_Apu = allocate_matrix_and_vector(Apu, rhs, Utn1, Q) + Mat_App, Vec_App = allocate_matrix_and_vector(App, rhs, Ptn1, Q) - Mat_ML= allocate_matrix(ML, rhs, Utn1, V) - Mat_S = allocate_matrix(S, rhs, Ptn1, Q) + Mat_ML = allocate_matrix(ML, rhs, Utn1, V) + Mat_S = allocate_matrix(S, rhs, Ptn1, Q) - Mat_inv_ML = allocate_Mat_inv_ML(Mat_ML) - Vec_Ap = Vec_Apu + Vec_App - Vec_Au = Vec_Auu + Vec_Aup + Mat_inv_ML = allocate_Mat_inv_ML(Mat_ML) + Vec_Ap = Vec_Apu + Vec_App + Vec_Au = Vec_Auu + Vec_Aup - return Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, Mat_ML, Mat_inv_ML, Mat_S, Vec_Auu, Vec_Aup, Vec_Apu, Vec_App, Vec_Au, Vec_Ap + return Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, + Mat_ML, Mat_inv_ML, Mat_S, + Vec_Auu, Vec_Aup, Vec_Apu, Vec_App, Vec_Au, Vec_Ap end -function allocate_matrix(a::Function,rhs::Function,U,V ) - feop1 = AffineFEOperator(a,rhs,U,V) - Mat = get_matrix(feop1) - return Mat +function allocate_matrix(a::Function, rhs::Function, U, V) + feop = AffineFEOperator(a, rhs, U, V) + return get_matrix(feop) end -function allocate_matrix_and_vector(a::Function,rhs::Function,U,V ) - feop1 = AffineFEOperator(a,rhs,U,V) - Mat = get_matrix(feop1) - Vec = get_vector(feop1) - return Mat, Vec +function allocate_matrix_and_vector(a::Function, rhs::Function, U, V) + feop = AffineFEOperator(a, rhs, U, V) + return get_matrix(feop), get_vector(feop) end +""" + update_all_matrices_vectors!(matrices, u_adv, params, simcase) + +Reassemble all bilinear-form matrices and their associated Dirichlet +contribution vectors in place, then refresh the lumped inverse `Mat_inv_ML` +and the combined Vec_Au, Vec_Ap. +""" function update_all_matrices_vectors!(matrices::Tuple, u_adv, params, simcase) + Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, + Mat_ML, Mat_inv_ML, Mat_S, + Vec_Auu, Vec_Aup, Vec_Apu, Vec_App, Vec_Au, Vec_Ap = matrices - Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, Mat_ML, Mat_inv_ML, Mat_S, Vec_Auu, Vec_Aup, Vec_Apu, Vec_App, Vec_Au, Vec_Ap = matrices + @unpack Utn1, Ptn1, tests = params + V, Q = tests - @unpack Utn1, Ptn1, tests = params - V, Q = tests + Tuu, Tpu, Auu, Aup, Apu, App, ML, S, _ = segregated_equations(u_adv, params, simcase) - Tuu, Tpu, Auu, Aup, Apu, App, ML, S, rhs = segregated_equations(u_adv, params, simcase) + update_matrix!(Tuu, Mat_Tuu, Utn1, V) + update_matrix!(Tpu, Mat_Tpu, Utn1, Q) + update_matrix_vector!(Auu, Mat_Auu, Vec_Auu, Utn1, V) + update_matrix_vector!(Aup, Mat_Aup, Vec_Aup, Ptn1, V) + update_matrix_vector!(Apu, Mat_Apu, Vec_Apu, Utn1, Q) + update_matrix_vector!(App, Mat_App, Vec_App, Ptn1, Q) - update_matrix!(Tuu,Mat_Tuu,Utn1, V) - update_matrix!(Tpu, Mat_Tpu, Utn1, Q) + update_matrix!(ML, Mat_ML, Utn1, V) + update_matrix!(S, Mat_S, Ptn1, Q) - update_matrix_vector!(Auu,Mat_Auu,Vec_Auu,Utn1,V) - update_matrix_vector!(Aup,Mat_Aup,Vec_Aup,Ptn1,V) - update_matrix_vector!(Apu,Mat_Apu,Vec_Apu,Utn1,Q) - update_matrix_vector!(App,Mat_App,Vec_App,Ptn1,Q) + inv_lump_vel_mass!(Mat_inv_ML, Mat_ML) + # In-place combination, no temporary PVector created. + @. Vec_Ap = Vec_Apu + Vec_App + @. Vec_Au = Vec_Auu + Vec_Aup +end - update_matrix!(ML,Mat_ML,Utn1, V) - update_matrix!(S,Mat_S,Ptn1, Q) +function update_matrix_vector!(a::Function, A::AbstractMatrix, b::AbstractVector, U, V) + dv = get_fe_basis(V) + du = get_trial_fe_basis(U) - # Mat_inv_ML = allocate_Mat_inv_ML(Mat_ML) - inv_lump_vel_mass!(Mat_inv_ML, Mat_ML) + mat_contribs = a(du, dv) - Vec_Ap .= Vec_Apu + Vec_App - Vec_Au .= Vec_Auu + Vec_Aup + uhd = zero(U) + data = collect_cell_matrix_and_vector(U, V, mat_contribs, 0.0, uhd) + assembler = SparseMatrixAssembler(U, V) + assemble_matrix_and_vector!(A, b, assembler, data) end -function update_matrix_vector!( a::Function, A::AbstractMatrix, b::AbstractVector, U, V) - dv = get_fe_basis(V) - du = get_trial_fe_basis(U) - - mat_contribs = a(du, dv) - - uhd = zero(U) - data = collect_cell_matrix_and_vector(U, V, mat_contribs, 0.0, uhd) - assembler = SparseMatrixAssembler(U, V) - assemble_matrix_and_vector!(A, b, assembler, data) -end - function update_matrix!(a::Function, A::AbstractMatrix, U, V) - dv = get_fe_basis(V) - du = get_trial_fe_basis(U) + dv = get_fe_basis(V) + du = get_trial_fe_basis(U) - mat_contribs = a(du, dv) - data = collect_cell_matrix(U, V, mat_contribs) + mat_contribs = a(du, dv) + data = collect_cell_matrix(U, V, mat_contribs) - assembler = SparseMatrixAssembler(U, V) - assemble_matrix!(A, assembler, data) + assembler = SparseMatrixAssembler(U, V) + assemble_matrix!(A, assembler, data) end -end \ No newline at end of file +end # module diff --git a/src/Commons/SolveProblem.jl b/src/Commons/SolveProblem.jl index f20ca6bc..e4bdbaff 100644 --- a/src/Commons/SolveProblem.jl +++ b/src/Commons/SolveProblem.jl @@ -5,6 +5,7 @@ using GridapPETSc using SparseArrays using PartitionedArrays using Parameters +using LinearAlgebra using Gridap.FESpaces using SegregatedVMSSolver.ParametersDef @@ -18,233 +19,289 @@ using SegregatedVMSSolver.Interfaces export solve_case +# --------------------------------------------------------------------------- +# Indices used to destructure the matrices/vectors tuples in a single place. +# The tuples are kept (rather than introducing a struct) to minimise the +# blast radius of the refactor. If/when a struct is introduced, only these +# helpers need to change. +# --------------------------------------------------------------------------- + +@inline function _unpack_matrices(matrices::Tuple) + ( + Tuu = matrices[1], + Tpu = matrices[2], + Auu = matrices[3], + Aup = matrices[4], + Apu = matrices[5], + App = matrices[6], + ML = matrices[7], + inv_ML = matrices[8], + S = matrices[9], + Vec_Auu = matrices[10], + Vec_Aup = matrices[11], + Vec_Apu = matrices[12], + Vec_App = matrices[13], + Vec_Au = matrices[14], + Vec_Ap = matrices[15], + ) +end -function initialize_solve(simcase::SimulationCase,params::Dict{Symbol,Any}) - @unpack trials,tests = params - U,P = trials - - @sunpack t0,dt,save_sim_dir = simcase - - - Ut0 = U(t0) - Pt0 = P(t0) - - Ut0_1 = U(t0+dt) - Pt0_1 = P(t0+dt) +@inline function _unpack_vectors(vectors::Tuple) + ( + pm = vectors[1], + um = vectors[2], + am = vectors[3], + sum_pm = vectors[4], + Δa_star = vectors[5], + Δpm1 = vectors[6], + Δa = vectors[7], + b1 = vectors[8], + b2 = vectors[9], + ũ_vector = vectors[10], + ) +end - merge!(params, Dict(:Utn => Ut0, :Ptn => Pt0, :Utn1 => Ut0_1, :Ptn1 => Pt0_1)) +function initialize_solve(simcase::SimulationCase, params::Dict{Symbol,Any}) + @unpack trials, tests = params + U, P = trials - uh0, ph0 = create_initial_conditions(simcase,params) + @sunpack t0, dt, save_sim_dir = simcase - @info "Initial Conditions Created" + Ut0 = U(t0) + Pt0 = P(t0) + Ut0_1 = U(t0 + dt) + Pt0_1 = P(t0 + dt) - matrices = initialize_matrices(uh0, params,simcase) - vectors = initialize_vectors(matrices,uh0,ph0) + merge!(params, Dict(:Utn => Ut0, :Ptn => Pt0, :Utn1 => Ut0_1, :Ptn1 => Pt0_1)) + uh0, ph0 = create_initial_conditions(simcase, params) + @info "Initial Conditions Created" - initialize_export_nodes(params, simcase) + matrices = initialize_matrices(uh0, params, simcase) + vectors = initialize_vectors(matrices, uh0, ph0) - mkpath(save_sim_dir) + initialize_export_nodes(params, simcase) + mkpath(save_sim_dir) + uh_avg = FEFunction(Ut0, vectors[2]) + set_zeros!(uh_avg.fields) + ph_avg = FEFunction(Pt0, vectors[1]) + set_zeros!(ph_avg.fields) - uh_avg = FEFunction(Ut0, vectors[2]) - set_zeros!(uh_avg.fields) - ph_avg = FEFunction(Pt0, vectors[1]) - set_zeros!(ph_avg.fields) - return matrices, vectors, (uh_avg,ph_avg) + return matrices, vectors, (uh_avg, ph_avg) end - - """ - solve_case(params::Dict{Symbol,Any}) + solve_case(params::Dict{Symbol,Any}, simcase::SimulationCase) -It solves iteratively the velocity and pressure system. +It solves iteratively the velocity and pressure system using the LS-VMS +segregated scheme described in equations (27) and (30) of the paper. """ -function solve_case(params::Dict{Symbol,Any},simcase::SimulationCase) - @unpack trials,tests = params - U,P = trials - - @unpack trials,tests = params - -@sunpack t0,dt,tF = simcase.simulationp.timep -@sunpack petsc_options,matrix_freq_update,M,a_err_threshold,θ,Number_Skip_Expansion = simcase.simulationp.solverp -time_step = collect(t0+dt:dt:tF) - -init_values = initialize_solve(simcase,params) - - -@unpack Utn, Utn1, Ptn, Ptn1 = params - -matrices, vectors, (uh_avg,ph_avg) = init_values - - -GridapPETSc.with(args=split(petsc_options)) do - any(kw -> occursin(kw, petsc_options), ["cuda", "aijcusparse"]) && run(`nvidia-smi`) - - -Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, - Mat_ML, Mat_inv_ML, Mat_S, Vec_Auu, Vec_Aup, Vec_Apu, Vec_App, Vec_Au, Vec_Ap = matrices - -vec_pm,vec_um,vec_am,vec_sum_pm,Δa_star,Δpm1,Δa,b1,b2,ũ_vector = vectors - -ns1 = create_PETSc_setup(Mat_ML,vel_kspsetup) -ns2 = create_PETSc_setup(Mat_S,pres_kspsetup) - -uh_tn_updt = FEFunction(Utn, vec_um) - -for (ntime,tn) in enumerate(time_step) - - m = 0 - - @info "inner iteration $m | outer iteration $ntime" - - if mod(ntime,matrix_freq_update)==0 - - @info "updating matrix and vectors" - @time update_all_matrices_vectors!(matrices, uh_tn_updt, params,simcase) - @info "matrix and vectors updated" - - - @info "update numerical set up" - @time begin - numerical_setup!(ns1,Mat_ML) - numerical_setup!(ns2,Mat_S) - end - - end - - - - time_solve = @elapsed begin - - - vec_am .= pazeros(Mat_ML) - vec_sum_pm .= pazeros(Mat_Aup) - - norm_Δa0 = 10 - norm_Δp0 = 10 - err_norm_Δa0 = 1 - err_norm_Δp0 = 1 +function solve_case(params::Dict{Symbol,Any}, simcase::SimulationCase) + @unpack trials, tests = params + U, P = trials + + @sunpack t0, dt, tF = simcase.simulationp.timep + @sunpack petsc_options, matrix_freq_update, M, + a_err_threshold, θ, Number_Skip_Expansion = simcase.simulationp.solverp + + time_step = collect(t0 + dt : dt : tF) - - while (m<= M) && (err_norm_Δa0 occursin(kw, petsc_options), ["cuda", "aijcusparse"]) && run(`nvidia-smi`) + + M_ = _unpack_matrices(matrices) + V_ = _unpack_vectors(vectors) + + ns1 = create_PETSc_setup(M_.ML, vel_kspsetup) + ns2 = create_PETSc_setup(M_.S, pres_kspsetup) + + uh_tn_updt = FEFunction(Utn, V_.um) + + for (ntime, tn) in enumerate(time_step) + @info "outer iteration $ntime, t = $tn" + + if mod(ntime, matrix_freq_update) == 0 + @info "updating matrices, vectors and PETSc setup" + @time update_all_matrices_vectors!(matrices, uh_tn_updt, params, simcase) + @time begin + numerical_setup!(ns1, M_.ML) + numerical_setup!(ns2, M_.S) + end + end + + time_solve = @elapsed begin + # Reset accumulators for this time step. Use fill! to avoid + # allocating a new PVector just to copy zeros into it. + fill!(V_.am, 0.0) + fill!(V_.sum_pm, 0.0) + + m = 0 + norm_Δa0 = 10.0 + norm_Δp0 = 10.0 + err_norm_Δa0 = 1.0 + err_norm_Δp0 = 1.0 + + while (m <= M) && (err_norm_Δa0 < a_err_threshold) + fill!(V_.Δpm1, 0.0) + fill!(V_.Δa_star, 0.0) + + solve_velocity!(ns1, M_, V_, dt, θ) + solve_pressure!(ns2, M_, V_, dt) + + Δpm1 = GridapDistributed.change_ghost(V_.Δpm1, M_.Aup) + + # Δa = Δa* - θ * inv(ML) * (Aup * Δpm1) + # Use V_.Δa as scratch storage for Aup * Δpm1 to avoid + # an extra allocation; then update in place. + mul!(V_.Δa, M_.Aup, Δpm1) + @. V_.Δa = V_.Δa_star - θ * M_.inv_ML * V_.Δa + + # In-place updates of velocity and pressure free dofs. + axpy!(dt, V_.Δa, V_.um) # um += dt * Δa + V_.pm .+= Δpm1 # pm += Δpm1 (no temporary) + + if m == 0 + copy!(V_.sum_pm, Δpm1) + copy!(V_.am, V_.Δa) + norm_Δa0 = norm(V_.Δa) + norm_Δp0 = norm(Δpm1) + else + V_.sum_pm .+= Δpm1 + V_.am .+= V_.Δa + end + + err_norm_Δa0 = norm_Δa0 / norm(V_.Δa) + err_norm_Δp0 = norm_Δp0 / norm(Δpm1) + + evaluate_convergence(err_norm_Δa0, "velocity") + evaluate_convergence(err_norm_Δp0, "pressure") + + m += 1 + end + end + + @info "solution time at t = $tn : $time_solve s" + @time GridapPETSc.GridapPETSc.gridap_petsc_gc() + + update_ũ_vector!(V_.ũ_vector, V_.um) + + Utn = Utn1 + Utn1 = U(tn + dt) + Ptn = Ptn1 + Ptn1 = P(tn + dt) + params[:Ptn1] = Ptn1 + params[:Utn1] = Utn1 + + uh_tn_updt = FEFunction(Utn1, V_.um) + if ntime > Number_Skip_Expansion + uh_tn_updt = FEFunction(Utn1, update_ũ(V_.ũ_vector)) + end - Δpm1 .= pazeros(Mat_S) - Δa_star .= pazeros(Mat_ML) + uh_tn = FEFunction(Utn, V_.um) + ph_tn = FEFunction(Ptn, V_.pm) - vectors = (vec_pm,vec_um,vec_am,vec_sum_pm,Δa_star,Δpm1,Δa,b1,b2,ũ_vector) + uh_avg = update_time_average(uh_tn, uh_avg, Utn, tn, ntime, time_step, simcase.simulationp.timep) + ph_avg = update_time_average(ph_tn, ph_avg, Ptn, tn, ntime, time_step, simcase.simulationp.timep) - solve_velocity!(ns1,matrices,vectors,dt,θ) - - solve_pressure!(ns2,matrices,vectors,dt,θ) - - - Δpm1 = GridapDistributed.change_ghost(Δpm1, Mat_Aup) - - Δa .= Δa_star - θ .* Mat_inv_ML .* (Mat_Aup * Δpm1) - - vec_um .+= dt * Δa - vec_pm .+= Δpm1 - - if m == 0 - vec_sum_pm .= Δpm1 - vec_am .= Δa - norm_Δa0 = norm(Δa) - norm_Δp0 = norm(Δpm1) - else - vec_sum_pm .+= Δpm1 - vec_am .+= Δa + writesolution(params, simcase, ntime, tn, (uh_tn, ph_tn), (uh_avg, ph_avg)) + export_fields(params, simcase, tn, uh_tn, ph_tn) end - - err_norm_Δa0 = norm_Δa0/norm(Δa) - err_norm_Δp0 = norm_Δp0/norm(Δpm1) - - evaluate_convergence(err_norm_Δa0, "velocity") - evaluate_convergence(err_norm_Δp0, "pressure") - - m = m + 1 - - - end #end while - end #end elapsed - - - println("solution time at time $tn") - println(time_solve) - @time GridapPETSc.GridapPETSc.gridap_petsc_gc() - -update_ũ_vector!(ũ_vector,vec_um) - - - -Utn = Utn1 -Utn1 = U(tn+dt) - -Ptn = Ptn1 -Ptn1 = P(tn+dt) - -params[:Ptn1] = Ptn1 -params[:Utn1] = Utn1 - -uh_tn_updt = FEFunction(Utn1, vec_um) - -if ntime>Number_Skip_Expansion - uh_tn_updt = FEFunction(Utn1, update_ũ(ũ_vector)) + end end -uh_tn = FEFunction(Utn, vec_um) -ph_tn = FEFunction(Ptn, vec_pm) - -uh_avg = update_time_average(uh_tn, uh_avg, Utn, tn, ntime, time_step, simcase.simulationp.timep) -ph_avg = update_time_average(ph_tn, ph_avg, Ptn, tn, ntime, time_step, simcase.simulationp.timep) - - - -writesolution(params, simcase, ntime, tn, (uh_tn,ph_tn), (uh_avg,ph_avg)) - -export_fields(params,simcase, tn, uh_tn, ph_tn) - - end #end for -end #end GridapPETSc - -end #end solve_case - - -function solve_velocity!(ns1, matrices, vectors, dt::Float64, θ::Float64) - Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, Mat_ML, Mat_inv_ML, Mat_S,Vec_Auu, Vec_Aup, Vec_Apu, Vec_App, Vec_Au, Vec_Ap = matrices - vec_pm,vec_um,vec_am,vec_sum_pm,Δa_star,Δpm1,Δa,b1,b2,ũ_vector = vectors - - vec_um = GridapDistributed.change_ghost(vec_um, Mat_Auu) - vec_pm = GridapDistributed.change_ghost(vec_pm, Mat_Aup) - vec_am = GridapDistributed.change_ghost(vec_am, Mat_ML) - - b1 .= -Mat_Auu * vec_um - Mat_Aup * vec_pm - Mat_ML * vec_am + - Mat_Auu * dt * vec_am + (1 - θ) * Mat_Aup * vec_sum_pm + Vec_Au - println("solving velocity") - @time solve!(Δa_star,ns1,b1) +# --------------------------------------------------------------------------- +# RHS assembly for the velocity sub-problem, paper equation (27): +# +# (Tvu + θ Δt Avu) Δa* = −Auu·uᵐ − Aup·pᵐ − ML·aᵐ +# + Δt·Auu·aᵐ + (1−θ)·Aup·Σ Δp_i + Vec_Au +# +# where ML = Tvu + θ Δt Avu. Vec_Au carries the Dirichlet contribution that +# Gridap returns as the RHS of the corresponding AffineFEOperator. +# +# The previous implementation built this expression with five matrix-vector +# products composed via `*`, each of which allocates a fresh PVector and +# triggers a halo exchange. Using the 5-argument `mul!(C, A, B, α, β)`, +# which computes C .= α·A·B + β·C in place, we accumulate the result +# directly into the pre-allocated buffer `b1` with zero extra allocations. +# +# Auu and ML share their column partition (trial space Utn1), so a single +# `change_ghost` per operand suffices. +# --------------------------------------------------------------------------- + +function _assemble_velocity_rhs!(b1, M_, um, pm, am, sum_pm, dt::Float64, θ::Float64) + um = GridapDistributed.change_ghost(um, M_.Auu) # cols: Utn1 + pm = GridapDistributed.change_ghost(pm, M_.Aup) # cols: Ptn1 + am = GridapDistributed.change_ghost(am, M_.ML) # cols: Utn1 + sum_pm = GridapDistributed.change_ghost(sum_pm, M_.Aup) # cols: Ptn1 + + copy!(b1, M_.Vec_Au) # b1 = Vec_Au + mul!(b1, M_.Auu, um, -1.0, 1.0) # b1 += -Auu·um + mul!(b1, M_.Aup, pm, -1.0, 1.0) # b1 += -Aup·pm + mul!(b1, M_.ML, am, -1.0, 1.0) # b1 += -ML·am + mul!(b1, M_.Auu, am, dt, 1.0) # b1 += dt·Auu·am + mul!(b1, M_.Aup, sum_pm, 1 - θ, 1.0) # b1 += (1-θ)·Aup·Σ Δp + return b1 end +function solve_velocity!(ns1, M_::NamedTuple, V_::NamedTuple, dt::Float64, θ::Float64) + _assemble_velocity_rhs!(V_.b1, M_, V_.um, V_.pm, V_.am, V_.sum_pm, dt, θ) + @info "solving velocity" + @time solve!(V_.Δa_star, ns1, V_.b1) +end -function solve_pressure!(ns2, matrices, vectors, dt::Float64, θ::Float64) - Mat_Tuu, Mat_Tpu, Mat_Auu, Mat_Aup, Mat_Apu, Mat_App, Mat_ML, Mat_inv_ML, Mat_S, Vec_Auu, Vec_Aup, Vec_Apu, Vec_App, Vec_Au, Vec_Ap = matrices - vec_pm,vec_um,vec_am,vec_sum_pm,Δa_star,Δpm1,Δa,b1,b2,ũ_vector = vectors +# Backwards-compatible signature that takes the raw tuples. +function solve_velocity!(ns1, matrices::Tuple, vectors::Tuple, dt::Float64, θ::Float64) + solve_velocity!(ns1, _unpack_matrices(matrices), _unpack_vectors(vectors), dt, θ) +end - vec_um = GridapDistributed.change_ghost(vec_um, Mat_Apu) - vec_pm = GridapDistributed.change_ghost(vec_pm, Mat_App) - vec_am = GridapDistributed.change_ghost(vec_am, Mat_Tpu) - Δa_star = GridapDistributed.change_ghost(Δa_star, Mat_Tpu) +# --------------------------------------------------------------------------- +# RHS assembly for the pressure sub-problem, paper equation (30): +# +# ((Tqu + Δt·Aqu)(M̃L)⁻¹ θ Avp − Aqp) Δp^{m+1} +# = Tqu·Δa* + Aqu·(uᵐ + Δt·Δa*) + Aqp·pᵐ + Tqu·aᵐ +# +# The sign on Vec_Ap is flipped because the continuity equation uses the +# opposite sign convention from the momentum equation (the original code +# had a comment to that effect). +# --------------------------------------------------------------------------- + +function _assemble_pressure_rhs!(b2, M_, um, pm, am, Δa_star, dt::Float64) + um = GridapDistributed.change_ghost(um, M_.Apu) + pm = GridapDistributed.change_ghost(pm, M_.App) + am = GridapDistributed.change_ghost(am, M_.Tpu) + Δa_star = GridapDistributed.change_ghost(Δa_star, M_.Tpu) + + # b2 starts as −Vec_Ap (continuity sign convention). + copy!(b2, M_.Vec_Ap) + rmul!(b2, -1.0) + + mul!(b2, M_.Tpu, Δa_star, 1.0, 1.0) # b2 += Tpu·Δa* + mul!(b2, M_.Apu, um, 1.0, 1.0) # b2 += Apu·um + mul!(b2, M_.Apu, Δa_star, dt, 1.0) # b2 += dt·Apu·Δa* + mul!(b2, M_.App, pm, 1.0, 1.0) # b2 += App·pm + mul!(b2, M_.Tpu, am, 1.0, 1.0) # b2 += Tpu·am + return b2 +end - #-Vec_A because changing sign in the continuity equations - b2 .= Mat_Tpu * Δa_star + Mat_Apu * (vec_um + dt * Δa_star) + Mat_App * vec_pm + Mat_Tpu * vec_am - Vec_Ap - println("solving pressure") - @time solve!(Δpm1,ns2,b2) +function solve_pressure!(ns2, M_::NamedTuple, V_::NamedTuple, dt::Float64) + _assemble_pressure_rhs!(V_.b2, M_, V_.um, V_.pm, V_.am, V_.Δa_star, dt) + @info "solving pressure" + @time solve!(V_.Δpm1, ns2, V_.b2) end +# Backwards-compatible signature. θ is accepted for API stability but unused: +# the pressure RHS in eq. (30) does not depend on θ. +function solve_pressure!(ns2, matrices::Tuple, vectors::Tuple, dt::Float64, θ::Float64=1.0) + solve_pressure!(ns2, _unpack_matrices(matrices), _unpack_vectors(vectors), dt) +end -end #end module \ No newline at end of file +end # module