diff --git a/src/example/heat_equation_sphere/Project.toml b/src/example/heat_equation_sphere/Project.toml new file mode 100644 index 0000000..d3074e6 --- /dev/null +++ b/src/example/heat_equation_sphere/Project.toml @@ -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" diff --git a/src/example/heat_equation_sphere/heat_equation_sphere.jl b/src/example/heat_equation_sphere/heat_equation_sphere.jl index e1a494e..54ab3d0 100644 --- a/src/example/heat_equation_sphere/heat_equation_sphere.jl +++ b/src/example/heat_equation_sphere/heat_equation_sphere.jl @@ -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)) diff --git a/src/example/transport_hypersurface/Project.toml b/src/example/transport_hypersurface/Project.toml index cf9f0d2..38b228e 100644 --- a/src/example/transport_hypersurface/Project.toml +++ b/src/example/transport_hypersurface/Project.toml @@ -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" diff --git a/src/example/transport_hypersurface/transport_hypersurface.jl b/src/example/transport_hypersurface/transport_hypersurface.jl index f794f7f..fa67114 100644 --- a/src/example/transport_hypersurface/transport_hypersurface.jl +++ b/src/example/transport_hypersurface/transport_hypersurface.jl @@ -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)) @@ -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) @@ -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 @@ -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", @@ -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) @@ -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 @@ -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",