Note for now much of the docs is LLM written. This was done to save time and focus on code development. The docs have been LOOSLEY reviewed. However, the code itself has been either fully written by hand or fully reviewed. Therefore, the docs should at the moment be seen as a loose resource rather than authoratiative (and this is on top of the general ability for docs to drift)
150 lines
5.0 KiB
Groff
150 lines
5.0 KiB
Groff
.TH "serif::discretization::backend::mfem::CoefficientTracking" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
serif::discretization::backend::mfem::CoefficientTracking \- Track coefficient values using an owned snapshot and the identity of their binding\&.
|
|
|
|
.SH SYNOPSIS
|
|
.br
|
|
.PP
|
|
.PP
|
|
\fR#include <coefficient_tracking\&.hpp>\fP
|
|
.SS "Public Member Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "template<typename ViewT> bool \fBmatches\fP (const ::mfem::Vector &captured, const ViewT &view) const"
|
|
.br
|
|
.RI "Check whether the current coefficients equal a captured snapshot\&. "
|
|
.ti -1c
|
|
.RI "template<typename ViewT> ::mfem::Vector \fBcapture\fP (const ViewT &view)"
|
|
.br
|
|
.in -1c
|
|
.SS "Static Public Member Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "template<typename ViewT> static ::mfem::Vector \fBcapture\fP (const ViewT &view)"
|
|
.br
|
|
.RI "Copy the current coefficient values into an independent snapshot\&. "
|
|
.ti -1c
|
|
.RI "template<typename ViewT> static const void * \fBidentity\fP (const ViewT &view)"
|
|
.br
|
|
.RI "Identify the persistent binding associated with the coefficients\&. "
|
|
.in -1c
|
|
.SH "Detailed Description"
|
|
.PP
|
|
Track coefficient values using an owned snapshot and the identity of their binding\&.
|
|
|
|
A coefficient vector describes numerical values, while its binding determines how those values correspond to discretization degrees of freedom\&. Both pieces of information matter when deciding whether cached work can be reused\&.
|
|
|
|
.PP
|
|
This policy provides three operations to the dependency system:
|
|
|
|
.PP
|
|
.IP "\(bu" 2
|
|
capture copies the current coefficient values into an owned snapshot\&.
|
|
.IP "\(bu" 2
|
|
matches compares current values against a previously captured snapshot\&.
|
|
.IP "\(bu" 2
|
|
identity identifies the persistent binding associated with the values\&.
|
|
.PP
|
|
|
|
.PP
|
|
The vector's allocation is not part of its identity\&. A different vector containing equal coefficients can represent the same input when it uses the same binding\&. Conversely, equal coefficients associated with a different binding must not automatically reuse the previous calculation\&.
|
|
|
|
.PP
|
|
This policy supplies comparisons; the dependency system decides which computations must run\&.
|
|
|
|
.PP
|
|
\fBNote\fP
|
|
.RS 4
|
|
Value comparison uses floating-point equality without a tolerance\&. It does not check whether the coefficients are finite or admissible; those checks belong to input validation\&.
|
|
.RE
|
|
.PP
|
|
|
|
.SH "Member Function Documentation"
|
|
.PP
|
|
.SS "template<typename ViewT> static ::mfem::Vector serif::discretization::backend::mfem::CoefficientTracking::capture (const ViewT & view)\fR [static]\fP, \fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Copy the current coefficient values into an independent snapshot\&. Subsequent changes to the source vector do not modify the returned snapshot\&. The entire supplied vector is copied; if the view contains only selected nodal coefficients, only those selected values are captured\&.
|
|
|
|
.PP
|
|
\fBTemplate Parameters\fP
|
|
.RS 4
|
|
\fIViewT\fP View type exposing its coefficients through a values member\&.
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIview\fP View of the current coefficients\&.
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
An owned copy of the coefficient vector\&.
|
|
.RE
|
|
.PP
|
|
|
|
.SS "template<typename ViewT> ::mfem::Vector serif::discretization::backend::mfem::CoefficientTracking::capture (const ViewT & view)"
|
|
|
|
.SS "template<typename ViewT> const void * serif::discretization::backend::mfem::CoefficientTracking::identity (const ViewT & view)\fR [static]\fP, \fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Identify the persistent binding associated with the coefficients\&. The returned address identifies the binding object, rather than the temporary view or the coefficient vector's storage\&. Creating another view of the same binding therefore preserves this identity\&.
|
|
|
|
.PP
|
|
\fBTemplate Parameters\fP
|
|
.RS 4
|
|
\fIViewT\fP View type exposing its persistent binding through a binding member\&.
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIview\fP View referring to the coefficient binding\&.
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
The address of the binding object\&.
|
|
.RE
|
|
.PP
|
|
\fBPrecondition\fP
|
|
.RS 4
|
|
The binding member refers to an object whose lifetime and address remain valid while the dependency system relies on this identity\&.
|
|
.RE
|
|
.PP
|
|
|
|
.SS "template<typename ViewT> bool serif::discretization::backend::mfem::CoefficientTracking::matches (const ::mfem::Vector & captured, const ViewT & view) const\fR [nodiscard]\fP"
|
|
|
|
.PP
|
|
Check whether the current coefficients equal a captured snapshot\&. The vectors must have the same size and equal corresponding entries\&. Two empty vectors match\&. Their storage addresses do not affect the comparison\&.
|
|
|
|
.PP
|
|
This method compares values only\&. Binding identity is supplied separately by identity and checked by the dependency system\&.
|
|
|
|
.PP
|
|
\fBTemplate Parameters\fP
|
|
.RS 4
|
|
\fIViewT\fP View type exposing its coefficients through a values member\&.
|
|
.RE
|
|
.PP
|
|
\fBParameters\fP
|
|
.RS 4
|
|
\fIcaptured\fP Previously captured coefficient values\&.
|
|
.br
|
|
\fIview\fP View of the current coefficients\&.
|
|
.RE
|
|
.PP
|
|
\fBReturns\fP
|
|
.RS 4
|
|
True when the sizes and all corresponding values are equal\&.
|
|
.RE
|
|
.PP
|
|
|
|
|
|
.SH "Author"
|
|
.PP
|
|
Generated automatically by Doxygen for SERiF from the source code\&.
|