- Jan 09, 2025
-
-
Oliver Sander authored
Remove Hermite basis in functionspacebases/test See merge request !496
-
- Jan 07, 2025
-
-
Carsten Gräser authored
Cater for 32bit architecture where size_t is unsigned int. See merge request !497
-
- Jan 06, 2025
-
-
Carsten Gräser authored
Relax range type deduction in ComposedGridFunction See merge request !500
-
-
Using long unsigned int breaks compilation on 32bit architectures for no reason Compile errors fixed on 32bit are: ``` cd /<<PKGBUILDDIR>>/build/dune/functions/analyticfunctions/test && /usr/bin/c++ -DHAVE_CONFIG_H -DHAVE_MPI=1 -DHAVE_SUPERLU=1 -DMPICH_SKIP_MPICXX=1 -DMPIPP_H -DMPI_NO_CPPBIND=1 -DModelP -DOMPI_SKIP_MPICXX=1 -D_MPICC_H -I/<<PKGBUILDDIR>>/build -I/<<PKGBUILDDIR>> -I/<<PKGBUILDDIR>>/build/include -I/<<PKGBUILDDIR>>/build/include_private -isystem /usr/lib/arm-linux-gnueabi/mpich/include -isystem /usr/include/superlu -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 -fPIE -MD -MT dune/functions/analyticfunctions/test/CMakeFiles/polynomialtest.dir/polynomialtest.cc.o -MF CMakeFiles/polynomialtest.dir/polynomialtest.cc.o.d -o CMakeFiles/polynomialtest.dir/polynomialtest.cc.o -c /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/test/polynomialtest.cc /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/test/polynomialtest.cc: In instantiation of ‘Dune::TestSuite testDynamicPolynomial() [with Scalar = double; CoefficientArgs = {std::array<double, 4>}]’: /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/test/polynomialtest.cc:221:68: required from here 221 | suite.subTest(testDynamicPolynomial<double, std::array<double,4>>()); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/test/polynomialtest.cc:58:14: error: class template argument deduction failed: 58 | auto p = Polynomial(Coefficients({1, 2, 3, -4})); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/test/polynomialtest.cc:58:14: error: no matching function for call to ‘Polynomial(std::array<double, 4>)’ In file included from /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/test/polynomialtest.cc:15: /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:145:3: note: candidate: ‘template<class K, class C> Polynomial(C)-> Dune::Functions::Polynomial<K, C>’ 145 | Polynomial(Coefficients coefficients) : | ^~~~~~~~~~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:145:3: note: template argument deduction/substitution failed: /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/test/polynomialtest.cc:58:14: note: couldn’t deduce template parameter ‘K’ 58 | auto p = Polynomial(Coefficients({1, 2, 3, -4})); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:135:3: note: candidate: ‘template<class K, class C> Polynomial()-> Dune::Functions::Polynomial<K, C>’ 135 | Polynomial() = default; | ^~~~~~~~~~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:135:3: note: candidate expects 0 arguments, 1 provided /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:121:7: note: candidate: ‘template<class K, class C> Polynomial(Dune::Functions::Polynomial<K, C>)-> Dune::Functions::Polynomial<K, C>’ 121 | class Polynomial | ^~~~~~~~~~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:121:7: note: template argument deduction/substitution failed: /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/test/polynomialtest.cc:58:14: note: ‘std::array<double, 4>’ is not derived from ‘Dune::Functions::Polynomial<K, C>’ 58 | auto p = Polynomial(Coefficients({1, 2, 3, -4})); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:207:1: note: candidate: ‘template<class K> Dune::Functions::Polynomial(std::initializer_list<_Tp>)-> Polynomial<K, std::vector<TIN> >’ 207 | Polynomial(std::initializer_list<K>) -> Polynomial<K, std::vector<K>>; | ^~~~~~~~~~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:207:1: note: template argument deduction/substitution failed: /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/test/polynomialtest.cc:58:14: note: ‘std::array<double, 4>’ is not derived from ‘std::initializer_list<_Tp>’ 58 | auto p = Polynomial(Coefficients({1, 2, 3, -4})); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:204:1: note: candidate: ‘template<class K, K ...ci> Dune::Functions::Polynomial(std::integer_sequence<T, t ...>)-> Polynomial<K, std::integer_sequence<T, t ...> >’ 204 | Polynomial(std::integer_sequence<K, ci...>) -> Polynomial<K, std::integer_sequence<K,ci...>>; | ^~~~~~~~~~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:204:1: note: template argument deduction/substitution failed: /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/test/polynomialtest.cc:58:14: note: ‘std::array<double, 4>’ is not derived from ‘std::integer_sequence<T, t ...>’ 58 | auto p = Polynomial(Coefficients({1, 2, 3, -4})); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:201:1: note: candidate: ‘template<class K, long unsigned int n> Dune::Functions::Polynomial(std::array<K, n>)-> Polynomial<K, std::array<K, n> >’ 201 | Polynomial(std::array<K,n>) -> Polynomial<K, std::array<K,n>>; | ^~~~~~~~~~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:201:1: note: template argument deduction/substitution failed: /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/test/polynomialtest.cc:58:14: note: mismatched types ‘long unsigned int’ and ‘unsigned int’ 58 | auto p = Polynomial(Coefficients({1, 2, 3, -4})); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/polynomial.hh:198:1: note: candidate: ‘template<class K> Dune::Functions::Polynomial(std::vector<TIN>)-> Polynomial<K, std::vector<TIN> >’ 198 | Polynomial(std::vector<K>) -> Polynomial<K, std::vector<K>>; | ^~~~~~~~~~ ... /<<PKGBUILDDIR>>/dune/functions/analyticfunctions/test/polynomialtest.cc:184:28: error: no match for ‘operator==’ (operand types are ‘Dune::Functions::Polynomial<int, std::tuple<long unsigned int, std::integral_constant<long unsigned int, 6>, long int> >’ and ‘Dune::Functions::Polynomial<int, std::tuple<long unsigned int, std::integral_constant<unsigned int, 6>, long int> >’) 184 | suite.check(derivative(p)==dp); | ```
-
Carsten Gräser authored
Use `localFunction(f)(localX)` instead of `f(globalX)` for the wrapped grid function `f` when deducing the range type in `ComposedGridFunction`. This is more flexible in case the wrapped function does not implement global evaluation, but only the local one. Since we wrap a `GridFunction` the latter must always exist.
-
Carsten Gräser authored
[bugfix] Fix error message in monomialsettest.cc See merge request !503
-
Carsten Gräser authored
The error message created for the exception assumes `dim==2` while it is actually templated wrt `dim` and we test with 1,2,3. Since the check passes, this bug is normally not triggered, but the compiler warns about the bogus read with `p[i][1]` if `p[i]` has size one.
-
Carsten Gräser authored
[bugfix] Don't use mv and mtv with raw random access containers See merge request !501
-
Carsten Gräser authored
Since the `DenseVector` base class does not contain any members, we don't need to explicitly initialize it.
-
Carsten Gräser authored
Since `Impl::DenseVectorView` is just a wrapper around a refence/pointer to a raw container, having a copy constructor does not make sense. Unless we introduce dynamic memory management the only possibility is to either let a copy-constructed `DenseVectorView` to the same storage or to `nullptr`. Both are not what one would expect. Assume e.g. the following function expecting a matrix and vector argument gets a `DenseVectorView` as `x`: ```cpp template<class A, class X> auto foo(const A& a, const X& x) { auto y = x; // Assume that this copies the internal pointer, a.mv(x, y); // then this changes the storage of x when writing to y. return x*y; } ```
-
- Dec 17, 2024
-
-
Carsten Gräser authored
The Dune matrix types do not support `MatrixType::mv(x,y)` passing plain random access containers as vectors but require `x.N()` and `y.N()` if bound checks are enabled. As a fix we introduce an internal `Impl::DensseVectorView` class that provides the `DenseVector` interface for generic random access containers. Notice that this class is not tested for general use and should be replaced by `DenseVectorSpan` once this was added to dune-common and is sufficiently generic for beeing used here.
-
- Nov 23, 2024
-
-
Carsten Gräser authored
[bugfix] Fix gready overload of operator<< for StaticMultiIndex See merge request !498
-
- Nov 22, 2024
-
-
Carsten Gräser authored
When overloading the free operator `operator<<(const S&, const T&)` for a stream `S` and a specific type `T` that we have under control, one should not provide a gready overload for `template<class S>` but use `std::ostream`. Here we do _not_ want to define what `s << StaticMultiIndex()` means for any type `S` but only for cases where we write into a character stream. A downstream library may want to define the same operator for a type `S` under _its_ control, e.g. to define its own custom semantics for `s<<t`.
-
- Nov 14, 2024
-
-
Oliver Sander authored
The old tests disabled a few local tests, because they were "not in master" yet. I don't quite know what this refered to, but the full tests seem to work now.
-
Oliver Sander authored
That code is not specific to CubicHermiteBasis at all. If infrastructure for benchmarking bases is desired, then it should be independent of particular bases.
-
Oliver Sander authored
-
Oliver Sander authored
It has been superseded by the official CubicHermiteBasis class.
-
- Nov 13, 2024
-
-
Oliver Sander authored
Fix wrong range and jacobian type in hermitebasistest Closes #88 See merge request !492
-
- Oct 15, 2024
-
-
Maik Porrmann authored
Feature/transformed finite element mixin See merge request !490
-
- Oct 10, 2024
-
-
Carsten Gräser authored
-
Carsten Gräser authored
There are many Hermite-type elements. The one implemented here is commonly known as cubic Hermite element.
-
Carsten Gräser authored
This commit is not ment to be merged but should be removed once the test is in. It only serves to disable it in a minimal invasive way such that the CI can be run.
-
Layout cleanup: * Unify indentation. * Unify placement of opening/closing braces. * Unify placement of `static_assert`s and add missing conditions. * Surround each method by empty lines. * Put initializer and base class specifier in new line. * Fix a few typos. * For my inner Monk: Unify indentation of multiline doxygen comments. Other cleanup: * Cleanup includes. * Drop `coeffsize` and use `constexpr` function instead of nested ternary operators. * Rename `MorleyLocalBasis` to `MorleyReferenceLocalBasis`. Co-authored-by: Carsten Gräser <graeser@math.fau.de>
-
Layout cleanup: * Unify indentation. * Unify placement of opening/closing braces. * Unify placement of `static_assert`s and add missing conditions. * Surround each method by empty lines. * Put initializer and base class specifier in new line. * Fix a few typos. * Order some `using` statements. * For my inner Monk: Unify indentation of multiline doxygen comments. Other cleanup: * Remove redundant members. * Cleanup includes. * Drop `coeffsize` and use `constexpr` function instead of nester ternary operators. * Rename `HermiteLocalBasis` to `HermiteReferenceLocalBasis`. * Improve documentation. * Extract generic mapper-based utilities into separate header: * A simple range over all subindices associated to an element within a `MCMGMapper`. * A function computing average mesh sizes for all DOFs addressed by a `MCMGMapper`. * Cleanup internal members: * Incorporate `LFE::fillMatrix()` into `LFE::bind()` to avoid useless indirection. * Incorporate `PreBasis::updateState()` into `PreBasis::update()` to avoid useless indirection. * Use meaningfull names for member variables instead of generic ones like `localState` and `data`. * Use `std::array<T,n>` instead of `std::vector<T>` if `n` is a small compile time constant. Interface improvements: * Add global basis. Further changes: * Test on a non-uniform grid. * Fix a bug (and memory leak) when binding to an element. * Order includes lexicographically. Co-authored-by: Carsten Gräser <graeser@math.fau.de>
-
- Oct 06, 2024
-
-
Carsten Gräser authored
* Extend documentation. * Move non-working 'example' into doxygen documenation. * Unify coding style. * Remove redundant calls to `resize()`. Co-authored-by: Maik Porrmann <maik.porrmann@tu-dresden.de>
-
Carsten Gräser authored
-
Carsten Gräser authored
This is needed to specify the nature of the DOFs of a Hermite-basis in order to identify those that need to be constrained for a certain boundary condition.
-
This implements the global basis for the nonconforming Morley-element. The implementation is based on `TransformedFiniteElementMixin`. This only provides the classical quadratic element in 2d and no higher-order or 3d extensions. Notice that the element is H^1- and H^2-nonconforming.
-
This uses the `TransformedFiniteElementMixin` helper class to imeplement the crucial local transformation needed to ensure global continuity of derivatives. The implementation provides: * The 1d cubic Hermite basis (aka cubic C1 splines) * The 2d cubic Hermite basis (aka Hermite triangle) * A version of the 2d cubic Hermite basis where the cubic element bubble is eliminated. This is known as 'reduced Hermite triangle' and provides one part of the mixed DKT-element. * The 3d cubic Hermite basis Notice that, except for the 1d case, these FE-spaces are one H^1 but not H^2 conforming.
-
This CRTP-mixin class implements the `localBasis()` part of a `LocalFiniteElement` using a transformation of another basis. The implementation class is required to implement member functions `referenceLocalBasis()` and `transform()`. The former allows to define the local ansatz-space in terms of _some_ local basis based on the corresponding interface in dune-localfunctions. The target basis is then given by a set of linear combinations of those reference basis functions. The `transform()` methods implements the linear transformation indiced by those linear combinations. Since the same transformation is used for function values as well as any order of derivative, this __cannot__ be used to implement range transformation as e.g. Piola-transformations.
-
- Oct 03, 2024
-
-
Carsten Gräser authored
[doc][cleanup] Fix typo See merge request !493
-
- Oct 02, 2024
-
-
Carsten Gräser authored
-
Simon Praetorius authored
-
- Sep 27, 2024
-
-
Carsten Gräser authored
Feature/add differentiability checks See merge request !480
-
This adds optional checks for continuity at vertices and continuity of normal derivatives at edge midpoints. The latter is implemented by means of a general framework for differentiability checks.
-
- Sep 25, 2024
-
-
Carsten Gräser authored
Add new function class MonomialSet<K,dim,n> See merge request !470
-
Carsten Gräser authored
-
Co-authored-by: Simon Praetorius <simon.praetorius@tu-dresden.de>
-
Carsten Gräser authored
This implements all `dim`-variate monomials up to order `n` as components of a vector-valued differentiable functions. Currently this is only specialized for order `dim=1` and `dim=2`. The new `MonomialSet` is used and tested in `CubicHermiteBasis`.
-