diff --git a/LICENSE b/LICENSE index 30f5818..a47e640 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2025 Øystein Klemetsdal +Copyright (c) 2025 Øystein Klemetsdal, SINTEF Digital and Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Project.toml b/Project.toml index 094ab63..5049f32 100644 --- a/Project.toml +++ b/Project.toml @@ -1,19 +1,15 @@ name = "Fimbul" uuid = "cac51d78-27de-4708-bd2b-bd13a82f652b" authors = ["Øystein Klemetsdal"] -version = "1.0.0-DEV" +version = "0.1.0" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" Gmsh = "705231aa-382f-11e9-3f0c-b7cb4346fdeb" -HYPRE = "b5ffcf37-a2bd-41ab-a3da-4bd9bc8ad771" Integrals = "de52edbc-65ea-441a-8357-d3a637375a31" Jutul = "2b460a1a-8a2b-45b2-b125-b5c536396eb9" JutulDarcy = "82210473-ab04-4dce-b31b-11573c4f8e0a" -LBFGSB = "5be7bae1-8223-5378-bac3-9e7378a2f6e6" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -Meshes = "eacbb407-ea5a-433e-ab97-5258b1ca43fa" -Revise = "295af30f-e4ad-537b-8983-00126c2a3abe" [weakdeps] GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" @@ -24,17 +20,15 @@ FimbulGLMakieExt = "GLMakie" [compat] Dates = "1.11.0" Gmsh = "0.3.1" -HYPRE = "1.7.0" Integrals = "4.5.0" -LBFGSB = "0.4.1" +Jutul = "0.4.5" +JutulDarcy = "0.2.46" LinearAlgebra = "1.11.0" -Meshes = "0.32.3" -Revise = "3.7.2" julia = "1.7" [extras] -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] test = ["Test"] diff --git a/README.md b/README.md index 81d35b8..8a00272 100644 --- a/README.md +++ b/README.md @@ -10,22 +10,16 @@ Fimbul.jl is a [Julia](https://julialang.org/)-based toolbox for geothermal simu ## Getting started To get started with Fimbul, install [Julia](https://julialang.org/) and follow these steps: -- Clone JutulDarcy and Fimbul -```bash -git clone https://github.com/sintefmath/JutulDarcy.jl.git -git clone https://github.com/sintefmath/Fimbul.jl.git -``` -NOTE: Fimbul currently relies on the development version of JutulDarcy, and this repository therefore has to be cloned as well. This will likely change in a future release, so that the release version of JutulDarcy can be used instead. - Make a project folder in a suitable location and navigate to it ```bash mkdir fimbul-testing cd fimbul-testing/ ``` -- Start a Julia REPL in the project folder, activate an environment, and add Fimbul and JutulDarcy. We will use the development versions that we just cloned. +- Start a Julia REPL in the project folder, activate an environment, and add Fimbul and JutulDarcy. We will also add GLMakie for plotting. ```julia using Pkg; Pkg.activate("."); -Pkg.develop(path="path/to/JutulDarcy/"); -Pkg.develop(path="path/to/Fimbul/"); +Pkg.add("Fimbul"); +Pkg.add("GLMakie"); Pkg.instantiate() ``` @@ -39,3 +33,9 @@ plot_reservoir(case, result.states; colormap = :seaborn_icefire_gradient, key = :Temperature) ``` Note that interactive plotting requires `GLMakie`, which may not work if you are running Julia over SSH. + +## License + +Fimbul.jl is licensed under the MIT License. See [LICENSE](LICENSE) for details. + +Copyright (c) 2025 Øystein Klemetsdal, SINTEF Digital and Contributors diff --git a/src/Fimbul.jl b/src/Fimbul.jl index fa6e89d..8220cb7 100644 --- a/src/Fimbul.jl +++ b/src/Fimbul.jl @@ -21,10 +21,8 @@ module Fimbul using Jutul, JutulDarcy using LinearAlgebra using Gmsh - using Meshes using Dates using Integrals - using LBFGSB # Meshing include("meshing/extruded.jl") diff --git a/src/meshing/dev_meshing.jl b/src/meshing/dev_meshing.jl deleted file mode 100644 index 194b8bf..0000000 --- a/src/meshing/dev_meshing.jl +++ /dev/null @@ -1,16 +0,0 @@ - -xw = fibonacci_pattern_2d(100; radius = missing, spacing = 5.0) -cell_constraints = map(x -> [x], xw) - -depths = [0.0, 10.0, 20, 30] -mesh, layers, metrics = horizontal_fractured_mesh(cell_constraints, depths, 10; aperture = 1e-3) - -## -using GLMakie -GLMakie.activate!() - -fig = Figure(size = (1200, 800)) -ax = Axis3(fig[1, 1], zreversed = true) -Jutul.plot_mesh_edges!(ax, mesh, alpha = 0.5) -fig - diff --git a/src/meshing/utils.jl b/src/meshing/utils.jl index 1f9dfd5..fd2cf03 100644 --- a/src/meshing/utils.jl +++ b/src/meshing/utils.jl @@ -20,27 +20,6 @@ function fibonacci_pattern_2d(num_points; spacing = 5.0, radius = missing) end -function centroid(x) - - ptset = PointSet(x) - xc = Meshes.centroid(ptset) - - return Tuple(xc.coords) - -end - -# function get_convex_hull(x) - -# ptset = PointSet(x) -# println(ptset) -# poly = convexhull(ptset) -# x = map(p -> Tuple(p.coords), vertices(poly)) -# x = vcat(x...) - -# return x - -# end - function get_convex_hull(points) # Ensure there are at least 3 points @assert length(points) ≥ 3 "At least 3 points are required to compute a convex hull."