hyteg merge requestshttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests2022-10-31T20:19:23+01:00https://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/531Micro-cell refinement: function to compute fine-level micro-cell indices.2022-10-31T20:19:23+01:00Nils KohlMicro-cell refinement: function to compute fine-level micro-cell indices.Nils KohlNils Kohlhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/535Resolve issue #1842022-12-06T16:25:39+01:00Marcus MohrResolve issue #184The merge will make the evaluate() and evaluateGradient() methods of P[12]Function and DGFunction expect physical instead of computational coordinates. Additionally it fixes the problem with piecewise defined blending maps described as p...The merge will make the evaluate() and evaluateGradient() methods of P[12]Function and DGFunction expect physical instead of computational coordinates. Additionally it fixes the problem with piecewise defined blending maps described as part of issue #184.Marcus MohrMarcus Mohrhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/544Demonstrators for working with Surfaces in 3D2022-11-29T16:33:06+01:00Marcus MohrDemonstrators for working with Surfaces in 3DMotivated by the issue that led to [6b4c8e95] I tested the possibility to work with **3D surfaces** in HyTeG. As it turns out this works at least partially. We can construct them, use them to generate function objects, interpolate expres...Motivated by the issue that led to [6b4c8e95] I tested the possibility to work with **3D surfaces** in HyTeG. As it turns out this works at least partially. We can construct them, use them to generate function objects, interpolate expressions into the associated FE spaces and output the functions for visualisation correctly.
I added a tiny `3DSurfaceDemo` app to show that and adapted the `SPHdemo` to allow computing the spherical harmonics only on a thin shell:
![SphericalHarmonic-deg5-order3](/uploads/63b5bf62f189c0db14ccfe0786326ebc/SphericalHarmonic-deg5-order3.png)
What I did not test so far is anything operator related, though.
Cheers
MarcusMarcus MohrMarcus Mohrhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/552Add a SphericalElementFormMass2022-12-16T14:06:38+01:00Marcus MohrAdd a SphericalElementFormMassThis merge demonstrates that we can successfully apply an ElementwiseOperator to a scalar function on a 2D surface in 3D.This merge demonstrates that we can successfully apply an ElementwiseOperator to a scalar function on a 2D surface in 3D.Marcus MohrMarcus Mohrhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/549Add Nedelec edge elements of type I and order 12022-12-16T17:55:09+01:00Daniel BauerAdd Nedelec edge elements of type I and order 1Nedelec elements [1] are implemented in class `N1E1VectorFunction`.
They are useful for problems in H(curl).
The notation follows the Periodic Table of the Finite Elements [2].
Additionally, the hybrid smoother by Hiptmair [3] is impleme...Nedelec elements [1] are implemented in class `N1E1VectorFunction`.
They are useful for problems in H(curl).
The notation follows the Periodic Table of the Finite Elements [2].
Additionally, the hybrid smoother by Hiptmair [3] is implemented.
[1] J. C. Nedelec, “Mixed finite elements in ℝ3,” Numer. Math., vol. 35, no. 3, pp. 315–341, Sep. 1980, doi: [10.1007/BF01396415](https://doi.org/10.1007/BF01396415).<br>
[2] D. N. Arnold and A. Logg, “Periodic Table of the Finite Elements,” SIAM News, Nov. 2014. Accessed: Jul. 04, 2022. [Online]. Available: https://www-users.cse.umn.edu/~arnold/femtable<br>
[3] R. Hiptmair, “Multigrid Method for Maxwell’s Equations,” SIAM J. Numer. Anal., vol. 36, no. 1, pp. 204–225, Jan. 1998, doi: [10.1137/S0036142997326203](https://doi.org/10.1137/S0036142997326203).Daniel BauerDaniel Bauerhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/553Disentangle VectorFunction dimension from hasGlobalCells()2022-12-16T18:11:35+01:00Marcus MohrDisentangle VectorFunction dimension from hasGlobalCells()After the merge we can construct P[12]VectorFunction objects that represent 3D fields living on 2D surfaces and export them to vtu-files.After the merge we can construct P[12]VectorFunction objects that represent 3D fields living on 2D surfaces and export them to vtu-files.Marcus MohrMarcus Mohrhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/565VolumeDoF Packinfo 2D (pack + unpack)2023-02-10T20:19:46+01:00Nils KohlVolumeDoF Packinfo 2D (pack + unpack)Nils KohlNils Kohlhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/574add MPI Version to buildInfo2023-03-20T18:11:39+01:00Dominik Thoennesdominik.thoennes@fau.deadd MPI Version to buildInfohttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/584Enriched Galerkin functionspace2023-04-19T19:31:44+02:00Fabian BöhmEnriched Galerkin functionspaceAdds the Enriched Galerkin discretization to HyTeG, contained in directory src/hyteg/egfunctionspace:
- Forms for mass, div, divt, Laplacian and epsilon
- corresponding operators with and without Nitsche-type boundary conditions (Nits...Adds the Enriched Galerkin discretization to HyTeG, contained in directory src/hyteg/egfunctionspace:
- Forms for mass, div, divt, Laplacian and epsilon
- corresponding operators with and without Nitsche-type boundary conditions (Nitsche-operators are preferred due to their symmetry)
- a Stokes-function and operators in directory src/hyteg/composites
- interpolation operators between DG and CG of first degree with P1toDGOperator in directory src/hyteg/dgfunctionspace
- additional addVolumeGhostlayer functionality in vertexDoFFunction required in P1toP0Operator and P0toP1Operator
Two benchmarks with strongy varying viscosity from literature reside in apps/2022-eg-varvisc.
tests/hyteg/egfunctionspace contains tests for operator symmetry, forms, matvec/apply, basic operations of EGFunction and convergence tests.https://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/585Add isIdentity and isAffine to GeometryMap2023-04-20T17:38:29+02:00Daniel BauerAdd isIdentity and isAffine to GeometryMapFixes hyteg/hyteg#208.Fixes hyteg/hyteg#208.Daniel BauerDaniel Bauerhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/594Allow use of isoparametric elements in VTKOutput for P2Functions2023-06-22T17:38:46+02:00Marcus MohrAllow use of isoparametric elements in VTKOutput for P2FunctionsThe merge introduces a change to the functionality of the `VTKOutput` class. When writing `P2(Vector)Function`s the default now is to use *VTK_QUADRATIC_TRIANGLE* or *VTK_QUADRATIC_TETRA* as cell type.
The old way to export these functi...The merge introduces a change to the functionality of the `VTKOutput` class. When writing `P2(Vector)Function`s the default now is to use *VTK_QUADRATIC_TRIANGLE* or *VTK_QUADRATIC_TETRA* as cell type.
The old way to export these functions as `P1Function`s on a refined mesh is for the moment still supported and can be activated by calling
- `setUseVTKQuadraticTriangle( false )` or
- `setUseVTKQuadraticTetra( false )`
on the corresponding `VTKOutput` object.
Comparison of the old versus the new approach looks good so far. In the following figures the left part shows a visualisation with the old and the right with the new approach:
![VTK_Quadratic_Triangle-partialAnnulus](/uploads/7fc7c7ed185be1f2fd4bd6ab77057d21/VTK_Quadratic_Triangle-partialAnnulus.png)
![VTK_QUADRATIC_TETRA_3TETS_LVL2-v2](/uploads/3a5ce647b6dca79acc120c590bca1df5/VTK_QUADRATIC_TETRA_3TETS_LVL2-v2.png)Marcus MohrMarcus Mohrhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/597Add function for writing blended coarse mesh2023-05-12T10:04:52+02:00Daniel BauerAdd function for writing blended coarse meshWith this MR we can visualize meshes on the physical domain.
![image](/uploads/2412529a9f21b3c4d7b2c3d6cacd1f7a/image.png)
Edit: Now, VTP and poly lines are used.With this MR we can visualize meshes on the physical domain.
![image](/uploads/2412529a9f21b3c4d7b2c3d6cacd1f7a/image.png)
Edit: Now, VTP and poly lines are used.Daniel BauerDaniel Bauerhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/600Allow asking a Primitive for its type2023-05-19T17:19:54+02:00Marcus MohrAllow asking a Primitive for its typeIn most of our current algorithms we (implicitely) know what type of primitive we are dealing with, i.e. whether we are working on a `Cell`, `Face`, `Edge` or `Vertex`. This largely results from the fact that we ask a `PrimitiveStorage` ...In most of our current algorithms we (implicitely) know what type of primitive we are dealing with, i.e. whether we are working on a `Cell`, `Face`, `Edge` or `Vertex`. This largely results from the fact that we ask a `PrimitiveStorage` object to provide us with all local primitives of a certain type, e.g. via `PrimitiveStorage::getFaces()`.
Still to me it feels strange that we can neither query an object of type `Primitive` to obtain its type, nor that this is encoded in its associated `PrimitiveID`. There are some situations, where we might not (implicitely) know what kind of primitive we are dealing with. An example at the moment would be the migration of primitives between MPI processes. As a consequence of this the `PrimitiveStorage` class defines its own `PrimitiveTypeEnum` and provides a `getPrimitiveType()` method, which, presented with a `PrimitiveID` will return the type of the primitive, if this is either present locally, or in the immediate neighbourhood. If not, it will return `INVALID`.
The idea of this MR is to equip the `Primitive` class itself with a `PrimitiveTypeEnum` type that only has the values `CELL`, `FACE`, `EDGE` and `VERTEX` and a pure virtual function `Primitive::getType()` that can be used to query this. The latter is then easily implemented in the child classes.
The MR preserves `PrimitiveStorage::PrimitiveTypeEnum`, because I did not want to add a special situation `INVALID` enum to `Primitive::PrimitiveTypeEnum`. The former quasi extends the latter, based on fixed int values, so that we can cast the former into the latter.
That feels not ideal, but I am too unfamiliar with the details of primitive migration to understand, why we might want to send a nullptr together with an `INVALID` from one process to another, to change that.
Cheers
MarcusMarcus MohrMarcus Mohrhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/627Add capability to export FE functions for visualisation using the ADIOS2 library2023-07-17T14:34:59+02:00Marcus MohrAdd capability to export FE functions for visualisation using the ADIOS2 libraryThis MR extends the dataexport capabilities of HyTeG by allowing to use the [ADIOS 2: The Adaptable Input Output (I/O) System version 2](https://csmd.ornl.gov/software/adios2) to write FE function data to file for visualisation with Para...This MR extends the dataexport capabilities of HyTeG by allowing to use the [ADIOS 2: The Adaptable Input Output (I/O) System version 2](https://csmd.ornl.gov/software/adios2) to write FE function data to file for visualisation with ParaView.
The corrent implementation so far only supports functions of type
- P1Function + P1VectorFunction
- P2Function + P2VectorFunction
- P2P1TaylorHoodFunction
but is easily extensible by adding another specialised sub-writer class.Extend capabilities for exporting data by adding support for ADIOS2Marcus MohrMarcus Mohrhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/635Enhance functionality of FEFunctionRegistry and FunctionMultiStore2023-07-28T14:21:17+02:00Marcus MohrEnhance functionality of FEFunctionRegistry and FunctionMultiStoreThe `FEFunctionRegistry` and `FunctionMultiStore` classes are extended to
- allow to remove functions again; note: this technically touches on issues #172 and #186
- only store functions once, where uniqueness is based on the function's...The `FEFunctionRegistry` and `FunctionMultiStore` classes are extended to
- allow to remove functions again; note: this technically touches on issues #172 and #186
- only store functions once, where uniqueness is based on the function's name
This MR supersedes !634.Marcus MohrMarcus Mohrhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/653Draft: Particles2023-09-21T09:42:00+02:00Nils KohlDraft: ParticlesThis MR implements unresolved particles via the MESA-PD particle code generation framework.
The objective is the implementation of **fluid (<)-> particle** and later **particle <-> particle** interactions. Since the particles are assume...This MR implements unresolved particles via the MESA-PD particle code generation framework.
The objective is the implementation of **fluid (<)-> particle** and later **particle <-> particle** interactions. Since the particles are assumed to be smaller than the elements, the module is referred to as _unresolved particles_. Thus fluid-particle interactions are not meant to be fully resolved but are modeled instead. At this point, only the one-way coupling (fluid acts on particles, not vice versa) is considered.
This is sufficient to, e.g., implement tracer particles.
Some notes:
* The implementation is already fully parallelized.
* There is a new tutorial (no. 12) including some images.
* The particle properties are subject to change and probably need to be discussed in the future. As of now, it is possible to flexibly add custom real and integer scalars to particles if needed.
* Direct application of velocity and force fields is possible. For tracer particles, the former is sufficient and can be interpreted as a extremely simplified form of Faxén's law (https://en.wikipedia.org/wiki/Fax%C3%A9n%27s_law). Force fields are also already supported, and naturally involve the particle mass for the computation of the resulting translational velocity.
* Theoretically, all features that are available in MESA-PD can be used. This includes, for instance, other integrators. However, using them involves generating the corresponding C++ code via MESA-PD through the python script in the `data/codegen/unresolved_particles/` directory.
* I had in mind that there has been a temporary(?) tracer particle implementation in the TerraNeo module. I cannot find it right now (could be on a branch) - and I might be wrong. If there is one, we should consider replacing it (and add required features to this new version - if possible).
* Blended domains are not yet supported.Nils KohlNils Kohlhttps://i10git.cs.fau.de/hyteg/hyteg/-/merge_requests/649Draft: To GeometryMap add a method to compute second derivatives2023-09-14T16:10:30+02: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/642First version of parallel PrimitiveStorage setup from file.2023-09-05T12:13:51+02:00Nils KohlFirst version of parallel PrimitiveStorage setup from file.This MR realizes a two-step process. First, in a serial (offline) run, the SetupPrimitiveStorage is built and passed to a load balancer, followed by serialization to a file. During the actual, parallel run, the file is read via MPIIO suc...This MR realizes a two-step process. First, in a serial (offline) run, the SetupPrimitiveStorage is built and passed to a load balancer, followed by serialization to a file. During the actual, parallel run, the file is read via MPIIO such that only the portion that is necessary has to be viewed by the respective process. From that binary string, the entire PrimitiveStorage is created in parallel.
There are numerous possible optimizations - most notably, it is not clear to me right now if the current approach of simply writing all neighbor primitives to file is preferable, or if alternatively, such data should be communicated after only reading the locally allocated primitives. Maybe it does not even make a difference at all. Also, this implementation has not been tested with large setups yet.Nils KohlNils Kohlhttps://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 ...2023-09-27T18:02:25+02: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 Burkhart