GradientValueMixin< n_start_index, n_species, ValueType, GradientType, 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 > |
| using | gradient_type = std::conditional_t< std::is_const_v< std::remove_reference_t< GradientType > >, std::add_const_t< typename GradientType::value_type >, typename GradientType::value_type > |
Public Member Functions | |
| gradient_type & | grad_partial_density (const unsigned species_component) const |
| GradientType::value_type | grad_mass_fraction (const unsigned species_component) const |
Private Member Functions | |
| ValueType & | value () const |
| GradientType & | gradient_value () const |
| const Derived & | derived () const |
| gradient_type & | last_species_grad_mass_fraction () const |
| GradientType::value_type & | last_species_grad_partial_density () const |
Private Attributes | ||
| struct { | ||
| std::optional< typename GradientType::value_type > mass_fraction | ||
| std::optional< typename GradientType::value_type > partial_density | ||
| } | last_species_cache | |
Detailed Description
struct MeltPoolDG::SpeciesTransport::GradientValueMixin< n_start_index, n_species, ValueType, GradientType, Derived >
CRTP mixin providing semantic access to the gradient of conserved and primitive variables of species transport, i.e. the gradient of the partial density and the gradient of mass fraction.
- 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 type representing the non-gradient value. GradientType A dealii::Tensor type representing the gradient. 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, a density(), a grad_density() and a mass_fraction() function.
Member Typedef Documentation
◆ gradient_type
| using MeltPoolDG::SpeciesTransport::GradientValueMixin< n_start_index, n_species, ValueType, GradientType, Derived >::gradient_type = std::conditional_t<std::is_const_v<std::remove_reference_t<GradientType> >, std::add_const_t<typename GradientType::value_type>, typename GradientType::value_type> |
◆ value_type
| using MeltPoolDG::SpeciesTransport::GradientValueMixin< n_start_index, n_species, ValueType, GradientType, 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 |
◆ grad_mass_fraction()
|
inline |
Get the gradient of the mass fraction of a species component.
- Parameters
-
species_component The index of the species component for which the gradient of the mass fraction is computed.
◆ grad_partial_density()
|
inline |
Get the gradient of the partial density of a species component.
- Parameters
-
species_component The index of the species component for which the gradient of the partial density is computed.
◆ gradient_value()
|
inlineprivate |
◆ last_species_grad_mass_fraction()
|
inlineprivate |
Helper function to compute the gradient of the mass fraction of the last species component. This is not stored in the solution vector and is computed from the gradients 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_grad_partial_density()
|
inlineprivate |
Helper function to compute the gradient of the partial density of the last species component. This is not stored in the solution vector and is computed from the gradients 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.
◆ value()
|
inlineprivate |
Member Data Documentation
◆ [struct]
| struct { ... } MeltPoolDG::SpeciesTransport::GradientValueMixin< n_start_index, n_species, ValueType, GradientType, Derived >::last_species_cache |
Cache for the gradient of the mass fraction and the gradient of 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