PointBatch< dim_, NT, n_fe, Extractors, Variables, with_derivatives, with_hessians > Class Template Reference#
|
DiFfRG
Discretization Framework for functional Renormalization Group flows
|
The solution at a set of points: values and (if gathered) derivatives and hessians of every FE function, plus position and cell width of each point. Extractors and variables are shared by all points. More...
#include <batch.hh>
Public Types | |
| using | number_type = NT |
| double, or an AD type when the jacobian is computed. | |
| using | extractors_type = Extractors |
| template<typename NT2 > | |
| using | rebind |
| The same batch in another number type, e.g. for AD. | |
| using | State = internal::PointState<dim, NT, n_fe> |
| The copy of one point that the per-point callbacks see, see tie(). | |
Public Member Functions | |
| void | reinit (const size_t n_points) |
Assembler side: resize to n_points points. | |
| void | set_shared (const Extractors &extractors, const Variables &variables) |
| Assembler side: point the batch to the extractors and variables, which must outlive its use. | |
| void | clear_shared () |
| Forget the shared extractors and variables, e.g. when the call that owns them returns. | |
| size_t | size () const |
| Number of points. | |
| PointSpan< const NT > | values (const size_t c) const |
Values \(u_c\) of FE function c at all points. | |
| PointSpan< const NT > | derivatives (const size_t c, const size_t d) const |
\(\partial_d u_c\) at all points; only if has_derivatives. | |
| PointSpan< const NT > | hessians (const size_t c, const size_t d1, const size_t d2) const |
\(\partial_{d_1}\partial_{d_2} u_c\) at all points; only if has_hessians. | |
| PointSpan< const double > | coordinates (const size_t d) const |
Coordinate d of all points. | |
| dealii::Point< dim > | x (const size_t i) const |
Position of point i. | |
| double | cell_width (const size_t i) const |
Width of the cell containing point i. | |
| const Extractors & | extractors () const |
| The extractors \(e_b\), the same for all points. | |
| const Variables & | variables () const |
| The variables \(v_a\), the same for all points. | |
| void | load (const size_t i, State &s) const |
| Point i as a State; only the gathered inputs are loaded. | |
| auto | tie (State &s) const |
| The named tuple the per-point callbacks receive for a loaded State; see batch_tie. | |
| template<typename Src > | |
| void | copy_point (const size_t j, const Src &src, const size_t i) |
Point j of this batch = point i of src, which has the same inputs but may differ in number type. | |
| NT & | value (const size_t c, const size_t i) |
| NT & | derivative (const size_t c, const size_t d, const size_t i) |
| NT & | hessian (const size_t c, const size_t d1, const size_t d2, const size_t i) |
| double & | coordinate (const size_t d, const size_t i) |
| double & | width (const size_t i) |
Static Public Attributes | |
| static constexpr int | dim = dim_ |
| Dimension of the field space. | |
| static constexpr size_t | n_fe_functions = n_fe |
| Number of FE functions (columns per input kind). | |
| static constexpr bool | has_derivatives = with_derivatives |
| Whether derivatives() is available. | |
| static constexpr bool | has_hessians = with_hessians |
| Whether hessians() is available. | |
| static constexpr uint | extractor_index = 1 + with_derivatives + with_hessians |
| Where tie() puts the extractors, i.e. the tuple index of the per-point extractor jacobians. | |
Protected Member Functions | |
| const NT * | column (const size_t col) const |
| NT * | column (const size_t col) |
Detailed Description
class DiFfRG::PointBatch< dim_, NT, n_fe, Extractors, Variables, with_derivatives, with_hessians >
The solution at a set of points: values and (if gathered) derivatives and hessians of every FE function, plus position and cell width of each point. Extractors and variables are shared by all points.
Columns are contiguous over the points (see batch.hh); the order of the points carries no meaning.
- Template Parameters
-
with_derivatives,with_hessians which inputs the assembler gathers. CG and DG gather what the model's batch_reads_derivatives/batch_reads_hessiansask for, KT always derivatives and hessians only withsource_uses_hessians. Reading one that is not gathered does not compile; a model used with several assemblers testsif constexpr (Batch::has_derivatives).
Member Typedef Documentation
◆ extractors_type
| using extractors_type = Extractors |
◆ number_type
| using number_type = NT |
double, or an AD type when the jacobian is computed.
◆ rebind
| using rebind |
The same batch in another number type, e.g. for AD.
◆ State
| using State = internal::PointState<dim, NT, n_fe> |
The copy of one point that the per-point callbacks see, see tie().
Member Function Documentation
◆ cell_width()
|
inline |
Width of the cell containing point i.
◆ clear_shared()
|
inline |
Forget the shared extractors and variables, e.g. when the call that owns them returns.
◆ column() [1/2]
|
inlineprotected |
◆ column() [2/2]
|
inlineprotected |
◆ coordinate()
|
inline |
◆ coordinates()
|
inline |
Coordinate d of all points.
◆ copy_point()
|
inline |
Point j of this batch = point i of src, which has the same inputs but may differ in number type.
◆ derivative()
|
inline |
◆ derivatives()
|
inline |
\(\partial_d u_c\) at all points; only if has_derivatives.
◆ extractors()
|
inline |
The extractors \(e_b\), the same for all points.
◆ hessian()
|
inline |
◆ hessians()
|
inline |
\(\partial_{d_1}\partial_{d_2} u_c\) at all points; only if has_hessians.
◆ load()
|
inline |
Point i as a State; only the gathered inputs are loaded.
◆ reinit()
|
inline |
Assembler side: resize to n_points points.
◆ set_shared()
|
inline |
Assembler side: point the batch to the extractors and variables, which must outlive its use.
◆ size()
|
inline |
Number of points.
◆ tie()
|
inline |
The named tuple the per-point callbacks receive for a loaded State; see batch_tie.
◆ value()
|
inline |
◆ values()
|
inline |
Values \(u_c\) of FE function c at all points.
◆ variables()
|
inline |
The variables \(v_a\), the same for all points.
◆ width()
|
inline |
◆ x()
|
inline |
Position of point i.
Member Data Documentation
◆ dim
|
staticconstexpr |
Dimension of the field space.
◆ extractor_index
|
staticconstexpr |
Where tie() puts the extractors, i.e. the tuple index of the per-point extractor jacobians.
◆ has_derivatives
|
staticconstexpr |
Whether derivatives() is available.
◆ has_hessians
|
staticconstexpr |
Whether hessians() is available.
◆ n_fe_functions
|
staticconstexpr |
Number of FE functions (columns per input kind).
The documentation for this class was generated from the following file:
- /home/runner/work/DiFfRG/DiFfRG/DiFfRG/include/DiFfRG/model/batch.hh
Generated by