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

Documenter and refactor #40

Merged
merged 75 commits into from
Mar 12, 2024
Merged
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
4b3f304
VelocityExtension.jl docs & clean
zjwegert Feb 3, 2024
c75ecf5
Utilities.jl refactor & docs
zjwegert Feb 3, 2024
7912016
Merge pull request #39 from zjwegert/main
zjwegert Feb 5, 2024
71ed3b1
Started ChainRules.jl documentation and added some TODOs
zjwegert Feb 6, 2024
0059957
ChainRules.jl docs draft
zjwegert Feb 6, 2024
603b5e8
Advection.jl docs
zjwegert Feb 6, 2024
0c6e80f
Benchmarks.jl docs and small rearrange
zjwegert Feb 6, 2024
ecf1e2a
Remove export TODOs
zjwegert Feb 7, 2024
f5a3beb
Merge branch 'main' into src_refactor_and_docs
zjwegert Feb 7, 2024
39b27c0
Clean up exports and general clean
zjwegert Feb 7, 2024
0cac404
Started optimiser docs + clean up
zjwegert Feb 7, 2024
91782a4
Remove TODO
zjwegert Feb 7, 2024
178e0bf
Added Optimiser.jl docs and more cleaning
zjwegert Feb 7, 2024
e64f9ef
Add note
zjwegert Feb 7, 2024
8215892
Name change!
zjwegert Feb 7, 2024
3fc85e6
Replace all 'LSTO_Distributed' -> 'LevelSetTopOpt'
zjwegert Feb 7, 2024
39ad12c
This shouldn't be here!
zjwegert Feb 7, 2024
4cb1354
Typos
zjwegert Feb 7, 2024
11963f6
Fix type/func headers
zjwegert Feb 7, 2024
9eba725
Started creating docs pages
zjwegert Feb 7, 2024
a46f0e8
Collapse toc
zjwegert Feb 7, 2024
25733fa
bug fix
zjwegert Feb 7, 2024
33ae174
Some more IO docs
zjwegert Feb 7, 2024
b26aac3
chainrules.md docs
zjwegert Feb 8, 2024
18f7962
Additional reference docs
zjwegert Feb 8, 2024
3534546
Update readme, added developer notes
zjwegert Feb 8, 2024
eb96588
Added skeleton for tutorials
zjwegert Feb 8, 2024
c346df6
Added more docs
zjwegert Feb 18, 2024
f2f6a7c
adjust tut 1
zjwegert Feb 18, 2024
08c1fa0
IMPORTANT: Added Gamma_D dirichlet tag to match docs
zjwegert Feb 18, 2024
4aae2ee
Docs update & remove Zygote
zjwegert Feb 19, 2024
2ed9d42
Additional docs in tut 1
zjwegert Feb 19, 2024
d40ec83
Working on tutorial, fixed project wide typo
zjwegert Feb 19, 2024
1c02c76
Still writing tut 1
zjwegert Feb 19, 2024
bc7db53
Refactoring and renaming + verified tut 1 core
zjwegert Feb 19, 2024
99f77c5
POSSIBLY BREAKING: Need to check all problems
zjwegert Feb 19, 2024
9729d46
Undid prev change, adjust ALM conv crit
zjwegert Feb 19, 2024
5cccfea
Finished a draft of tut1
zjwegert Feb 20, 2024
873242e
IMPORTANT: Removed `dF .*= -1` in ChainRules to correct TODO. This re…
zjwegert Feb 20, 2024
9453d6c
Spelling
zjwegert Feb 20, 2024
2722df2
replace with num
zjwegert Feb 21, 2024
51e5a68
Added more options to HPM, added inverter ALM for paper
zjwegert Feb 21, 2024
4ca6d11
typo fix
zjwegert Feb 22, 2024
a392481
QoL - added initial parameters function
zjwegert Feb 23, 2024
0d3f7df
Added 2d thermal MPI + PETSc for paper
zjwegert Feb 23, 2024
5d4bc2e
added for paper
zjwegert Feb 23, 2024
f650d1c
Updated 3d inverter scripts
zjwegert Feb 25, 2024
c4034ef
Note for self
zjwegert Feb 27, 2024
5016ece
fixed minor typos in ChainRules.jl docs
zjwegert Feb 28, 2024
1f7aeb8
several corrections
zjwegert Feb 29, 2024
7547a31
Reuse serial `get_el_Δ`
zjwegert Feb 29, 2024
b1aa365
Merge branch 'src_refactor_and_docs' of https://github.com/zjwegert/L…
zjwegert Feb 29, 2024
0ecdb7a
Resolve #35
zjwegert Mar 4, 2024
64d12c9
Fix
zjwegert Mar 4, 2024
db9682e
Fix Neumann BC setup
zjwegert Mar 4, 2024
0e95b49
Removed unnecessary `prod` call
zjwegert Mar 5, 2024
7a9bfa5
Found typo in advection, need to re-run sims arg
zjwegert Mar 5, 2024
d1e6d80
Fix
zjwegert Mar 5, 2024
6845663
Testing different sign approximation
zjwegert Mar 6, 2024
dc274d0
CHANGE TO ADVECTION - may need to undo
zjwegert Mar 7, 2024
471a2ee
Ready for 3D testing
zjwegert Mar 7, 2024
041792d
Added `reinit_mod` to control how often we reinitialise
zjwegert Mar 7, 2024
7626979
file naming for testing
zjwegert Mar 7, 2024
363e99a
Important: Changed storage in `SmoothErsatzMaterialInterpolation`, al…
zjwegert Mar 8, 2024
f2e93e6
fix 3d job
zjwegert Mar 11, 2024
054c3a1
bug fix
zjwegert Mar 11, 2024
1b8fb1a
minor adjustments to paper scripts
zjwegert Mar 11, 2024
592cf65
rename
zjwegert Mar 11, 2024
1628970
Added stuff from ODE refactor branch (temp code)
JordiManyer Mar 11, 2024
f97976e
Added MultiField support for RepeatingAffineFEStateMaps
JordiManyer Mar 12, 2024
7fddabe
Merge pull request #41 from zjwegert/jordi-dev
JordiManyer Mar 12, 2024
bcfec72
Added CI structure
JordiManyer Mar 12, 2024
999e86c
Merge pull request #42 from zjwegert/jordi-dev
JordiManyer Mar 12, 2024
aa3ca0d
Commented doc deployment
JordiManyer Mar 12, 2024
192d8ee
import estimate_period
zjwegert Mar 12, 2024
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
Prev Previous commit
Next Next commit
Important: Changed storage in SmoothErsatzMaterialInterpolation, al…
…lows propagation of parameter changes
  • Loading branch information
