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

Refactoring / rewriting #11

Open
wants to merge 71 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
05a5844
Merge branch 'main' of https://github.com/Emmanuel-R8/causticsEnginee…
AlbaIntelligence Aug 31, 2021
4fc5fcc
Merge branch 'main' of https://github.com/Emmanuel-R8/causticsEnginee…
AlbaIntelligence Aug 31, 2021
3d9de25
Refactorin ongoing. Snapshot
AlbaIntelligence Sep 1, 2021
c56c6f1
Refactorin ongoing. Snapshot
AlbaIntelligence Sep 1, 2021
54716c3
Merge branch 'main' of https://github.com/Emmanuel-R8/causticsEnginee…
AlbaIntelligence Sep 1, 2021
d975aaa
Refactorig. Snapshot 2
Emmanuel-R8 Sep 1, 2021
624fbef
Refactorig. Snapshot 3
Emmanuel-R8 Sep 1, 2021
311cd7a
Refactorig. Snapshot 4
Emmanuel-R8 Sep 1, 2021
9e12ce9
Refactorig. Snapshot 5
Emmanuel-R8 Sep 2, 2021
8adb7c5
Refactoring. Snapshot 5
Emmanuel-R8 Sep 3, 2021
c3477a4
Refactoring. Snapshot 6
Emmanuel-R8 Sep 3, 2021
ce67002
Refactoring. Snapshot 7
Emmanuel-R8 Sep 3, 2021
24f47f5
Refactoring. Snapshot 7
Emmanuel-R8 Sep 5, 2021
c566148
Refactoring. Snapshot 8
Emmanuel-R8 Sep 5, 2021
f3d0e84
Refactoring. Snapshot 9
Emmanuel-R8 Sep 6, 2021
00e9612
Minor
AlbaIntelligence Sep 6, 2021
ffd9a2b
Merge branch 'main' of https://github.com/Emmanuel-R8/causticsEnginee…
AlbaIntelligence Sep 6, 2021
7884810
Refactoring ongoing. Snapshot 10
AlbaIntelligence Sep 6, 2021
c97a317
gitignore
Emmanuel-R8 Sep 7, 2021
ddb9137
Refactoring ongoing. Snapshot 11
AlbaIntelligence Sep 7, 2021
34a17e2
Refactoring ongoing. Snapshot 12
AlbaIntelligence Sep 8, 2021
5802b2a
Refactoring ongoing. Snapshot 12
AlbaIntelligence Sep 9, 2021
80409c4
Refactoring. Snapshot 13
Emmanuel-R8 Sep 9, 2021
a85c048
Refactoring. Snapshot 14
Emmanuel-R8 Sep 10, 2021
6392ad5
Refactoring. Snapshot 15
Emmanuel-R8 Sep 10, 2021
5c835c4
Refactoring - Looks like working
Emmanuel-R8 Sep 11, 2021
4332b80
Refactoring - Looks like working
Emmanuel-R8 Sep 11, 2021
8a6bdae
Merge branch 'main' into main
Emmanuel-R8 Sep 11, 2021
fd94975
Minor
Emmanuel-R8 Sep 12, 2021
7c5955e
Merge branch 'main' of https://github.com/Emmanuel-R8/causticsEnginee…
Emmanuel-R8 Sep 12, 2021
4c28798
Plotting bugs. Change of optimisation halting conditions.
Emmanuel-R8 Sep 12, 2021
4a1a064
Plotting bugs. Change of optimisation halting conditions. Corrected b…
Emmanuel-R8 Sep 13, 2021
e0ad5e7
Halting criteria changes. Snapshot
Emmanuel-R8 Sep 13, 2021
e76e0db
Merge branch 'main' of https://github.com/Emmanuel-R8/causticsEnginee…
AlbaIntelligence Sep 13, 2021
ac3c1fd
Tracking area conservation bug
AlbaIntelligence Sep 13, 2021
8abc24c
Tracking area convergence bug
AlbaIntelligence Sep 14, 2021
891c1f5
Move divergence function to maths utilities.
Emmanuel-R8 Sep 14, 2021
5e4dbbc
Minor.
Emmanuel-R8 Sep 15, 2021
8be5b20
Tracking converging bug.
Emmanuel-R8 Sep 16, 2021
ca33de3
Tracking area convergence bug
AlbaIntelligence Sep 16, 2021
cadba11
Tracking convergence bug
AlbaIntelligence Sep 16, 2021
76baa66
Tracking convergence bug
AlbaIntelligence Sep 17, 2021
12c93ce
Tracking convergence bug
AlbaIntelligence Sep 17, 2021
29e0c18
Tracking convergence bug
AlbaIntelligence Sep 19, 2021
59853dd
Tracking convergence bug
AlbaIntelligence Sep 19, 2021
6939ec0
Tracking convergence bug
AlbaIntelligence Sep 19, 2021
250e000
Tracking convergence bug
AlbaIntelligence Sep 19, 2021
883cda2
Tracking convergence bug
AlbaIntelligence Sep 19, 2021
034c4ec
Tracking convergence bug
AlbaIntelligence Sep 20, 2021
3d4dd72
Tracking area convergence bug
AlbaIntelligence Sep 20, 2021
4fa88d8
Tracking area convergence bug
AlbaIntelligence Sep 21, 2021
9473c94
Tracking area convergence bug
AlbaIntelligence Sep 25, 2021
4727036
Minor
Emmanuel-R8 Sep 25, 2021
14d3639
Tracking converging bug.
Emmanuel-R8 Sep 25, 2021
be9d1b5
Merge branch 'bisect' of https://github.com/Emmanuel-R8/causticsEngin…
AlbaIntelligence Sep 25, 2021
d7527b5
Tracking area convergence bug
AlbaIntelligence Sep 25, 2021
6a1b210
Tracking area convergence bug
AlbaIntelligence Sep 25, 2021
4f9de3c
Tracking area convergence bug
AlbaIntelligence Sep 25, 2021
fd50f9e
Tracking area convergence bug
AlbaIntelligence Sep 25, 2021
7bf9231
Tracking area convergence bug
AlbaIntelligence Sep 25, 2021
860904b
Minor.
Emmanuel-R8 Sep 26, 2021
f06cfea
Minor.
Emmanuel-R8 Sep 26, 2021
abf06db
Done
Emmanuel-R8 Sep 26, 2021
15179af
Clean up
Emmanuel-R8 Sep 26, 2021
3fbdc84
Merge pull request #2 from Emmanuel-R8/bisect
Emmanuel-R8 Sep 26, 2021
a77a436
Merge branch 'main' of https://github.com/Emmanuel-R8/causticsEnginee…
Emmanuel-R8 Sep 26, 2021
2523dcd
Merge branch 'triangular_targets' of https://github.com/Emmanuel-R8/c…
Emmanuel-R8 Sep 26, 2021
5aa5da2
Rebase
Emmanuel-R8 Sep 26, 2021
485873b
Minor
Emmanuel-R8 Sep 30, 2021
24ce62b
Documenter signatures
Emmanuel-R8 Oct 3, 2021
47e0a42
Change run.jl to use a temporary project
Emmanuel-R8 Sep 12, 2022
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
16 changes: 15 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Editors
.vscode

