Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
028cc7a
Add failing test
jorgensd Jan 12, 2026
6262cac
Add fix that compares the underlying mesh before using copy without d…
jorgensd Jan 12, 2026
30b2bf3
Swith order of comparsions to do pointers first.
jorgensd Jan 12, 2026
8a0d0a8
Further clarifications in the interpolation code for matching meshes
jorgensd Jan 13, 2026
a8c21d0
Remove unused variable
jorgensd Jan 13, 2026
1de4744
Merge branch 'main' into dokken/submesh-mapped-interpolated
garth-wells Jan 13, 2026
860efc1
Add test checking that copying only happens when cells0 is equal to a…
jorgensd Jan 14, 2026
9a0c032
Doc linting
jorgensd Jan 14, 2026
2d4baa0
Another doc linting fix
jorgensd Jan 14, 2026
7bc9365
Clang formatting
jorgensd Jan 14, 2026
0eac4fc
Use size_t
jorgensd Jan 14, 2026
6331796
Simplify
garth-wells Jan 24, 2026
4acc479
Simplifications
garth-wells Jan 24, 2026
af33ccb
const fixes
garth-wells Jan 24, 2026
59a0322
Add debug check
garth-wells Jan 24, 2026
4b55871
Merge branch 'main' into garth/submesh-mapped-interpolated
garth-wells Jan 24, 2026
9f12dc8
Fix
garth-wells Jan 24, 2026
3913b71
Simplify
garth-wells Jan 24, 2026
928adde
Fix typo
garth-wells Jan 24, 2026
32fa5eb
Small doc improvements
garth-wells Jan 24, 2026
c86c413
Use ranges
garth-wells Jan 24, 2026
95a3c79
More ranges
garth-wells Jan 24, 2026
5bd188a
More ranges
garth-wells Jan 24, 2026
3b719c0
Merge remote-tracking branch 'origin/main' into garth/interpolate-ran…
garth-wells Jan 24, 2026
caa0551
Updates
garth-wells Jan 24, 2026
1d32cda
Doc fixes
garth-wells Jan 24, 2026
da486a8
Logic fix
garth-wells Jan 25, 2026
0ea7602
Simplify
garth-wells Jan 25, 2026
0ccd08c
Small fix
garth-wells Jan 25, 2026
48df7f5
Tidy up
garth-wells Jan 25, 2026
1223aab
Use new interface
garth-wells Jan 25, 2026
ecac029
Binding fix
garth-wells Jan 25, 2026
974b5a1
Merge branch 'main' into garth/interpolate-ranges-2
garth-wells Jan 25, 2026
4495510
Simplify
garth-wells Jan 25, 2026
27704b8
Improvements
garth-wells Jan 25, 2026
e2f3316
Fix
garth-wells Jan 25, 2026
31a8991
More logix improvements
garth-wells Jan 25, 2026
2e637fe
Update Expression logic
garth-wells Jan 25, 2026
2ad5c9a
Simplify
garth-wells Jan 25, 2026
1698a55
Re-enable test
garth-wells Jan 25, 2026
6ff0ad9
Merge branch 'main' into garth/interpolate-ranges-2
garth-wells Jan 25, 2026
a2828bd
Simplification
garth-wells Jan 25, 2026
72da568
Remove commented code
garth-wells Jan 25, 2026
266878f
Iterator improvements
garth-wells Jan 25, 2026
dee45dc
Tidy
garth-wells Jan 25, 2026
f592e45
Update cpp/dolfinx/fem/Function.h
garth-wells Jan 25, 2026
d9ab8b9
Add sign test
garth-wells Jan 25, 2026
d2940c8
Name updates
garth-wells Jan 25, 2026
1144820
Update cpp/dolfinx/fem/interpolate.h
garth-wells Jan 25, 2026
3f13c0b
Tidy
garth-wells Jan 25, 2026
f2c8c0f
Merge branch 'garth/interpolate-ranges-2' of github.com:FEniCS/dolfin…
garth-wells Jan 25, 2026
fcbf83e
Tidy
garth-wells Jan 25, 2026
4bc8548
Code improvements
garth-wells Jan 26, 2026
1b441d8
Merge remote-tracking branch 'origin/main' into garth/interpolate-ran…
garth-wells Jan 26, 2026
1881d44
Remove testing
garth-wells Jan 26, 2026
4108ba0
Tidy docs
garth-wells Jan 26, 2026
9de6b17
Doc improvements
garth-wells Jan 26, 2026
32f3a2f
Small upate
garth-wells Jan 26, 2026
96a2c24
Small update
garth-wells Jan 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/demo/custom_kernel/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ double assemble_matrix0(std::shared_ptr<const fem::FunctionSpace<T>> V,
auto sp = la::SparsityPattern(
V->mesh()->comm(), {dofmap->index_map, dofmap->index_map},
{dofmap->index_map_bs(), dofmap->index_map_bs()});
fem::sparsitybuild::cells(sp, {cells, cells}, {*dofmap, *dofmap});
fem::sparsitybuild::cells(sp, std::pair{cells, cells}, {*dofmap, *dofmap});
sp.finalize();
la::MatrixCSR<T> A(sp);
common::Timer timer("Assembler0 std::function (matrix)");
Expand Down Expand Up @@ -134,7 +134,7 @@ double assemble_matrix1(const mesh::Geometry<T>& g, const fem::DofMap& dofmap,
auto sp = la::SparsityPattern(dofmap.index_map->comm(),
{dofmap.index_map, dofmap.index_map},
{dofmap.index_map_bs(), dofmap.index_map_bs()});
fem::sparsitybuild::cells(sp, {cells, cells}, {dofmap, dofmap});
fem::sparsitybuild::cells(sp, std::pair{cells, cells}, {dofmap, dofmap});
sp.finalize();
la::MatrixCSR<T> A(sp);
auto ident = [](auto, auto, auto, auto) {}; // DOF permutation not required
Expand Down
8 changes: 4 additions & 4 deletions cpp/demo/interpolation_different_meshes/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <dolfinx/io/ADIOS2Writers.h>
#include <dolfinx/mesh/generation.h>
#include <memory>
#include <ranges>

using namespace dolfinx;
using T = double;
Expand Down Expand Up @@ -72,14 +73,13 @@ int main(int argc, char* argv[])
auto cell_map
= mesh_hex->topology()->index_map(mesh_hex->topology()->dim());
assert(cell_map);
std::vector<std::int32_t> cells(
cell_map->size_local() + cell_map->num_ghosts(), 0);
std::iota(cells.begin(), cells.end(), 0);
auto cells = std::ranges::views::iota(0, cell_map->size_local()
+ cell_map->num_ghosts());
geometry::PointOwnershipData<T> interpolation_data
= fem::create_interpolation_data(
u_hex->function_space()->mesh()->geometry(),
*u_hex->function_space()->element(),
*u_tet->function_space()->mesh(), std::span(cells), 1e-8);
*u_tet->function_space()->mesh(), cells, 1e-8);
u_hex->interpolate(*u_tet, cells, interpolation_data);

#ifdef HAS_ADIOS2
Expand Down
2 changes: 2 additions & 0 deletions cpp/dolfinx/common/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ struct scalar_value
/// @internal
typedef T type;
};

