- Jun 24, 2024
-
-
Carsten Gräser authored
-
Carsten Gräser authored
-
Carsten Gräser authored
-
Carsten Gräser authored
This comes with a slight change: The old helper `Dune::Impl::PointerProxy` was dropped in favor of the new `Dune::ProxyArrowResult`. The latter no longer supports storing raw references. This change is deliberately: In the no-proxy case, we can simply use raw pointers instead of the helper to avoid indirection and keep simple cases simple. Furthermore it this make `TransformedRangeIterator` simpler and allows to make it more flexible: * All iterator operations despite dereferencing are now autogenerated, by exporting `baseIterator()`. * Allow to either store a function or a pointer to function. The transformation is evaluated conditionally, if a call `f(z)` is valid, this is used, else `(*f)(z)` is used. * Use `Dune::AutonomousValue` instead of `std::decay_t` to deduce `value_type`. This improves support for types using this mechanism. * Store `reference` instead of `value_type` in `ProxyArrowResult`. This is important if both types are different and the `reference` proxy e.g. forwards to some other storage. * Add checks for free `TransformedRangeIterator` storing functions with value and pointer semantics.
-
Carsten Gräser authored
-
Carsten Gräser authored
-
Carsten Gräser authored
The new CRTP-mixin class `IteratorFacade` is parameterized by implementation, iterator category, `value_type`, `reference`, `pointer`, and `difference_type`. Discussion of the changes: * Making the iterator category a template parameter, allows to work with the facades class in a more uniform way. E.g. comparisons only need to be defined once for all categories. * Being able to customize `pointer` allows to use the facade classes for proxy-iterators. This was not possible before, because it is not sufficient to simply exchange the `reference` type to support proxies. * The design is in line with the `std::iterator_interface` proposal, in the sense that the template parameters have the same order to avoid surprises. Notice however, that this is not a drop-in replacement because `srd::iterator_interface` avoids classic CRTP by deducing `this`. * Additionally to the old facade classes, `IteratorFacade` also allows to implement the raw analouges of the methods used in the old classes, i.e. * `operator*` instead of `dereference()`, * `operator++` instead of `increment()`, * `operator--` instead of `decrement()`, * `operator+=` instead of `advance()`, * `operator==` instead of `equals()`, * `operator- instead of `distanceTo()`. * If the implementation class provides a `baseIterator()` method returning an underlying internal iterator, the operators of the returned iterator will be used if not dedicated implementation is provided. A major consequence of this change is, that it allows to use the new `IteratorFacade` for proxy-iterators, like e.g. `TransformedRangeIterator`. In this case you have to specify a suitable proxy-type for the pointer. In this case the new helper `Dune::ProxyArrowResult` can be used. This was adopted from the `TransformedRangeIterator`, but the name was adjusted to the `std::iterator_interface` proposal.
-
- Jun 20, 2024
-
-
Carsten Gräser authored
Fix various typos See merge request !1398
-
Carsten Gräser authored
These have been found by codespell locally. but surprisingly not in tthe CI.
-
- Jun 17, 2024
-
-
Carsten Gräser authored
[concept] Simplify tupleEntriesModel() See merge request !1397
-
Carsten Gräser authored
This helper allows to check if all entries from a tuple model a concept. The patch simplifes the check and reduces the dependencies: We no longer depend on `tupleutility.hh` which is pretty heavy weight since in includes `hybridutilities.hh` and `rangeutilities.hh`. Thus emulated concepts could not be used in these headers so far, which is fixed by the patch. To prevent a regression this also adds a test for the previously untestet function.
-
- Jun 15, 2024
-
-
Carsten Gräser authored
Change meaning of function template in TransformedRangeIterator See merge request !1390
-
- Jun 14, 2024
-
-
Carsten Gräser authored
So far the template parameter `F` was interpreted as function and a `const F*` was stored. With this patch `F` is directly interpreted as pointer_type and the `*` is added in the `TransformedRangeView`. This allows to use other pointer-like types than `const F*`. E.g. `TransformedRangeView` now uses `F*` for a non-const iterator, such that the transformation calls a non-const `operator()` for non-const interators. Thus one can use `TransformedRangeIterator` to create self-contained mutable ranges on the fly, which was not possible before (either mutable with reference capture or self-contained but non-mutable). A test for the new feature is added. This also contains a handy utility for combined mutable/nonmutable capture which is not directly possible with plain lambdas. Maybe we later want to make this public. This patch potentially also allows to create self-contained `TransformedRangeIterator`s by passing e.g. an optional (pointer-like but stores a value) as `F`. However, this should be carefully tested and - if working correctly - be accessible publicly in namespace `Dune::`.
-
- Jun 13, 2024
-
-
Carsten Gräser authored
[bugfix] Fix two bugs in TransformedRangeView and TransformedRangeIterator See merge request !1389
-
Carsten Gräser authored
-
Carsten Gräser authored
In order to support `operator->`, the `TransformedRangeIterator` uses a `PointerProxy<T>` that stores the result of the transformation. There are to possible options for the type to be stored: * `reference = decltype(transform(...))` and * `value_type` = std::decay_t<reference>`. So far a `value_type` was stored in the `ProxyType`. This has the consequence that `operator->` will store a copy of the result, even if it is an l-value. Hence `(*it).foo(...)` calls `foo()` on the referenced value while `it->foo(...)` calls it on the copy. This is not only inefficient, but may also lead to incorrect behaviour if `foo(...)` is non-const, e.g. `operator=`. This patch replaces `value_type` by `reference` in the `ProxyType`. Thus if the transformation returns a value it will still be copied, while an l-value reference is stored as reference. To make this work we also have use `add_pointer_t<T>` instead of `T*` to get a proper pointer if `T` is a reference.
-
- Jun 12, 2024
-
-
Carsten Gräser authored
When passing an r-value to function, a move-constructor should be used. This patch uses forwarding references in the constructor of `TransformedRangeView` and in the factory functions `transformedRangeView()` to properly forward r-values and avoid non-move copies if possible.
-
- Jun 01, 2024
-
-
Santiago Ospina De Los Ríos authored
Private config header file generated info with wrong module See merge request !1384
-
- May 31, 2024
-
-
Santiago Ospina De Los Ríos authored
This is mainly an oversight on 45fa74f0. The dune module information was being updated before the public part but not before the private part. This caused private header part to be generated with other module information (e.g. dune-grid would be populated with dune-common variables)
-
- May 30, 2024
-
-
Andreas Dedner authored
[Python] reenable 'setFlags' functionality See merge request !1383
-
Andreas Dedner authored
compile flags and turn off dependency checks for debugging (e.g. dune.generated.setFlags) did not work anymore. This commit adds this functionality to the new builder
-
Simon Praetorius authored
Make direct dune packages verbose and silent on indirect ones Closes #366 See merge request !1382
-
- May 29, 2024
-
-
Santiago Ospina De Los Ríos authored
Resolve "CMake module path not properly setup at config time" Closes #367 See merge request !1381
-
Santiago Ospina De Los Ríos authored
-
Santiago Ospina De Los Ríos authored
-
Santiago Ospina De Los Ríos authored
-
Simon Praetorius authored
Fix a naming bug in RemoteIndex See merge request !1379
-
- May 26, 2024
-
-
Simon Praetorius authored
Handle DUNE dependencies at find_package See merge request !1249
-
-
-
-
Resolve DUNE_LIBS at config file time Deprecate old functions Add cross-version compatibility
-
This was added on 8edbd926 to avoid conflicting with modules pre dune 2.3. Since we do not register dune modules with export(PACKAGE ...) and there is no compatibility with these modules, NO_CMAKE_PACKAGE_REGISTRY is not required anymore.
-
- May 25, 2024
-
- May 20, 2024
-
-
Simon Praetorius authored
[cmake] Do not use DUNE_INSTALL_LIBDIR but CMAKE_INSTALL_LIBDIR Closes #361 See merge request !1341
-
- May 17, 2024
-
-
Christoph Grüninger authored
Will be repaced by CMake's CMAKE_INSTALL_LIBDIR. This value is also used if DUNE_INSTALL_LIBDIR is undefined. The behavior was irritating, as the installation location of pkg-config file depended on the module providing a library.
-
Simon Praetorius authored
-
- May 13, 2024
-
-
Andreas Dedner authored
[python bugfix] computing the 'strides' for the FM buffer export to python See merge request !1376
-
- May 12, 2024
-
-
Simon Praetorius authored
Add implementation of span, mdspan and mdarray See merge request !1334
-
Simon Praetorius authored
-