# Files generated by invoking Julia with --code-coverage
*.jl.cov
*.jl.*.cov

*.obj

examples/**.png

# Files generated by invoking Julia with --track-allocation
*.jl.mem
Expand All @@ -25,3 +28,14 @@ docs/site/
# committed for packages, but should be committed for applications that require a static
# environment.
Manifest.toml

# Misc.
*.tmp
*.temp

*sync-conflict*
src/debug_script.jl
examples/personal
examples/*.png


54 changes: 54 additions & 0 deletions .gitignore.orig
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Editors
.vscode

# Files generated by invoking Julia with --code-coverage
*.jl.cov
*.jl.*.cov

*.obj
it*.png
loss*.png
change*.png
delta*.png
error*.png
img*.png
orig*.png


# Files generated by invoking Julia with --track-allocation
*.jl.mem

# System-specific files and directories generated by the BinaryProvider and BinDeps packages
# They contain absolute paths specific to the host computer, and so should not be committed
deps/deps.jl
deps/build.log
deps/downloads/
deps/usr/
deps/src/

# Build artifacts for creating documentation generated by the Documenter package
docs/build*
docs/site/

# File generated by Pkg, the package manager, based on a corresponding Project.toml
# It records a fixed state of all packages used by the project. As such, it should not be
# committed for packages, but should be committed for applications that require a static
# environment.
Manifest.toml

# Misc.
*.tmp
*.temp

*sync-conflict*
src/debug_script.jl
examples/personal
examples/*.png


<<<<<<< HEAD

src/debug_script.jl
examples/personal
=======
>>>>>>> 9473c949cf07d0e9431c75b57947a2304ac33a97
17 changes: 16 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
name = "CausticsEngineering"
uuid = "e17b973c-3eae-4e30-9cf2-ee583e3dfd43"
authors = ["Matt Ferraro", "Emmanuel Rialland"]
version = "0.1.0"
version = "0.2.0"

[deps]
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
Debugger = "31a5f54b-26ea-5ae9-a837-f05ce5417438"
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
DocumenterTools = "35a29f4d-8980-5a13-9543-d66fff28ecb8"
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
LibGit2 = "76f85450-5226-5b5a-8eaa-529ad045b433"
MeshIO = "7269a6da-0436-5bbc-96c2-40638cbb6118"
MeshViz = "9ecf9c4f-6e5a-4b5e-83ae-06f2c7a661d8"
Meshes = "eacbb407-ea5a-433e-ab97-5258b1ca43fa"
OhMyREPL = "5fb14364-9ced-5910-84b2-373655c76a03"
PkgTemplates = "14b8a8f1-9102-5b29-a752-f990bacb7fe1"
Plotly = "58dd65bb-95f3-509e-9936-c39a10fdeae7"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
Weave = "44d3d7a6-8a23-5bf8-98c5-b353f8df5ec9"

[compat]
julia = "1"
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
push!(LOAD_PATH, "../src/")

using CausticsEngineering
using Documenter
using Documenter, DocStringExtensions

#
# HTML docs
Expand Down
Binary file removed examples/loss_it1.png
Binary file not shown.
Binary file removed examples/loss_it2.png
Binary file not shown.
Binary file removed examples/loss_it3.png
Binary file not shown.
20 changes: 17 additions & 3 deletions run.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
# Work in a temporary environment
using Pkg
Pkg.activate(".")
Pkg.activate(; temp = true)

using Images, CausticsEngineering
# Speed up by avoiding updating the repository when adding packages
Pkg.UPDATED_REGISTRY_THIS_SESSION[] = true

image = Images.load("./examples/cat_posing.jpg") # Check current working directory with pwd()
# Add useful package
Pkg.add([
"Revise", "Images"
])

Pkg.develop(path = @__DIR__)

using Revise, Images

using CausticsEngineering

# Check current working directory with pwd()
image = Images.load("./examples/personal/caricature.jpg")
engineer_caustics(image);
62 changes: 60 additions & 2 deletions src/CausticsEngineering.jl
Original file line number Diff line number Diff line change
@@ -1,13 +1,71 @@
module CausticsEngineering

using DocStringExtensions
using Random, Images

using Images, Plots
using Plots
gr()

using Meshes, FileIO, MeshIO


include("../examples/personal/original.jl")


include("parameters.jl")
include("utilities.jl")
include("math_utilities.jl")
include("mesh.jl")
include("io.jl")
include("plots.jl")

include("create_mesh.jl")

export main, engineer_caustics


"""
$(SIGNATURES)
"""
function main()
@assert size(ARGS) == (1,) "Intented usage is: julia create_mesh.jl image.png"

img = Images.load(ARGS[1])
return engineer_caustics(img)
end

export
# Constants
Meters_Per_Pixel,
Bottom_Offset,
Top_Offset,

# Types
Vertex3D,
FieldVertex3D,
FaceMesh,

# math
average,
average_absolute,
laplacian,
∇,

# Mesh
create_solid,
create_solid_as_dict,
get_lens_pixels_area,

# Plotting
plot_as_quiver,

# I/O
save_obj!,

# Main procedures
propagate_poisson!,
march_mesh!,
engineer_caustics,
main


end # End module
Loading