| 162 | /// @return l2 norm squared of the vector. |
| 163 | template <std::floating_point T> |
| 164 | double assemble_vector1(const mesh::Geometry<T>& g, const fem::DofMap& dofmap, |
| 165 | auto kernel, const std::vector<std::int32_t>& cells) |
| 166 | { |
| 167 | la::Vector<T> b(dofmap.index_map, 1); |
| 168 | md::mdspan<const T, md::extents<std::size_t, md::dynamic_extent, 3>> x( |
| 169 | g.x().data(), g.x().size() / 3, 3); |
| 170 | common::Timer timer("Assembler1 lambda (vector)"); |
| 171 | fem::impl::assemble_cells<1>([](auto, auto, auto, auto) {}, b.array(), |
| 172 | g.dofmaps().front(), x, cells, |
| 173 | {dofmap.map(), 1, cells}, kernel, {}, {}, {}); |
| 174 | b.scatter_rev(std::plus<T>()); |
| 175 | return la::squared_norm(b); |
| 176 | } |
| 177 | |
| 178 | /// @brief Assemble P1 mass matrix and a RHS vector using element kernel |
| 179 | /// approaches. |
nothing calls this directly
no test coverage detected