Skip to content
New issue

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

Bcube 0.1.15 for hypersurface #23

Merged
merged 1 commit into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/example/heat_equation_sphere/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[deps]
Bcube = "cf06320b-b7f3-4748-8003-81a6b6979792"
FastTransforms = "057dd010-8810-581a-b7be-e3fc3b93f78c"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192"

[compat]
Bcube = "0.1.15"
2 changes: 1 addition & 1 deletion src/example/heat_equation_sphere/heat_equation_sphere.jl
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ mutable struct VtkHandler
ϕ_centers = var_on_centers(ϕ, mesh)
ϕ_vertices = var_on_vertices(ϕ, mesh)

ν = Bcube.CellNormal(mesh)
ν = get_cell_normals(CellDomain(mesh))
ν_centers = transpose(var_on_centers(ν, mesh))
ν_vertices = transpose(var_on_vertices(ν, mesh))

Expand Down
2 changes: 1 addition & 1 deletion src/example/transport_hypersurface/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192"

[compat]
Bcube = "0.1.14"
Bcube = "0.1.15"
18 changes: 9 additions & 9 deletions src/example/transport_hypersurface/transport_hypersurface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ mutable struct VtkHandler
θ_centers = var_on_centers(θ, mesh)
θ_vertices = var_on_vertices(θ, mesh)

ν = Bcube.CellNormal(mesh)
ν = get_cell_normals(dΩ)
ν_centers = transpose(var_on_centers(ν, mesh))
ν_vertices = transpose(var_on_vertices(ν, mesh))

Expand Down Expand Up @@ -215,7 +215,7 @@ function scalar_circle(;

## Transport velocity
_c = PhysicalFunction(x -> C * SA[-x[2], x[1]] / radius)
P = Bcube.tangential_projector(mesh)
P = Bcube.tangential_projector()
c = (x -> C * normalize(x)) ∘ (P * _c) ## useless in theory since velocity is already tangent

## Find quadrature weight (mesh is composed of a unique "shape" so first element is enough)
Expand Down Expand Up @@ -360,7 +360,7 @@ function vector_circle(; degree, nite, CFL, nθ)
nΓ = get_face_normals(Γ)

## Operators
P = Bcube.tangential_projector(mesh)
P = Bcube.tangential_projector()
R = Bcube.CoplanarRotation()

## Transport velocity : it must be coplanar to each element, so we use the
Expand Down Expand Up @@ -481,8 +481,8 @@ function scalar_cylinder(;
"u_mean" => Bcube.cell_mean(u, vtk.dΩ),
"lim_u" => lim_u,
"c" => vtk.c,
"cellnormal" => Bcube.CellNormal(vtk.mesh),
"u_warp" => u * Bcube.CellNormal(vtk.mesh),
"cellnormal" => vtk.ν,
"u_warp" => u * vtk.ν,
)
Bcube.write_vtk_lagrange(
vtk.basename * "_lag",
Expand Down Expand Up @@ -542,7 +542,7 @@ function scalar_cylinder(;
_x = RmatInv * x
Rmat * SA[-Cθ * _x[2] / radius, Cθ * _x[1] / radius, Cz]
end)
P = Bcube.tangential_projector(mesh) ##Bcube.TangentialProjector()
P = Bcube.tangential_projector()
c = (x -> C * normalize(x)) ∘ (P * _c)

## Find quadrature weight (mesh is composed of a unique "shape" so first element is enough)
Expand Down Expand Up @@ -754,7 +754,7 @@ function vector_cylinder(;
V = TestFESpace(U)

## Operators
P = Bcube.tangential_projector(mesh)
P = Bcube.tangential_projector()
R = Bcube.CoplanarRotation()

## Transport velocity
Expand Down Expand Up @@ -915,8 +915,8 @@ function scalar_torus(;
"u_mean" => Bcube.cell_mean(u, vtk.dΩ),
"lim_u" => lim_u,
"c" => vtk.c,
"cellnormal" => Bcube.CellNormal(vtk.mesh),
"u_warp" => u * Bcube.CellNormal(vtk.mesh),
"cellnormal" => vtk.ν,
"u_warp" => u * vtk.ν,
)
Bcube.write_vtk_lagrange(
vtk.basename * "_lag",
Expand Down
Loading