Extract the field (block) component of a multi-component test/trial expression driven by the integration loop's DOF index.
More...
|
| constexpr | FeExpressionFieldComponent (const E &expr) |
| template<typename U = E, typename = std::void_t<decltype(std::declval<const U&>().feSpace())>> |
| constexpr decltype(auto) | feSpace () const |
| template<std::size_t J = 0, std::size_t I = 0> |
| decltype(auto) | evaluate (const FeValues< Dim > &fe_values, std::size_t j, std::size_t i, std::size_t q) const |
| constexpr UpdateFlagsType | computeUpdateFlags () const |
| constexpr std::size_t | computeOrder () const |
| constexpr bool | precompute (const FeValues< Dim > &fe_values, const CellsType< Dim > &cells) const |
| decltype(auto) | evaluatePoly (const FeValues< Dim > &fe_values, std::size_t j, std::size_t i, std::size_t bi, std::size_t bj) const |
| | Compute the polynomial associated to the expression for basis i and j and block bi and bj.
|
| decltype(auto) | evaluatePolyCoef (const auto &mapping, const auto &fe_values, std::size_t bi, std::size_t bj) const |
| | Compute the coefficients of the polynomial associated to the expression for basis i and j and block bi and bj.
|
| constexpr FeExpressionUnaryMinus< Dim, FeExpressionFieldComponent< Dim, E > > | operator- () const |
| | Unary minus operator for the FE expression.
|
template<std::size_t Dim, typename E>
class vulpes::fe::FeExpressionFieldComponent< Dim, E >
Extract the field (block) component of a multi-component test/trial expression driven by the integration loop's DOF index.
For a multi-field test function whose evaluate<J,I>() returns a vector of field values, this class extracts entry [I] (test), [J] (trial), or (J,I) (bilinear). The extraction index is NOT a compile-time constant – it is the DOF block index supplied by the integrator at each test/trial DOF, so the result is automatically diagonal across fields.
This is distinct from FeExpressionSpatialComponent, which extracts a fixed compile-time spatial direction (x, y, z) from a vector-output expression.
Typical use: assemble a scalar coefficient against a single field of a multi-component test function without writing separate forms per field:
FeExpressionFieldComponent< Dim, E > field_component(const FeExpressionBase< Dim, E > &e)
Extract the block field component of a multi-component test/trial expression, driven by the integrati...
Definition fe_expr_unary.hpp:332
FeExpressionFunc< IndexBegin, IndexEnd, FeSpace::dim, FeSpace, true > TestFunction
Definition fe_expr_basis.hpp:169
Originally implemented by Matteo Caldana as FeExpressionComponentDth (commit ae371479, 2025-06-12); renamed 2026-06-10 and wired up for direct assembly 2026-06-11 by mirroring FeExpressionSpatialComponent: conditional FeSpaceType alias, feSpace() forwarding, and k_index_begin/end propagation from E. The block range is forwarded unchanged, so a vector TestFunction<FS, 0, N> keeps nblocks = N and the rhs integrator loop reaches every field block (each block I selects its own field via [I]).
- Template Parameters
-
| Dim | Spatial dimension. |
| E | Wrapped expression type (IsLinearTest, IsLinearTrial, or IsBilinear); IsNothing is not supported. |