zjwegert committed Mar 8, 2024
commit 363e99abd76ff7fc029b76944c3e27ae5011bb7b
23 changes: 16 additions & 7 deletions src/Utilities.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
struct SmoothErsatzMaterialInterpolation{M<:AbstractFloat}
struct SmoothErsatzMaterialInterpolation{M<:Vector{<:Number},N<:Vector{<:Number}}

A wrapper holding parameters and methods for interpolating an
integrand across a single boundary ``\\partial\\Omega``.
Expand All @@ -10,22 +10,31 @@ function ``\\varphi`` and ``I`` is an indicator function.
# Properties

- `η::M`: the interpolation or smoothing radius across ∂Ω
- `ϵₘ::M`: the ersatz material density
- `ϵ::M`: the ersatz material density
- `H`: a smoothed Heaviside function
- `DH`: the derivative of `H`
- `I`: an indicator function
- `ρ`: a function describing the volume density of ``\\Omega``
(e.g., ``\\mathrm{Vol}(\\Omega) = \\int \\rho(\\varphi))~\\mathrm{d}D)``

# Note
- We store η and ϵ as length-one vectors so that updating these values propagates through H, DH, etc.
- To update η and/or ϵ in an instance `m`, take `m.η .= <VALUE>`.
- A conviencence constructor is provided to create an instance given `η<:Number` and `ϵ<:Number`.
"""
Base.@kwdef struct SmoothErsatzMaterialInterpolation{M<:AbstractFloat}
Base.@kwdef struct SmoothErsatzMaterialInterpolation{M<:Vector{<:Number},N<:Vector{<:Number}}
η::M
ϵₘ::M = 10^-3
H = x -> H_η(x,η)
DH = x -> DH_η(x,η)
I = φ -> (1 - H(φ)) + ϵₘ*H(φ)
ϵ::N
H = x -> H_η(x,first(η))
DH = x -> DH_η(x,first(η))
I = φ -> (1 - H(φ)) + first(ϵ)*H(φ)
ρ = φ -> 1 - H(φ)
end

function SmoothErsatzMaterialInterpolation(;η::M,ϵ::N=10^-3) where {M<:Number,N<:Number}
return SmoothErsatzMaterialInterpolation{Vector{M},Vector{N}}(η=[η],ϵ=[ϵ])
end

function H_η(t,η)
M = typeof(η*t)
if t<-η
Expand Down