Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
trixi-framework
GitHub Repository: trixi-framework/Trixi.jl
Path: blob/main/src/equations/laplace_diffusion_entropy_variables_1d.jl
5586 views
1
function LaplaceDiffusionEntropyVariables1D(diffusivity, equations_hyperbolic)
2
return LaplaceDiffusionEntropyVariables{1, typeof(equations_hyperbolic),
3
nvariables(equations_hyperbolic),
4
typeof(diffusivity)}(diffusivity,
5
equations_hyperbolic)
6
end
7
8
# Note that here, `u` should be the transformed entropy variables, and
9
# not the conservative variables.
10
function flux(u, gradients, orientation::Integer,
11
equations::LaplaceDiffusionEntropyVariables{1})
12
dudx, = gradients # Extract first (and only) component from gradients
13
diffusivity = jacobian_entropy2cons(u, equations)
14
# if orientation == 1
15
return SVector(diffusivity * dudx)
16
end
17
18