Vulpes  0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
Loading...
Searching...
No Matches
fe_expr_unary.hpp
Go to the documentation of this file.
1// ----------------------------------------------------------------------
2//
3// Copyright (C) 2024 - 2026 by the Vulpes authors.
4// This file is part of Vulpes.
5//
6// Vulpes is free software; you can redistribute it and/or modify
7// it under the terms of the GNU General Public License as published by
8// the Free Software Foundation, either version 3 of the License, or
9// (at your option) any later version.
10//
11// Vulpes is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// General Public License for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with Vulpes. If not, see <http://www.gnu.org/licenses/>.
18//
19// ----------------------------------------------------------------------
20
21// Author: Matteo Caldana <matteo.caldana@polimi.it>
22// Author: Nicola De March <nicola.demarch@polimi.it>
23// Author: Pedro Peixoto <ppeixoto@usp.br>
24
25#ifndef VULPES_FE_FE_EXPRESSIONS_FE_EXPR_UNARY_HPP_
26#define VULPES_FE_FE_EXPRESSIONS_FE_EXPR_UNARY_HPP_
27
28#include <type_traits>
29#include <utility>
30#include <vector>
31
34
35namespace vulpes {
36namespace fe {
37
38template <std::size_t Dim, typename E>
40 : public FeExpressionBase<Dim, FeExpressionUnaryMinus<Dim, E>> {
41 public:
42 static constexpr bool is_leaf = false;
43 static constexpr uint8_t is_bilinear = E::is_bilinear;
44
45 explicit constexpr FeExpressionUnaryMinus(const E& expr) : m_expr(expr) {};
46
47 template <std::size_t J = 0, std::size_t I = 0>
48 decltype(auto) evaluate(
49 const FeValues<Dim>& fe_values,
50 std::size_t j,
51 std::size_t i,
52 std::size_t q) const {
53 using TypeEval =
54 decltype(m_expr.template evaluate<J, I>(fe_values, j, i, q));
55 if constexpr (std::is_same_v<TypeEval, void>) {
56 return void();
57 } else {
58 return -m_expr.template evaluate<J, I>(fe_values, j, i, q);
59 }
60 }
61
63 return m_expr.computeUpdateFlags();
64 }
65 constexpr std::size_t computeOrder() const { return m_expr.computeOrder(); }
66
67 decltype(auto) evaluatePoly(
68 const FeValues<Dim>& fe_values,
69 std::size_t j,
70 std::size_t i,
71 std::size_t bi,
72 std::size_t bj) const {
73 return m_expr.evaluatePoly(fe_values, j, i, bi, bj);
74 }
75 decltype(auto) evaluatePolyCoef(
76 const auto& mapping,
77 const auto& fe_values,
78 std::size_t bi,
79 std::size_t bj) const {
80 using MatType = std::decay_t<decltype(m_expr.evaluatePolyCoef(
81 mapping, fe_values, bi, bj))>;
82 return MatType{-m_expr.evaluatePolyCoef(mapping, fe_values, bi, bj)};
83 }
84 constexpr bool precompute(
85 const FeValues<Dim>& fe_values, const CellsType<Dim>& cells) const {
86 return m_expr.precompute(fe_values, cells);
87 }
88
89 protected:
90 typename std::conditional_t<E::is_leaf, const E&, const E> m_expr;
91};
92
94
131template <std::size_t Dim, typename E>
133 : public FeExpressionBase<Dim, FeExpressionFieldComponent<Dim, E>> {
134 private:
135 template <typename T, typename = void>
136 struct FsTypeOf {
137 using type = void;
138 };
139 template <typename T>
140 struct FsTypeOf<T, std::void_t<typename T::FeSpaceType>> {
141 using type = typename T::FeSpaceType;
142 };
143
144 public:
145 using OutputType = double;
147 static constexpr bool is_leaf = false;
148 static constexpr uint8_t is_bilinear = E::is_bilinear;
149 // Forward the block range of E unchanged: selecting a field block does not
150 // change which test/trial fields the expression spans, so nblocks (the
151 // number of rhs integrator iterations) stays equal to E's.
152 static constexpr std::size_t k_index_begin = E::k_index_begin;
153 static constexpr std::size_t k_index_end = E::k_index_end;
154
155 explicit constexpr FeExpressionFieldComponent(const E& expr)
156 : m_expr(expr) {};
157
158 // Forward feSpace() when E is a test/trial expression (has feSpace()).
159 // SFINAE excludes this for IsNothing expressions (no feSpace() on E).
160 template <
161 typename U = E,
162 typename = std::void_t<decltype(std::declval<const U&>().feSpace())>>
163 constexpr decltype(auto) feSpace() const {
164 return m_expr.feSpace();
165 }
166
167 template <std::size_t J = 0, std::size_t I = 0>
168 decltype(auto) evaluate(
169 const FeValues<Dim>& fe_values,
170 std::size_t j,
171 std::size_t i,
172 std::size_t q) const {
173 // Two-index Eigen access (row, col): the test/trial value is an
174 // EigenVulpes::OneComponentVector with a compile-time active index and no
175 // LinearAccessBit, so single-index operator[] is ill-formed. (row, 0) also
176 // works for plain Eigen column vectors, so this stays general over E.
177 if constexpr (is_bilinear == IsBilinear) {
178 return m_expr.template evaluate<J, I>(fe_values, j, i, q)(J, I);
179 } else if constexpr (is_bilinear == IsLinearTest) {
180 return m_expr.template evaluate<J, I>(fe_values, j, i, q)(I, 0);
181 } else if constexpr (is_bilinear == IsLinearTrial) {
182 return m_expr.template evaluate<J, I>(fe_values, j, i, q)(J, 0);
183 } else {
184 static_assert(
185 Dim * 0 &&
186 "fe::field_component requires a test/trial expression (IsLinearTest, "
187 "IsLinearTrial, or IsBilinear). For spatial component extraction "
188 "from "
189 "a coefficient use fe::spatial_component<K>.");
190 }
191 }
192
194 return m_expr.computeUpdateFlags();
195 }
196 constexpr std::size_t computeOrder() const { return m_expr.computeOrder(); }
197
198 constexpr bool precompute(
199 const FeValues<Dim>& fe_values, const CellsType<Dim>& cells) const {
200 return m_expr.precompute(fe_values, cells);
201 }
202
203 protected:
204 typename std::conditional_t<E::is_leaf, const E&, const E> m_expr;
205};
206
208
238template <std::size_t K, std::size_t Dim, typename E>
241 private:
242 template <typename T, typename = void>
243 struct FsTypeOf {
244 using type = void;
245 };
246 template <typename T>
247 struct FsTypeOf<T, std::void_t<typename T::FeSpaceType>> {
248 using type = typename T::FeSpaceType;
249 };
250
251 public:
252 using OutputType = double;
254 static constexpr bool is_leaf = false;
255 static constexpr uint8_t is_bilinear = E::is_bilinear;
256 // Forward the block range of E unchanged: extracting a spatial direction
257 // does not move the expression to a different test/trial field block.
258 static constexpr std::size_t k_index_begin = E::k_index_begin;
259 static constexpr std::size_t k_index_end = E::k_index_end;
260
261 explicit constexpr FeExpressionSpatialComponent(const E& expr)
262 : m_expr(expr) {}
263
264 // Forward feSpace() when E is a test/trial expression (has feSpace()).
265 // SFINAE excludes this for IsNothing expressions (no feSpace() on E).
266 template <
267 typename U = E,
268 typename = std::void_t<decltype(std::declval<const U&>().feSpace())>>
269 constexpr decltype(auto) feSpace() const {
270 return m_expr.feSpace();
271 }
272
273 template <std::size_t J = 0, std::size_t I = 0>
274 decltype(auto) evaluate(
275 const FeValues<Dim>& fe_values,
276 std::size_t j,
277 std::size_t i,
278 std::size_t q) const {
279 using EvalType =
280 decltype(m_expr.template evaluate<J, I>(fe_values, j, i, q));
281 if constexpr (std::is_same_v<EvalType, void>) {
282 return void();
283 } else {
284 return m_expr.template evaluate<J, I>(fe_values, j, i, q)[K];
285 }
286 }
287
289 return m_expr.computeUpdateFlags();
290 }
291 constexpr std::size_t computeOrder() const { return m_expr.computeOrder(); }
292 constexpr bool precompute(
293 const FeValues<Dim>& fe_values, const CellsType<Dim>& cells) const {
294 return m_expr.precompute(fe_values, cells);
295 }
296
297 protected:
298 std::conditional_t<E::is_leaf, const E&, const E> m_expr;
299};
300
312template <std::size_t K, std::size_t Dim, typename E>
317
331template <std::size_t Dim, typename E>
336
338
339template <std::size_t Dim, typename E>
342 public:
343 static constexpr bool is_leaf = false;
344 static constexpr uint8_t is_bilinear = E::is_bilinear;
345 using FeSpaceType = typename E::FeSpaceType;
346 using PolynomialType = E::PolynomialType;
347 static constexpr std::size_t k_index_begin = E::k_index_begin;
348 static constexpr std::size_t k_index_end = E::k_index_end;
349
350 explicit constexpr FeExpressionDiagOnly(const E& expr) : m_expr(expr) {};
351
352 constexpr const auto& feSpace() const { return m_expr.feSpace(); }
353
354 template <std::size_t J = 0, std::size_t I = 0>
355 decltype(auto) evaluate(
356 const FeValues<Dim>& fe_values,
357 std::size_t j,
358 std::size_t i,
359 std::size_t q) const {
360 if constexpr (I == J) {
361 return m_expr.template evaluate<J, I>(fe_values, j, i, q);
362 } else {
363 return 0.0;
364 }
365 }
366
368 return m_expr.computeUpdateFlags();
369 }
370 constexpr std::size_t computeOrder() const { return m_expr.computeOrder(); }
371
372 decltype(auto) evaluatePoly(
373 const FeValues<Dim>& fe_values,
374 std::size_t j,
375 std::size_t i,
376 std::size_t bi,
377 std::size_t bj) const {
378 return m_expr.evaluatePoly(fe_values, j, i, bi, bj);
379 }
380 decltype(auto) evaluatePolyCoef(
381 const auto& mapping,
382 const auto& fe_values,
383 std::size_t bi,
384 std::size_t bj) const {
385 return m_expr.evaluatePolyCoef(mapping, fe_values, bi, bj);
386 }
387 constexpr bool precompute(
388 const FeValues<Dim>& fe_values, const CellsType<Dim>& cells) const {
389 return m_expr.precompute(fe_values, cells);
390 }
391
392 protected:
393 typename std::conditional_t<E::is_leaf, const E&, const E> m_expr;
394};
395
396template <std::size_t Dim, typename E>
400
401template <std::size_t Dim, typename E>
402class FeExpressionAbs : public FeExpressionBase<Dim, FeExpressionAbs<Dim, E>> {
403 public:
404 static constexpr bool is_leaf = false;
405 static constexpr uint8_t is_bilinear = IsNothing;
406
407 explicit FeExpressionAbs(E const& e) : m_e(e) {}
408
409 template <std::size_t J = 0, std::size_t I = 0>
410 decltype(auto) evaluate(
411 const FeValues<Dim>& fe_values,
412 std::size_t j,
413 std::size_t i,
414 std::size_t q) const {
415 using RetType = decltype(m_e.template evaluate<J, I>(fe_values, j, i, q));
416 if constexpr (std::is_same_v<RetType, void>) {
417 return void();
418 } else {
419 return std::abs(m_e.template evaluate<J, I>(fe_values, j, i, q));
420 }
421 }
422
423 decltype(auto) evaluatePoly(
424 const FeValues<Dim>& fe_values,
425 std::size_t j,
426 std::size_t i,
427 std::size_t bi,
428 std::size_t bj) const {
429 return m_e.evaluatePoly(fe_values, j, i, bi, bj);
430 }
431
432 decltype(auto) evaluatePolyCoef(
433 const auto& mapping,
434 const auto& fe_values,
435 std::size_t bi,
436 std::size_t bj) const {
437 // |p| is not a polynomial: abs is applied only at the quadrature points
438 static const bool warned = [] {
439 pcout << "Warning: abs is ignored by the qfree integrators, it is "
440 "applied only at the quadrature points"
441 << std::endl;
442 return true;
443 }();
444 (void)warned;
445 return m_e.evaluatePolyCoef(mapping, fe_values, bi, bj);
446 }
447
448 constexpr std::size_t computeOrder() const { return m_e.computeOrder(); }
449
451 return m_e.computeUpdateFlags();
452 }
453
454 constexpr bool precompute(
455 const FeValues<Dim>& fe_values, const CellsType<Dim>& cells) const {
456 return m_e.precompute(fe_values, cells);
457 }
458
459 private:
460 std::conditional_t<E::is_leaf, const E&, const E> m_e;
461};
462
463// Free function, same style as inner(u, v)
464template <std::size_t Dim, typename E>
466 return FeExpressionAbs<Dim, E>(*static_cast<const E*>(&e));
467}
468
470
481template <std::size_t Dim, typename E>
483 : public FeExpressionBase<Dim, FeExpressionQptsCache<Dim, E>> {
484 static_assert(
485 E::is_bilinear == IsNothing,
486 "fe::cached requires a coefficient expression (no test or trial "
487 "function)");
488
489 public:
490 static constexpr bool is_leaf = false;
491 static constexpr uint8_t is_bilinear = IsNothing;
492 using EvalType = std::decay_t<decltype(std::declval<const E&>().evaluate(
493 std::declval<const FeValues<Dim>&>(), 0, 0, 0))>;
494 // plain storage type of the value (evaluated Eigen expression, or scalar)
495 using OutputType = typename decltype([] {
496 if constexpr (std::is_arithmetic_v<EvalType>) {
497 return std::type_identity<EvalType>{};
498 } else {
499 return std::type_identity<
500 std::decay_t<decltype(std::declval<EvalType>().eval())>>{};
501 }
502 }())::type;
503
504 explicit FeExpressionQptsCache(const E& expr) : m_expr(expr) {}
505
506 template <std::size_t J = 0, std::size_t I = 0>
508 const FeValues<Dim>&, std::size_t, std::size_t, std::size_t q) const {
509 return m_values[q];
510 }
511
513 return m_expr.computeUpdateFlags();
514 }
515 constexpr std::size_t computeOrder() const { return m_expr.computeOrder(); }
516
517 decltype(auto) evaluatePoly(
518 const FeValues<Dim>& fe_values,
519 std::size_t j,
520 std::size_t i,
521 std::size_t bi,
522 std::size_t bj) const {
523 return m_expr.evaluatePoly(fe_values, j, i, bi, bj);
524 }
525 decltype(auto) evaluatePolyCoef(
526 const auto& mapping,
527 const auto& fe_values,
528 std::size_t bi,
529 std::size_t bj) const {
530 return m_expr.evaluatePolyCoef(mapping, fe_values, bi, bj);
531 }
533 const FeValues<Dim>& fe_values, const CellsType<Dim>& cells) const {
534 if (!m_expr.precompute(fe_values, cells)) {
535 return false;
536 }
537 const std::size_t nq = fe_values.weights().size();
538 m_values.resize(nq);
539 for (std::size_t q = 0; q < nq; ++q) {
540 m_values[q] = m_expr.evaluate(fe_values, 0, 0, q);
541 }
542 return true;
543 }
544
545 protected:
546 typename std::conditional_t<E::is_leaf, const E&, const E> m_expr;
547 mutable std::vector<OutputType> m_values;
548};
549
554template <std::size_t Dim, typename E>
558
559} // namespace fe
560} // namespace vulpes
561
562#endif // VULPES_FE_FE_EXPRESSIONS_FE_EXPR_UNARY_HPP_
Definition fe_expr_unary.hpp:402
std::conditional_t< E::is_leaf, const E &, const E > m_e
Definition fe_expr_unary.hpp:460
constexpr std::size_t computeOrder() const
Definition fe_expr_unary.hpp:448
static constexpr uint8_t is_bilinear
Definition fe_expr_unary.hpp:405
decltype(auto) evaluatePolyCoef(const auto &mapping, const auto &fe_values, std::size_t bi, std::size_t bj) const
Definition fe_expr_unary.hpp:432
constexpr UpdateFlagsType computeUpdateFlags() const
Definition fe_expr_unary.hpp:450
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
Definition fe_expr_unary.hpp:423
decltype(auto) evaluate(const FeValues< Dim > &fe_values, std::size_t j, std::size_t i, std::size_t q) const
Definition fe_expr_unary.hpp:410
static constexpr bool is_leaf
Definition fe_expr_unary.hpp:404
constexpr bool precompute(const FeValues< Dim > &fe_values, const CellsType< Dim > &cells) const
Definition fe_expr_unary.hpp:454
FeExpressionAbs(E const &e)
Definition fe_expr_unary.hpp:407
Base class for Finite Element Expressions.
Definition fe_expr_base.hpp:210
Definition fe_expr_unary.hpp:341
static constexpr uint8_t is_bilinear
Definition fe_expr_unary.hpp:344
constexpr UpdateFlagsType computeUpdateFlags() const
Definition fe_expr_unary.hpp:367
static constexpr std::size_t k_index_begin
Definition fe_expr_unary.hpp:347
constexpr FeExpressionDiagOnly(const E &expr)
Definition fe_expr_unary.hpp:350
constexpr bool precompute(const FeValues< Dim > &fe_values, const CellsType< Dim > &cells) const
Definition fe_expr_unary.hpp:387
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
Definition fe_expr_unary.hpp:372
decltype(auto) evaluate(const FeValues< Dim > &fe_values, std::size_t j, std::size_t i, std::size_t q) const
Definition fe_expr_unary.hpp:355
typename E::FeSpaceType FeSpaceType
Definition fe_expr_unary.hpp:345
std::conditional_t< E::is_leaf, const E &, const E > m_expr
Definition fe_expr_unary.hpp:393
constexpr std::size_t computeOrder() const
Definition fe_expr_unary.hpp:370
static constexpr std::size_t k_index_end
Definition fe_expr_unary.hpp:348
static constexpr bool is_leaf
Definition fe_expr_unary.hpp:343
constexpr const auto & feSpace() const
Definition fe_expr_unary.hpp:352
decltype(auto) evaluatePolyCoef(const auto &mapping, const auto &fe_values, std::size_t bi, std::size_t bj) const
Definition fe_expr_unary.hpp:380
E::PolynomialType PolynomialType
Definition fe_expr_unary.hpp:346
Extract the field (block) component of a multi-component test/trial expression driven by the integrat...
Definition fe_expr_unary.hpp:133
constexpr UpdateFlagsType computeUpdateFlags() const
Definition fe_expr_unary.hpp:193
static constexpr bool is_leaf
Definition fe_expr_unary.hpp:147
static constexpr std::size_t k_index_begin
Definition fe_expr_unary.hpp:152
static constexpr std::size_t k_index_end
Definition fe_expr_unary.hpp:153
std::conditional_t< E::is_leaf, const E &, const E > m_expr
Definition fe_expr_unary.hpp:204
constexpr bool precompute(const FeValues< Dim > &fe_values, const CellsType< Dim > &cells) const
Definition fe_expr_unary.hpp:198
constexpr decltype(auto) feSpace() const
Definition fe_expr_unary.hpp:163
static constexpr uint8_t is_bilinear
Definition fe_expr_unary.hpp:148
typename FsTypeOf< E >::type FeSpaceType
Definition fe_expr_unary.hpp:146
double OutputType
Definition fe_expr_unary.hpp:145
constexpr FeExpressionFieldComponent(const E &expr)
Definition fe_expr_unary.hpp:155
decltype(auto) evaluate(const FeValues< Dim > &fe_values, std::size_t j, std::size_t i, std::size_t q) const
Definition fe_expr_unary.hpp:168
constexpr std::size_t computeOrder() const
Definition fe_expr_unary.hpp:196
Values of a coefficient expression (no test or trial function) stored at the quadrature points by pre...
Definition fe_expr_unary.hpp:483
bool precompute(const FeValues< Dim > &fe_values, const CellsType< Dim > &cells) const
Definition fe_expr_unary.hpp:532
static constexpr bool is_leaf
Definition fe_expr_unary.hpp:490
const OutputType & evaluate(const FeValues< Dim > &, std::size_t, std::size_t, std::size_t q) const
Definition fe_expr_unary.hpp:507
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
Definition fe_expr_unary.hpp:517
FeExpressionQptsCache(const E &expr)
Definition fe_expr_unary.hpp:504
static constexpr uint8_t is_bilinear
Definition fe_expr_unary.hpp:491
std::vector< OutputType > m_values
Definition fe_expr_unary.hpp:547
constexpr UpdateFlagsType computeUpdateFlags() const
Definition fe_expr_unary.hpp:512
typename decltype([] { if constexpr(std::is_arithmetic_v< EvalType >) { return std::type_identity< EvalType >{}; } else { return std::type_identity< std::decay_t< decltype(std::declval< EvalType >().eval())> >{}; } }())::type OutputType
Definition fe_expr_unary.hpp:495
constexpr std::size_t computeOrder() const
Definition fe_expr_unary.hpp:515
decltype(auto) evaluatePolyCoef(const auto &mapping, const auto &fe_values, std::size_t bi, std::size_t bj) const
Definition fe_expr_unary.hpp:525
std::decay_t< decltype(std::declval< const E & >().evaluate( std::declval< const FeValues< Dim > & >(), 0, 0, 0))> EvalType
Definition fe_expr_unary.hpp:492
std::conditional_t< E::is_leaf, const E &, const E > m_expr
Definition fe_expr_unary.hpp:546
Extract a single scalar spatial component at compile-time index K from a vector-output FE expression.
Definition fe_expr_unary.hpp:240
static constexpr uint8_t is_bilinear
Definition fe_expr_unary.hpp:255
decltype(auto) evaluate(const FeValues< Dim > &fe_values, std::size_t j, std::size_t i, std::size_t q) const
Definition fe_expr_unary.hpp:274
constexpr UpdateFlagsType computeUpdateFlags() const
Definition fe_expr_unary.hpp:288
constexpr std::size_t computeOrder() const
Definition fe_expr_unary.hpp:291
static constexpr bool is_leaf
Definition fe_expr_unary.hpp:254
double OutputType
Definition fe_expr_unary.hpp:252
static constexpr std::size_t k_index_end
Definition fe_expr_unary.hpp:259
std::conditional_t< E::is_leaf, const E &, const E > m_expr
Definition fe_expr_unary.hpp:298
constexpr bool precompute(const FeValues< Dim > &fe_values, const CellsType< Dim > &cells) const
Definition fe_expr_unary.hpp:292
static constexpr std::size_t k_index_begin
Definition fe_expr_unary.hpp:258
constexpr FeExpressionSpatialComponent(const E &expr)
Definition fe_expr_unary.hpp:261
constexpr decltype(auto) feSpace() const
Definition fe_expr_unary.hpp:269
typename FsTypeOf< E >::type FeSpaceType
Definition fe_expr_unary.hpp:253
decltype(auto) evaluate(const FeValues< Dim > &fe_values, std::size_t j, std::size_t i, std::size_t q) const
Definition fe_expr_unary.hpp:48
constexpr std::size_t computeOrder() const
Definition fe_expr_unary.hpp:65
constexpr FeExpressionUnaryMinus(const E &expr)
Definition fe_expr_unary.hpp:45
static constexpr bool is_leaf
Definition fe_expr_unary.hpp:42
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
Definition fe_expr_unary.hpp:67
std::conditional_t< E::is_leaf, const E &, const E > m_expr
Definition fe_expr_unary.hpp:90
constexpr UpdateFlagsType computeUpdateFlags() const
Definition fe_expr_unary.hpp:62
constexpr bool precompute(const FeValues< Dim > &fe_values, const CellsType< Dim > &cells) const
Definition fe_expr_unary.hpp:84
static constexpr uint8_t is_bilinear
Definition fe_expr_unary.hpp:43
decltype(auto) evaluatePolyCoef(const auto &mapping, const auto &fe_values, std::size_t bi, std::size_t bj) const
Definition fe_expr_unary.hpp:75
This class works as a cache table for computing efficiently the value of the basis function and its d...
Definition fe_values.hpp:94
constexpr const auto & weights() const
Definition fe_values.hpp:105
Definition dof_policy.hpp:45
FeExpressionDiagOnly< Dim, E > ondiag(const E &w)
Definition fe_expr_unary.hpp:397
std::underlying_type_t< UpdateFlags > UpdateFlagsType
Definition fe_values.hpp:65
std::vector< std::unique_ptr< CellType< Dim > > > CellsType
Definition fe_expr_base.hpp:44
FeExpressionSpatialComponent< K, Dim, E > spatial_component(const FeExpressionBase< Dim, E > &e)
Extract the K-th scalar spatial component of a vector-output FE expression at every quadrature point.
Definition fe_expr_unary.hpp:313
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
FeExpressionAbs< Dim, E > abs(const FeExpressionBase< Dim, E > &e)
Definition fe_expr_unary.hpp:465
@ IsLinearTest
Definition fe_expr_base.hpp:53
@ IsNothing
Definition fe_expr_base.hpp:52
@ IsLinearTrial
Definition fe_expr_base.hpp:54
@ IsBilinear
Definition fe_expr_base.hpp:55
FeExpressionQptsCache< Dim, E > cached(const FeExpressionBase< Dim, E > &e)
Coefficient expression evaluated once per quadrature point (see FeExpressionQptsCache).
Definition fe_expr_unary.hpp:555
Definition cell_manager.hpp:38
vulpes::utils::pcout_t & pcout
Definition pcout.hpp:160
Definition fe_expr_unary.hpp:136
void type
Definition fe_expr_unary.hpp:137
void type
Definition fe_expr_unary.hpp:244