MCPcopy Create free account
hub / github.com/FEniCS/dolfinx / b_ref

Function b_ref

cpp/demo/custom_kernel/main.cpp:56–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54/// @return RHS reference vector.
55template <typename T>
56std::array<T, 3> b_ref(mdspand_t<const T, 4> phi, std::span<const T> w)
57{
58 std::array<T, 3> b{};
59 for (std::size_t k = 0; k < phi.extent(1); ++k) // quadrature point
60 for (std::size_t i = 0; i < b.size(); ++i) // row i
61 b[i] += w[k] * phi(0, k, i, 0);
62 return b;
63}
64
65/// @brief Assemble a matrix operator using a `std::function` kernel
66/// function.

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected