Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify assembler implementation interfaces #3649

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 6 additions & 7 deletions cpp/demo/custom_kernel/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,9 @@ double assemble_matrix1(const mesh::Geometry<T>& g, const fem::DofMap& dofmap,
la::MatrixCSR<T> A(sp);
auto ident = [](auto, auto, auto, auto) {}; // DOF permutation not required
common::Timer timer("Assembler1 lambda (matrix)");
fem::impl::assemble_cells(A.mat_add_values(), g.dofmap(), g.x(), cells,
{dofmap.map(), 1, cells}, ident,
{dofmap.map(), 1, cells}, ident, {}, {}, kernel,
std::span<const T>(), 0, {}, {}, {});
fem::impl::assemble_cells<T>(
A.mat_add_values(), g.dofmap(), g.x(), cells, {dofmap.map(), 1, cells},
ident, {dofmap.map(), 1, cells}, ident, {}, {}, kernel, {}, {}, {}, {});
A.scatter_rev();
return A.squared_norm();
}
Expand All @@ -165,9 +164,9 @@ double assemble_vector1(const mesh::Geometry<T>& g, const fem::DofMap& dofmap,
{
la::Vector<T> b(dofmap.index_map, 1);
common::Timer timer("Assembler1 lambda (vector)");
fem::impl::assemble_cells<T, 1>(
[](auto, auto, auto, auto) {}, b.mutable_array(), g.dofmap(), g.x(),
cells, {dofmap.map(), 1, cells}, kernel, {}, {}, 0, {});
fem::impl::assemble_cells<T, 1>([](auto, auto, auto, auto) {},
b.mutable_array(), g.dofmap(), g.x(), cells,
{dofmap.map(), 1, cells}, kernel, {}, {}, {});
b.scatter_rev(std::plus<T>());
return la::squared_norm(b);
}
Expand Down
Loading
Loading