/// @private
template <scalar T>
struct scalar_value<T, std::void_t<typename T::value_type>>
{
typedef typename T::value_type type;
};

/// @private Convenience typedef
template <scalar T>
using scalar_value_t = typename scalar_value<T>::type;
Expand Down
1 change: 1 addition & 0 deletions cpp/dolfinx/fem/ElementDofLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <cassert>
#include <functional>
#include <numeric>
#include <span>
#include <stdexcept>

using namespace dolfinx;
Expand Down
2 changes: 1 addition & 1 deletion cpp/dolfinx/fem/FiniteElement.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class FiniteElement
///
/// This constructs a mixed element \f$E_0 \times E_1 \times \ldots
/// \times E_{n-1}\f$. The *i*th sub-element \f$E_i\f$ can be accessed
/// by ::extract_sub_element. Functions defined on mixed element
/// by ::extract_sub_element. Function%s defined on mixed element
/// spaces cannot be interpolated into directly. It is necessary to
/// first extract a sub-Function (view), which can then be
/// interpolated into.
Expand Down
2 changes: 1 addition & 1 deletion cpp/dolfinx/fem/Form.h
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ class Form
/// @brief Coefficient function mesh integration entity indices.
///
/// This method is equivalent to ::domain_arg, but returns mesh entity
/// indices for coefficient \link Function Functions. \endlink
/// indices for coefficient Function%s.
///
/// @param[in] type Integral type.
/// @param[in] idx Integral identifier.
Expand Down
Loading
Loading