| 101 | /// @return l2 norm squared of the vector. |
| 102 | template <std::floating_point T> |
| 103 | double assemble_vector0(std::shared_ptr<const fem::FunctionSpace<T>> V, |
| 104 | auto kernel, const std::vector<std::int32_t>& cells) |
| 105 | { |
| 106 | auto mesh = V->mesh(); |
| 107 | std::map integrals{ |
| 108 | std::pair{std::tuple{fem::IntegralType::cell, 0, 0}, |
| 109 | fem::integral_data<T>(kernel, cells, std::vector<int>{})}}; |
| 110 | fem::Form<T> L({V}, integrals, mesh, {}, {}, false, {}); |
| 111 | auto dofmap = V->dofmap(); |
| 112 | la::Vector<T> b(dofmap->index_map, 1); |
| 113 | common::Timer timer("Assembler0 std::function (vector)"); |
| 114 | fem::assemble_vector(b.array(), L); |
| 115 | b.scatter_rev(std::plus<T>()); |
| 116 | return la::squared_norm(b); |
| 117 | } |
| 118 | |
| 119 | /// @brief Assemble a matrix operator using a lambda kernel function. |
| 120 | /// |
nothing calls this directly
no test coverage detected