.TH "serif::discretization::blocks" 3 "Version v0.0.1a" "SERiF" \" -*- nroff -*- .ad l .nh .SH NAME serif::discretization::blocks .SH SYNOPSIS .br .PP .SS "Namespaces" .in +1c .ti -1c .RI "namespace \fBdetail\fP" .br .ti -1c .RI "namespace \fBkeys\fP" .br .in -1c .SS "Classes" .in +1c .ti -1c .RI "struct \fBbarotropic_constant\fP" .br .RI "This field holds the effective potential level on the stellar isobar\&. The level is solved together with the fixed total mass\&. The \fBbarotropic_constant\fP name is retained as an internal coordinate identity\&. In the density formulation its value is Us, the gravitational potential minus the centrifugal potential on the surface; it is not the polytropic EOS constant K\&. " .ti -1c .RI "struct \fBblock\fP" .br .RI "Base class for all block types in the discretization framework\&. " .ti -1c .RI "class \fBBlockVectorView\fP" .br .RI "Build a non-owning view of a packed layout as a span\&. " .ti -1c .RI "struct \fBdensity\fP" .br .RI "The density field used to represent the distribution of mass in the system\&. This is a scalar field that is associated with the mass density of the system\&. The density field is used to enforce the mass conservation condition in the weak form\&. " .ti -1c .RI "struct \fBdisplacement\fP" .br .RI "The displacement field is a 3 vector H1 field (C0 continuous) that is used to represent continuous nodal displacement over the entire domain\&. " .ti -1c .RI "struct \fBfield\fP" .br .RI "The field struct is a tag type that is used to identify a field in the discretization\&. It is used to group together terms that belong to the same field\&. Each field should have a unique name and a list of terms that belong to it\&. " .ti -1c .RI "struct \fBFieldDescriptor\fP" .br .RI "Runtime descriptor for a field, containing its name\&. Two FieldDescriptors are equal if they have identical names\&. " .ti -1c .RI "struct \fBframe_acceleration\fP" .br .RI "Uniform translation reaction, one global scalar per Cartesian axis, to be paired with BarycenterConstraint (for example when an external companion potential acts on the star)\&. It must vanish in a physical equilibrium\&. " .ti -1c .RI "struct \fBglobal_scalar\fP" .br .RI "A global scalar is a term that has a single value over the entire domain (think angular momentum or total mass)\&. Broadly we need to separate these from the other terms since they require different (often less enriched) information at compile time\&. " .ti -1c .RI "struct \fBgravity\fP" .br .RI "The gravity field contains the scalar potential\&. The primal formulation solves the potential and obtains its gradient by differentiation\&. " .ti -1c .RI "struct \fBresidual_block\fP" .br .RI "Final class for residual blocks with a fixed index, derived from \fBresidual_block_base\fP\&. " .ti -1c .RI "struct \fBresidual_block_base\fP" .br .RI "Base class for residual blocks, derived from block\&. " .ti -1c .RI "struct \fBrotation\fP" .br .RI "The rotational field, represented as the angular velocity term, given that we currently only model rigid rotation this is a global scalar\&. A future extension which models differential rotation will likely need to modify this to some vector field or other more complex representation of the rotation\&. " .ti -1c .RI "struct \fBSpatialTermTraits\fP" .br .RI "Helper struct representing the traits of some spatial term type, including its functional space, support, family, order, and rank\&. " .ti -1c .RI "struct \fBsurface_deformation\fP" .br .RI "The surface corollary field to the full displacement field\&. This is in some ways more general than the others in so far as it is not pointwise defined over the domain\&. Rather, it is some general field of numbers, divorced from the underlying discrimination, that is used to represent the surface deformation of the system\&. This may be used, for example to represent spherical harmonic coefficients of the surface deformation\&. For more information see the surface and deformation systems\&. " .ti -1c .RI "struct \fBSystemLayout\fP" .br .RI "Describe the independently ordered physical state and residual coordinates of a discrete system\&. " .ti -1c .RI "struct \fBterm\fP" .br .RI "The term struct is a tag type that is used to identify a term in the discretization\&. It is used to group together terms that belong to the same field\&. Each term should have a unique name and a list of blocks that belong to it\&. Note that generally you should always use term rather than \fBterm_base\fP as term associates to a particular field at compile time\&. " .ti -1c .RI "struct \fBterm_base\fP" .br .RI "The \fBterm_base\fP struct is a tag type that is used to identify a term in the discretization\&. It is used to group together terms that belong to the same field\&. Each term should have a unique name and a list of blocks that belong to it\&. Generally you should always use term rather than \fBterm_base\fP as term associates to a particular field at compile time\&. " .ti -1c .RI "struct \fBTermDescriptor\fP" .br .RI "Runtime descriptor for a term, containing its associated field and name\&. Two TermDescriptors are equal if they have identical fields and names\&. " .ti -1c .RI "struct \fBvalue_block\fP" .br .RI "Final class for value blocks with a fixed index, derived from \fBvalue_block_base\fP\&. " .ti -1c .RI "struct \fBvalue_block_base\fP" .br .RI "Base class for value blocks, derived from block\&. " .in -1c .SS "Concepts" .in +1c .ti -1c .RI "concept \fBField\fP" .br .RI "Concept for field types in the discretization framework\&. To be a field a type must derive from the field base class\&. " .ti -1c .RI "concept \fBTerm\fP" .br .RI "Concept for term types in the discretization framework\&. To be a term a type must derive from term_base, must have a field_type member, and that field_type member must be a valid field\&. " .ti -1c .RI "concept \fBHasFunctionalSpace\fP" .br .RI "Concept for term types that have a functional space\&. To have a functional space a type must first be a valid \fBTerm\fP and must have a FunctionalSpace member type\&. " .ti -1c .RI "concept \fBHasSupport\fP" .br .RI "Concept for term types that have a domain over which they are supported\&. To have support a type must first be a valid \fBTerm\fP and must have a Support member type\&. " .ti -1c .RI "concept \fBHasQuantity\fP" .br .RI "Concept for term types that have a physical quantity associated with them\&. To have a quantity a type must first be a valid \fBTerm\fP and must have a Quantity member type\&. " .ti -1c .RI "concept \fBHasValueBlock\fP" .br .RI "Concept for term types that have a value block associated with them\&. To have a value block a type must first be a valid \fBTerm\fP and must have a value member type\&. " .ti -1c .RI "concept \fBHasResidualBlock\fP" .br .RI "Concept for term types that have a residual block associated with them\&. To have a residual block a type must first be a valid \fBTerm\fP and must have a residual member type\&. " .ti -1c .RI "concept \fBSpatialTerm\fP" .br .RI "Concept for term types that are spatial terms\&. A spatial term is a term that has a functional space (\fBHasFunctionalSpace\fP) and a support (\fBHasSupport\fP)\&. " .ti -1c .RI "concept \fBGlobalScalarTerm\fP" .br .RI "Concept for term types that are global scalar terms\&. A global scalar term is a term that has support (\fBHasSupport\fP) but does not have a functional space (\fBHasFunctionalSpace\fP) and is derived from the global_scalar class\&. " .ti -1c .RI "concept \fBSystemLayoutType\fP" .br .RI "Compile time check for a SystemLayout type, e\&.g\&. SystemLayout\&. " .ti -1c .RI "concept \fBScalarTraceTerm\fP" .br .RI "A unique scalar boundary value is available for continuous scalar fields and scalar globals\&. " .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "template using \fBFunctionalSpaceOf\fP = std::remove_cvref_t::FunctionalSpace" .br .RI "Extract the functional space type associated with a given term type\&. Will have a type of whatever TermT::FunctionalSpace is\&. " .ti -1c .RI "template using \fBSupportOf\fP = std::remove_cvref_t::Support" .br .RI "Extract the support type associated with a given term type\&. Will have a type of whatever TermT::Support is\&. " .ti -1c .RI "template using \fBQuantityOf\fP = std::remove_cvref_t::Quantity" .br .RI "Extract the quantity type associated with a given term type\&. Will have a type of whatever TermT::Quantity is\&. " .ti -1c .RI "template using \fBStateView\fP = \fBBlockVectorView\fP<\fBRepresentedValueKind::value\fP, Layout, Scalar>" .br .RI "A convenient alias for a view of the physical state coefficients\&. " .ti -1c .RI "template using \fBResidualView\fP = \fBBlockVectorView\fP<\fBRepresentedValueKind::residual\fP, Layout, Scalar>" .br .RI "A convenient alias for a view of the residual coefficients\&. " .in -1c .SS "Enumerations" .in +1c .ti -1c .RI "enum class \fBRepresentedValueKind\fP { \fBvalue\fP, \fBresidual\fP }" .br .RI "Enum representing the kind of value a block represents, either a physical quantity (value) or a residual (residual)\&. " .in -1c .SS "Functions" .in +1c .ti -1c .RI "std::size_t \fBchecked_block_size\fP (std::span< const std::size_t > sizes)" .br .RI "Sum some memory span with checking for if any element is too large to fit in a size_t\&. " .ti -1c .RI "template constexpr std::remove_cvref_t< Layout > \fBmake_system_layout\fP (const SizeResolver &size)" .br .RI "Build both coordinate orderings from the same physical size resolver\&. " .in -1c .SS "Variables" .in +1c .ti -1c .RI "constexpr int \fBDYNAMIC_BLOCK_SIZE\fP = \-1" .br .ti -1c .RI "template constexpr \fBFieldDescriptor\fP \fBfield_descriptor\fP {\&.name = FieldT::name}" .br .RI "Create a \fBFieldDescriptor\fP for a given field type\&. " .ti -1c .RI "template constexpr \fBTermDescriptor\fP \fBterm_descriptor\fP" .br .RI "Create a \fBTermDescriptor\fP for a given term type\&. " .in -1c .SH "Typedef Documentation" .PP .SS "template using \fBserif::discretization::blocks::FunctionalSpaceOf\fP = std::remove_cvref_t::FunctionalSpace" .PP Extract the functional space type associated with a given term type\&. Will have a type of whatever TermT::FunctionalSpace is\&. .PP \fBTemplate Parameters\fP .RS 4 \fITermT\fP The term type from which to extract the functional space type\&. .RE .PP \fBTodo\fP .RS 4 For consistency with other types consider renaming TermT::FunctionalSpace to TermT::functional_space\&. This would require updating all term definitions to use the new naming convention\&. CLion or some other IDE should be able to handle this refactor easily\&. .RE .PP .SS "template using \fBserif::discretization::blocks::QuantityOf\fP = std::remove_cvref_t::Quantity" .PP Extract the quantity type associated with a given term type\&. Will have a type of whatever TermT::Quantity is\&. .PP \fBTemplate Parameters\fP .RS 4 \fITermT\fP The term type from which to extract the quantity type\&. .RE .PP \fBTodo\fP .RS 4 For consistency with other types consider renaming TermT::Quantity to TermT::quantity\&. This would require updating all term definitions to use the new naming convention\&. CLion or some other IDE should be able to handle this refactor easily\&. .RE .PP .SS "template using \fBserif::discretization::blocks::ResidualView\fP = \fBBlockVectorView\fP<\fBRepresentedValueKind::residual\fP, Layout, Scalar>" .PP A convenient alias for a view of the residual coefficients\&. .PP \fBTemplate Parameters\fP .RS 4 \fILayout\fP The block layout type, e\&.g\&. \fBSystemLayout\fP\&. .br \fIScalar\fP The scalar type of the coefficients, e\&.g\&. double\&. .RE .PP .SS "template using \fBserif::discretization::blocks::StateView\fP = \fBBlockVectorView\fP<\fBRepresentedValueKind::value\fP, Layout, Scalar>" .PP A convenient alias for a view of the physical state coefficients\&. .PP \fBTemplate Parameters\fP .RS 4 \fILayout\fP The block layout type, e\&.g\&. \fBSystemLayout\fP\&. .br \fIScalar\fP The scalar type of the coefficients, e\&.g\&. double\&. .RE .PP .SS "template using \fBserif::discretization::blocks::SupportOf\fP = std::remove_cvref_t::Support" .PP Extract the support type associated with a given term type\&. Will have a type of whatever TermT::Support is\&. .PP \fBTemplate Parameters\fP .RS 4 \fITermT\fP The term type from which to extract the support type\&. .RE .PP \fBTodo\fP .RS 4 For consistency with other types consider renaming TermT::Support to TermT::support\&. This would require updating all term definitions to use the new naming convention\&. CLion or some other IDE should be able to handle this refactor easily\&. .RE .PP .SH "Enumeration Type Documentation" .PP .SS "enum class \fBserif::discretization::blocks::RepresentedValueKind\fP\fR [strong]\fP" .PP Enum representing the kind of value a block represents, either a physical quantity (value) or a residual (residual)\&. Generally this is mostly used in the solver/normalization system\&. .PP \fBEnumerator\fP .in +1c .TP \f(BIvalue \fP A value representing a physical quantity (e\&.g\&., temperature, pressure)\&. .TP \f(BIresidual \fP A residual representing the difference between the current state and the desired state in a numerical method\&. .SH "Function Documentation" .PP .SS "std::size_t serif::discretization::blocks::checked_block_size (std::span< const std::size_t > sizes)\fR [nodiscard]\fP" .PP Sum some memory span with checking for if any element is too large to fit in a size_t\&. .PP \fBParameters\fP .RS 4 \fIsizes\fP A span of sizes to sum .RE .PP \fBReturns\fP .RS 4 The sum of the sizes .RE .PP \fBExceptions\fP .RS 4 \fIstd::overflow_error\fP If an element of sizes is too large to fit in a size_t .RE .PP \fBTodo\fP .RS 4 Really this does not need to be specific to this module, this might more generally be named something like "safe sum" and moved to a more general location\&. .RE .PP .SS "template std::remove_cvref_t< Layout > serif::discretization::blocks::make_system_layout (const SizeResolver & size)\fR [nodiscard]\fP, \fR [constexpr]\fP" .PP Build both coordinate orderings from the same physical size resolver\&. .PP \fBParameters\fP .RS 4 \fIsize\fP A callable whose templated operator()() returns that coordinate's coefficient count\&. .RE .PP .SH "Variable Documentation" .PP .SS "int serif::discretization::blocks::DYNAMIC_BLOCK_SIZE = \-1\fR [inline]\fP, \fR [constexpr]\fP" .SS "template \fBFieldDescriptor\fP serif::discretization::blocks::field_descriptor {\&.name = FieldT::name}\fR [inline]\fP, \fR [constexpr]\fP" .PP Create a \fBFieldDescriptor\fP for a given field type\&. .PP \fBTemplate Parameters\fP .RS 4 \fIFieldT\fP The field type for which to create the descriptor\&. .RE .PP .SS "template \fBTermDescriptor\fP serif::discretization::blocks::term_descriptor\fR [inline]\fP, \fR [constexpr]\fP" \fBInitial value:\fP .nf { \&.field = field_descriptor, \&.name = TermT::name } .PP .fi .PP Create a \fBTermDescriptor\fP for a given term type\&. .PP \fBTemplate Parameters\fP .RS 4 \fITermT\fP The term type for which to create the descriptor\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for SERiF from the source code\&.