SpECTRE  v2025.03.17
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Tags::DivVariablesCompute< Tag, MeshTag, InverseJacobianTag > Struct Template Reference

Compute the divergence of a Variables. More...

#include <Divergence.hpp>

Public Types

using base = db::add_tag_prefix< div, Tag >
 
using return_type = typename base::type
 
using argument_tags = implementation defined
 

Static Public Attributes

static constexpr void(* function )(const gsl::not_null< return_type * >, const typename Tag::type &, const Mesh< dim > &, const typename InverseJacobianTag::type &) = &divergence
 

Detailed Description

template<typename Tag, typename MeshTag, typename InverseJacobianTag>
struct Tags::DivVariablesCompute< Tag, MeshTag, InverseJacobianTag >

Compute the divergence of a Variables.

Computes the divergence of the every Tensor in the Variables represented by Tag. The first index of each Tensor must be an upper spatial index, i.e., the first index must have type TensorIndexType<Dim, UpLo::Up, Frame::TargetFrame, IndexType::Spatial>. The divergence is computed in the frame TargetFrame, and InverseJacobianTag must be associated with a map from Frame::ElementLogical to Frame::TargetFrame.

Note that each tensor may have additional tensor indices - in this case the divergence is computed for each additional index. For instance, a tensor Fabi has divergence Divab=iFabi. This is to accommodate evolution equations where the evolved variables uα are higher-rank tensors and thus their fluxes can be written as Fαi. A simple example would be the fluid velocity in hydro systems, where we would write the flux as Fij.

This tag inherits from db::add_tag_prefix<Tags::div, Tag>.


The documentation for this struct was generated from the following file: