DofValueMixin< n_start_index, n_species, ValueType, Derived > Struct Template Reference
|
Developer Documentation
|
#include <state_views_mixins.hpp>
Public Types | |
| using | value_type = std::conditional_t< std::is_const_v< std::remove_reference_t< ValueType > >, std::add_const_t< typename ValueType::value_type >, typename ValueType::value_type > |
Public Member Functions | |
| value_type & | partial_density (const unsigned species_component) const |
| ValueType::value_type | mass_fraction (const unsigned species_component) const |
Private Member Functions | |
| ValueType & | value () const |
| const Derived & | derived () const |
| ValueType::value_type | last_species_mass_fraction () const |
| value_type & | last_species_partial_density () const |
Private Attributes | ||
| struct { | ||
| std::optional< typename ValueType::value_type > mass_fraction | ||
| std::optional< typename ValueType::value_type > partial_density | ||
| } | last_species_cache | |
| Cache for the mass fraction and the partial density of the last species component. | ||
Detailed Description
struct MeltPoolDG::SpeciesTransport::DofValueMixin< n_start_index, n_species, ValueType, Derived >
CRTP mixin providing semantic access to conserved and primitive variables of species transport, i.e. the partial density and the mass fraction. The following mixins assume that the solution vector stores the first n-1 species partial densities in consecutive components starting from the index n_start_index. The mass fraction and partial density of the last species are then derived from the total density and the mass fractions or partial densities of the other species, respectively.
- Template Parameters
-
n_start_index The starting index at which the first partial density components of the species solution is located in the solution vector. n_species The total number of species in the simulation. ValueType A dealii::Tensor-like type that can be indexed with operator[] and whose value_type is a floating point type or a dealii::VectorizedArray of a floating point type. Derived The derived type to which the mixin is applied. The derived type must provide a value() member function returning an indexable tensor-like container and a density() function.
Member Typedef Documentation
◆ value_type
| using MeltPoolDG::SpeciesTransport::DofValueMixin< n_start_index, n_species, ValueType, Derived >::value_type = std::conditional_t<std::is_const_v<std::remove_reference_t<ValueType> >, std::add_const_t<typename ValueType::value_type>, typename ValueType::value_type> |
Member Function Documentation
◆ derived()
|
inlineprivate |
◆ last_species_mass_fraction()
|
inlineprivate |
Helper function to compute the mass fraction of the last species component. This is not stored in the solution vector and is computed from the mass fractions of the other species components. The result is cached to avoid redundant computations in case the function is called multiple times for the same species component.
◆ last_species_partial_density()
|
inlineprivate |
Helper function to compute the partial density of the last species component. This is not stored in the solution vector and is computed from the partial densities of the other species components. The result is cached to avoid redundant computations in case the function is called multiple times for the same species component.
◆ mass_fraction()
|
inline |
Return the mass fraction of a species component.
- Parameters
-
species_component The index of the species component of interest.
◆ partial_density()
|
inline |
Return the partial density of a species component.
- Parameters
-
species_component The index of the species component of interest.
◆ value()
|
inlineprivate |
Member Data Documentation
◆ [struct]
| struct { ... } MeltPoolDG::SpeciesTransport::DofValueMixin< n_start_index, n_species, ValueType, Derived >::last_species_cache |
Cache for the mass fraction and the partial density of the last species component.
◆ mass_fraction
|
mutable |
◆ partial_density
|
mutable |
The documentation for this struct was generated from the following file:
- include/meltpooldg/species_transport/state_views_mixins.hpp
Generated by