hyteg merge requestshttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests2018-04-04T19:16:15+02:00https://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/125Adds a script for auto-generation of operators for different elements2018-04-04T19:16:15+02:00Daniel DrzisgaAdds a script for auto-generation of operators for different elementsThe commit adds a python script that allows generation of operators with
FFC from a form description that is independent of the actual element type.
Thus, we can auto-generator operators that are non-mixed from a single
UFL source file.
...The commit adds a python script that allows generation of operators with
FFC from a form description that is independent of the actual element type.
Thus, we can auto-generator operators that are non-mixed from a single
UFL source file.
The script places the operator header files in the source tree and also
fixes the <ufc.h> header include path.https://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/240[WIP] mohr/integrate general forms into master2019-07-17T12:42:45+02:00Marcus Mohr[WIP] mohr/integrate general forms into masterHi,
working on issue #99. Things that need to be done:
- [x] merge general forms into master fixing merging issues
- [x] make sure compilation of framework, apps and tests works
- [x] implement parts that are missing for assembling P2 ...Hi,
working on issue #99. Things that need to be done:
- [x] merge general forms into master fixing merging issues
- [x] make sure compilation of framework, apps and tests works
- [x] implement parts that are missing for assembling P2 stencils in 3D
- [x] make sure there are no more errors in test suite
Cheers
MarcusMarcus MohrMarcus Mohrhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/342Draft: Resolve "Implement forms needed for P2-P1 Stokes with blending"2020-07-29T16:48:23+02:00Marcus MohrDraft: Resolve "Implement forms needed for P2-P1 Stokes with blending"Closes #126Closes #126https://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/493DG pt. 12022-04-04T10:50:46+02:00Nils KohlDG pt. 1See #171.
This MR introduces the basic data structures for the 2D DG implementation.See #171.
This MR introduces the basic data structures for the 2D DG implementation.Nils KohlNils Kohlhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/510Draft: Plate velocity computations2022-06-23T16:39:52+02:00Dominik Thoennesdominik.thoennes@fau.deDraft: Plate velocity computationsAdds a first draft for computing plate velocities for mantle convection simulations from reconstructed plate motions. The draft
is originally based on
[https://gitlab.lrz.de/marcus.mohr/plates-refactoring/-/tags/HYTEG_INCLUSION_CANDIDA...Adds a first draft for computing plate velocities for mantle convection simulations from reconstructed plate motions. The draft
is originally based on
[https://gitlab.lrz.de/marcus.mohr/plates-refactoring/-/tags/HYTEG_INCLUSION_CANDIDATE_1](https://gitlab.lrz.de/marcus.mohr/plates-refactoring/-/tags/HYTEG_INCLUSION_CANDIDATE_1)Marcus MohrMarcus Mohrhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/634Allow to remove functions from an FEFunctionRegistry or FunctionMultiStore ob...2023-07-27T17:22:53+02:00Marcus MohrAllow to remove functions from an FEFunctionRegistry or FunctionMultiStore objectThe implementation of this feature touches on issues #172 and #186.The implementation of this feature touches on issues #172 and #186.Marcus MohrMarcus Mohrhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/632Draft: Convection Model Operators, SUPG Stabilisation Operators, Elementwise ...2024-02-21T17:05:49+01:00Andreas BurkhartDraft: Convection Model Operators, SUPG Stabilisation Operators, Elementwise DoFValueOperators (+Tests), Second derivatives for the Blending Maps, PETScHDF5 Function Saving, Projection subclasses for Smoothers and Restriction/Prolongation**Preface: Our pipeline seems to be broken right now, so we should probably wait until it works again.**
This merge request contains several new operators and features aimed at the TerraNeo application.
A few comments on the content o...**Preface: Our pipeline seems to be broken right now, so we should probably wait until it works again.**
This merge request contains several new operators and features aimed at the TerraNeo application.
A few comments on the content of the various diffs:
**composites/P2P1TaylorHoodCompStokesOperator.hpp:** Implements a P2P1 Block Operator for the compressible Stokes (both ALA and TALA are available) with potentially temperature dependent viscosity. It can also generate an appropriate right hand side. You can also activate or deactivate the frozen velocity approach (i.e. if the compressible term in the mass conservation equation is made explicit).
LHS velocity:
$$2 \int_{\Omega} \eta(x,T) \sigma(u) : \sigma(v) \text{ } dx - \frac{2}{\text{dim}} \int_{\Omega}{\eta(x,T) (\nabla \cdot u) \cdot (\nabla \cdot v)} \text{ } dx - \int_{\Omega} \text{div}(v)p_d \text{ } dx - \int_\Omega \frac{\text{Di}}{\Gamma_0} \rho(x) (K_T)^{-1} p_d g \cdot v \text{ } dx$$
RHS velocity:
$$-\int_\Omega \frac{\text{Ra}}{\text{Pe}} \rho(x) \alpha T_d g \cdot v \text{ } dx$$
LHS pressure (here without frozen velocity):
$$ -\int_\Omega \left (\frac{\nabla \rho(x)}{\rho(x)} \cdot u \right ) q \text{ } dx - \int_\Omega (\nabla \cdot u) q \text{ } dx$$
RHS pressure: 0
**src/p2functionspace/P2CompTransportOperator.hpp:** Implements a P2 Operator for the time (in-)dependent energy conservation equation with optional SUPG Stabilisation. Various time stepping schemes (implicit Euler, BDF2, Crank-Nicolson) are available (some additional function calls from outside might be required, e.g. the operator provides a method to save the previous time step right hand side for crank nicolson). Can also be used for the diffusion solve step when using the MMOC operator splitting approach. It can also generate an appropriate right hand side.
LHS temperature (here for the adiabatic heat on the lhs, but can be also be made explicit):
$$ \int_\Omega \frac{\partial T}{\partial t} w \text{ } dx + \int_\Omega (u \cdot \nabla T) w \text{ } dx + \int_\Omega \frac{k }{\text{Pe} \text{ } C_p}\nabla T \cdot \nabla \left ( \frac{w}{\rho(x)} \right ) \text{ } dx - \int_\Omega \text{Di} \text{ } \frac{\alpha}{C_p} T (u \cdot g )w \text{ } dx + \text{SUPG Terms (if used)}$$
RHS temperature:
$$ - \int_\Omega \frac{1}{C_p} H w \text{ } dx -\int_\Omega \frac{\text{Pe}}{\rho(x) C_p}\frac{\text{Di}}{\text{Ra}} \left (\tau\left (u,\eta\left (x,T \right )\right ) : {\varepsilon(u)}\right ) w \text{ } dx + \text{SUPG Terms (if used)}$$
The lhs and rhs above are consequently also dependent on the chosen time discretisation.
**src/hyteg/p2functionspace/P2FullViscousTDependentOperator.hpp, src/hyteg/p2functionspace/P2GradRhoRho_P2_Operator.hpp, src/hyteg/p2functionspace/P2ScaledMassDiffusionOperator.hpp, src/hyteg/p2functionspace/P2VariableBlendingKMassScalarToVectorOperator.hpp, src/hyteg/gridtransferoperators/P2toP1GradRhoRho_P2_Operator.hpp, src/hyteg/gridtransferoperators/P1toP2VariableBlendingKMassScalarToVectorOperator.hpp:** Various operators that conveniently combine the usage of multiple other operators (e.g. if we apply one on every component).
**src/elementwiseoperators:** Added all combinations of P1/P2 ElementwiseDoFValueOperator classes. These operators can be inherited from and provide a way (via the DoFValues_ vector) to access the DoFs of another FEM function during the evaluation of a form. This allows us for the creation of operators like an advection operator that takes a velocity field as an additional input.
Added a setConstantScaling function to all elementwise operators. This can be used to scale your operators by a constant on the fly (without having to create for example a linear combination form).
There are some bug fixes and the ability to use a custom form for P2ToP1 and P1ToP2 elementwise operators included.
**src/elementwiseoperators/generated:** Folder containing all of the generated ElementwiseDoFValueOperators. In particular it adds operators for adiabatic heating, advection, diffusion (only supg), temperature dep. stokes, the grad(rho)/rho * u compressible term in the mass conservation equation, div_k_grad scaled by rho^-1, mass(only supg), shear heat and respective SUPG Stabilisation terms.
**src/p1functionspace/VertexDoFFunction, src/edgedofspace/EdgeDoFFunction, src/functions/DoFValueFunctions:** Added a DoFValueFunction class that both VertexDoFFunction and EdgeDoFFunction inherit from. No previous functionality of VertexDoFFunction and EdgeDoFFunction was changed, I just implemented the additional functions defined in the DoFValueFunction base class. The defined functions are required for the DoFValueOperators to work.
**src/hyteg/composites/VelocityOperator_T_Wrapper, src/hyteg/solvers/SubstituteSolver.hpp:** Some convenient wrappers, allowing you to wrap a operator with a different VelocityOperator_T type and to use a solver for a different operator type (e.g. if you want to solve Laplace as a preconditioner, but the preconditioner is expected to be a solver for a different operator).
**src/petsc/PETScHDF5FunctionSave.hpp:** Functions that allow you to save functions and paramters via creating a PETSc Vector and saving it in parallel to a binary file via HDF5. Has some limitations since you can only reload your functions in the same configuration as you saved it.
**src/solvers/preconditioners/stokes:** Two preconditioner classes used for benchmarks and the convection model
**src/solvers/solvertemplates/StokesSolverTemplates.hpp:** Pulled over some changes to the StokesSolverTemplates solver used in the other Terraneo branches. No functionality is changed but you can now distinguish between absolute and relative tolerance.
**src/solvers/ChebyshevSmoother.hpp:** Added a subclass of the Chebyshev Smoother that contains a normal projection at an appropriate spot for the freeslip boundary conditions.
**src/solvers/GMRESSolver.hpp:** Serveral bug fixes and additional functions from Andreas Wagner to the GMRES solver which we found during our testing of the GMRES.
**src/solvers/MinResSolver.hpp:** Pulled over some changes to the MinRes solver used in the other Terraneo branches. No functionality is changed but you can now define an absolute tolerance.
**src/solvers/UzawaSmoother.hpp, /src/hyteg/composites/P2P1UzawaDampingFactorEstimationOperator.hpp:** Added functions for the estimation of the Uzawa Omega paramter also in case of the P2CompStokesOperator and added a subclass of the UzawaSmoother that contains a normal projection at an appropriate spot for the freeslip boundary conditions.
**src/hyteg/gridtransferoperators/P2P1StokesToP2P1StokesProlongation.hpp, src/hyteg/gridtransferoperators/P2P1StokesToP2P1StokesRestriction.hpp:** Restriction and Prolongation operator subclasses that contains a normal projection at an appropriate spot for the freeslip boundary conditions.
**data/meshes:** Just some additional meshes which are offset from the origin (are used for testing with the sphericalCoordinateMap blending map.
**src/forms:** Just some additional generated blending forms.
**src/geometry:** Added second derivative functions (needed for SUPG Stabilisiation) for all blending maps and a new spherical coordinate map.
**tests/hyteg/operators:** Added tests checking if the various DoFValueOperators are calculating the correct integrals and if the diagonal calculation for the temperature dependent stokes works.
Hopefully I haven't forgotten anything and these are all changes.Andreas BurkhartAndreas Burkharthttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/649Draft: To GeometryMap add a method to compute second derivatives2024-02-29T09:46:16+01:00Marcus MohrDraft: To GeometryMap add a method to compute second derivativesMain purpose of this MR is to add to our geometry maps the functionality to compute second derivaties as is e.g. needed for SUPG stabilisiation.Main purpose of this MR is to add to our geometry maps the functionality to compute second derivaties as is e.g. needed for SUPG stabilisiation.Andreas BurkhartAndreas Burkharthttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/718Integrating Stokes solvers from branch burk/ELWMS.2024-03-20T12:01:56+01:00Nils KohlIntegrating Stokes solvers from branch burk/ELWMS.Mostly taking files that have been introduced by Andi Burkhart on the burk/ELWMS branch (specifically at 0a3cdd49a6a15782b46d5acfae8305ce88a1a4cf).
This MR introduces new and more modular Stokes preconditioners and adds necessary featur...Mostly taking files that have been introduced by Andi Burkhart on the burk/ELWMS branch (specifically at 0a3cdd49a6a15782b46d5acfae8305ce88a1a4cf).
This MR introduces new and more modular Stokes preconditioners and adds necessary features to use them with the new generated operators.Nils KohlNils Kohlhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/707Draft: Adding tool for temperature initialisation2024-03-27T15:05:44+01:00Eugenio D'AscoliDraft: Adding tool for temperature initialisationFor the temperature initialisation a new tool "InitialisationTool.hpp" is now
available within the src/terraneo/helpers directory. Temperature initialisation is
performed superimposing a distinct amount of white noise or temperature devi...For the temperature initialisation a new tool "InitialisationTool.hpp" is now
available within the src/terraneo/helpers directory. Temperature initialisation is
performed superimposing a distinct amount of white noise or temperature deviations from spherical harmonics onto the reference
temperature profile (currently adiabatic profile). This should allow us to modularise initialisation procedures in convection apps and
lets us stay closer to master according to issue #243 .Nils KohlNils Kohlhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/738Draft: Dechant/laplace beltrami2024-04-15T08:34:12+02:00Maximilian DechantDraft: Dechant/laplace beltramiImplements P1- and P2-forms for the Laplace-Beltrami-Operator on 2D-manifolds in 3D-space.
Implements Laplace-Beltrami-App to test Laplace-Beltrami-Operator in combination with blending, surrogates and multigrid.Implements P1- and P2-forms for the Laplace-Beltrami-Operator on 2D-manifolds in 3D-space.
Implements Laplace-Beltrami-App to test Laplace-Beltrami-Operator in combination with blending, surrogates and multigrid.Nils KohlNils Kohlhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/732TerraNeo - parameter handling, initialization, radial profiles2024-04-18T12:24:53+02:00Nils KohlTerraNeo - parameter handling, initialization, radial profilesThis MR is a continuation of !712 (and !707 which is a subset of !712).
The MR rebases and refactors what has been implemented in !712.
Introduces:
* parameter handling for the TN app
* radial profile computation
* IO for radial profil...This MR is a continuation of !712 (and !707 which is a subset of !712).
The MR rebases and refactors what has been implemented in !712.
Introduces:
* parameter handling for the TN app
* radial profile computation
* IO for radial profiles
* temperature initialization functions
Major edits compared to !712:
* refactored temperature initialization functions (now just a "library" of functions that create lambdas for `interpolate()`)
* refactored the radial profile tool (much more efficient as all relevant values are computed in a single loop, [free your functions](https://github.com/CppCon/CppCon2017/blob/master/Presentations/Free%20Your%20Functions/Free%20Your%20Functions%20-%20Klaus%20Iglberger%20-%20CppCon%202017.pdf))
* refactored parameter IO (using json with better error handling, no more global variables, etc.)Nils KohlNils Kohlhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/727[Rebased] Integrating Stokes solvers from branch burk/ELWMS.2024-03-20T15:56:34+01:00Nils Kohl[Rebased] Integrating Stokes solvers from branch burk/ELWMS.Rebased - see !718.Rebased - see !718.Nils KohlNils Kohlhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/723Generated Stokes operators with annulus blending2024-03-15T14:49:45+01:00Nils KohlGenerated Stokes operators with annulus blendingNils KohlNils Kohlhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/716GEMV2024-03-21T21:55:14+01:00Nils KohlGEMVThis MR implements the `gemv` as described in detail in #253.
It turns out that only minor changes have to applied to the `apply()` method to make this work (at least for the elementwise operators).This MR implements the `gemv` as described in detail in #253.
It turns out that only minor changes have to applied to the `apply()` method to make this work (at least for the elementwise operators).Nils KohlNils Kohlhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/713Extend geometry getter functions of Face and Cell class2024-02-29T15:25:13+01:00Marcus MohrExtend geometry getter functions of Face and Cell classThis MR adds three new functions:
- `Face::getIncircleRadius()`
- `Cell::getVolume()`
- `Cell::getInsphereRadius()`
We test these together with the existing `Face::getArea()` function in the new **Face+CellGeometryTest**.This MR adds three new functions:
- `Face::getIncircleRadius()`
- `Cell::getVolume()`
- `Cell::getInsphereRadius()`
We test these together with the existing `Face::getArea()` function in the new **Face+CellGeometryTest**.Marcus MohrMarcus Mohrhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/710New generated Stokes operators2024-03-06T08:34:39+01:00Nils KohlNew generated Stokes operatorsSee #246 for extended discussion
----
## Checklist:
- [x] `hyteg-operators` submodule needs to be updated as soon as https://i10git.cs.fau.de/hyteg/hyteg-operators/-/merge_requests/3 is merged
- [x] fix unused variable warnings in gen...See #246 for extended discussion
----
## Checklist:
- [x] `hyteg-operators` submodule needs to be updated as soon as https://i10git.cs.fau.de/hyteg/hyteg-operators/-/merge_requests/3 is merged
- [x] fix unused variable warnings in generated operators
- [x] [move divergence, gradient, viscous directories out of the stokes directory and under `hyteg_operators_composites` instead](https://i10git.cs.fau.de/hyteg/hyteg/-/issues/246#note_28717)
- [x] fix issues for `real_t = float` (single precision builds)
- [x] blending operators test
----
## New module `hyteg_operators_composites`
This MR adds a new module `hyteg_operators_composites` that contains composite operators that are built from generated operators.
For now, three variants of Stokes operators have been added:
* P2P1StokesConstantOperator
* P2P1StokesEpsilonOperator
* P2P1StokesFullOperator
including the necessary viscous, divergence and gradient operators plus their `IcosahedralShellMap` blending versions.
The new module also comes with a short README.
## Testing
The MR extends and modifies
* P2P1ElementwiseStokesOperatorTest (Stokes constant, 2D + 3D)
* P2P1ElementwiseStokesOperatorTest (full Stokes w/ blending, 3D)
* ElementwiseEpsilonMinResConvergenceTest (Stokes epsilon, 2D + 3D)
* DivergenceOperatorTest (divergence, 2D + 3D)
* ViscousOperatorsTest (epsilon + full viscous block, 2D )
to test the new composites.
At least the 2D versions of all non-blending Stokes operators are now tested to some extent.Nils KohlNils Kohlhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/706First version of an abstract reduce function2024-04-03T11:34:19+02:00Dominik Thoennesdominik.thoennes@fau.deFirst version of an abstract reduce functionThis MR introduces an abstract reduce function which could replace e.g. the `getMaxValue` function.
The `std::function` might reduce the runtime of the function.
I made some benchmarks with the `allGather` version of this.
Here is the ...This MR introduces an abstract reduce function which could replace e.g. the `getMaxValue` function.
The `std::function` might reduce the runtime of the function.
I made some benchmarks with the `allGather` version of this.
Here is the average runtime in seconds per process for a very simple benchmark which performs the getMaxValue **1000 times** with 4608 processes (64 nodes * 72 cores).
Note: l
| | getMaxValue | w.o. MPI | | abstract getMaxValue | w.o. MPI |
|------------|-------------|----------|---|----------------------|----------|
| first run | 0.20 s | 0.12 s | | 0.63 s | 0.17 s |
| second run | 0.17 s | 0.12 s | | 0.61 s | 0.17 s |
When using allReduce instead of allGather these are numbers for commit 6e12c653. again **1000 times** with 4608 processes (64 nodes * 72 cores)
| | getMaxValue | w.o. MPI | | abstract getMaxValue | w.o. MPI |
|------------|-------------|----------|---|----------------------|----------|
| first run | 0.18 s | 0.11 s | | 0.22 s | 0.14 s |
| second run | 0.20 s | 0.11 s | | 0.21 s | 0.14 s |https://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/705Add Stokes benchmarks for annulus and thick spherical shell settings2024-02-22T13:47:51+01:00Marcus MohrAdd Stokes benchmarks for annulus and thick spherical shell settingsThe benchmarks are based on and extend, w.r.t. boundary conditions, those described in [Analytical solutions for mantle flow in cylindrical and spherical shells](https://doi.org/10.5194/gmd-14-1899-2021) by Kramer et al.
Also noteworthy...The benchmarks are based on and extend, w.r.t. boundary conditions, those described in [Analytical solutions for mantle flow in cylindrical and spherical shells](https://doi.org/10.5194/gmd-14-1899-2021) by Kramer et al.
Also noteworthy is the addition of a `PythonCallingWrapper` class.https://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/703Draft: Scalable operators and other prerequisites for further merge requests2024-04-08T13:42:11+02:00Andreas BurkhartDraft: Scalable operators and other prerequisites for further merge requestsContents:
- made constant and elementwise operators scalable by a constant
- added fenics form compatability functions to some form headers (required for constant operator scaling)
- added some new forms
- elementwise operators can now a...Contents:
- made constant and elementwise operators scalable by a constant
- added fenics form compatability functions to some form headers (required for constant operator scaling)
- added some new forms
- elementwise operators can now also return lumped diagonal values and lumped inverse diagonal values
- some minor changes to P2ToP1 and P1ToP2 Elementwise Operators to allow for the usage of variable forms
- added DoFValueFunction interface to VertexDofFunction and EdgeDofFunction as a prerequisite for DoFValueOperators
- made the geometryMap in Form.hpp mutable (this is required for DoFValueOperators, due to issues with const correctness, I know this looks wrong)
First of all: I'm sorry. In my opinion this is the smallest package that makes sense for this.
Some notes:
- Nils and I have already spoken about applying operators in a scaled fashion of the form A.apply(s, d, $\alpha$. $\beta$) effectively evaluating to $\alpha \cdot d + \beta \cdot A s$. For now however I need a solution like this to make creating new operators and especially time stepping schemes tolerable. Another solution would be to have a very general class for an operator linear combination (preferably that is not inefficient and uses lots of temporary functions!).
- I plan to at least offer the old DoFValueOperators as a comparison tool and for some legacy tests in a future merge request. They will go into their own submodule perhaps, where they don't annoy other users.Andreas BurkhartAndreas Burkhart