We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
enstrophy
DGMulti
The original implementation of the enstrophy analysis callback introduced in PR1239 does not work and was not tested.
It is removed in #2140 .
A starting point for a fix would be (note that there are already couple changes to the original version)
function integrate(func::typeof(enstrophy), u, mesh::DGMultiMesh, equations, equations_parabolic::CompressibleNavierStokesDiffusion3D, dg::DGMulti, cache, cache_parabolic; normalize=true) gradients_x, gradients_y, gradients_z = cache_parabolic.gradients # allocate local storage for gradients. # TODO: can we avoid allocating here? local_gradient_quadrature_values = ntuple(_ -> copy(cache_parabolic.local_u_values_threaded), 3) integral = zero(eltype(eltype(u))) for e in eachelement(mesh, dg) u_quadrature_values = cache_parabolic.local_u_values_threaded[Threads.threadid()] gradient_x_quadrature_values = local_gradient_quadrature_values[1][Threads.threadid()] gradient_y_quadrature_values = local_gradient_quadrature_values[2][Threads.threadid()] gradient_z_quadrature_values = local_gradient_quadrature_values[3][Threads.threadid()] # interpolate to quadrature on each element apply_to_each_field(mul_by(dg.basis.Vq), u_quadrature_values, view(u, :, e)) apply_to_each_field(mul_by(dg.basis.Vq), gradient_x_quadrature_values, view(gradients_x, :, e)) apply_to_each_field(mul_by(dg.basis.Vq), gradient_y_quadrature_values, view(gradients_y, :, e)) apply_to_each_field(mul_by(dg.basis.Vq), gradient_z_quadrature_values, view(gradients_z, :, e)) # integrate over the element for i in eachindex(u_quadrature_values) gradients_i = SVector(gradient_x_quadrature_values[i], gradient_y_quadrature_values[i], gradient_z_quadrature_values[i]) integral += mesh.md.wJq[i, e] * func(u_quadrature_values[i], gradients_i, equations_parabolic) end end return integral end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The original implementation of the
enstrophy
analysis callback introduced in PR1239 does not work and was not tested.It is removed in #2140 .
A starting point for a fix would be (note that there are already couple changes to the original version)
The text was updated successfully, but these errors were encountered: