Skip to content

Commit

Permalink
Non-allocating profile functors
Browse files Browse the repository at this point in the history
  • Loading branch information
kapple19 committed Aug 6, 2024
1 parent 398b0a1 commit f4ff62f
Show file tree
Hide file tree
Showing 33 changed files with 63 additions and 353 deletions.
27 changes: 0 additions & 27 deletions scripts/prototype.jl

This file was deleted.

35 changes: 0 additions & 35 deletions src/01_preliminary/01_general/01_auxiliary_functions.jl

This file was deleted.

19 changes: 0 additions & 19 deletions src/01_preliminary/01_general/02_flexible_math_functions.jl

This file was deleted.

118 changes: 0 additions & 118 deletions src/01_preliminary/01_general/02_string_cases.jl

This file was deleted.

11 changes: 9 additions & 2 deletions src/01_preliminary/02_modelling/01_model_naming.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ export ModelName

struct ModelName{m} end

ModelName(m::Symbol) = ModelName(m |> String)
ModelName(name::Symbol) = ModelName{name}()

ModelName(m::AbstractString) = ModelName{m |> snakecase |> Symbol}()
# ModelName(m::AbstractString) = ModelName{m |> snakecase |> Symbol}()
# ModelName(m::Symbol) = ModelName(m |> String)

Symbol(::ModelName{M}) where {M} = M
String(model::ModelName) = model |> ModelName |> String

# titletext(model::ModelName) = model |> String |> titletext
# snaketext(model::ModelName) = model |> String |> snaketext
32 changes: 0 additions & 32 deletions src/01_preliminary/02_modelling/02_model_types.jl

This file was deleted.

4 changes: 4 additions & 0 deletions src/01_preliminary/02_modelling/02_modelling_types.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
abstract type AbstractModeller <: Function end

abstract type ModellingFunction{D} <: AbstractModeller end
abstract type ModellingFunctor{D} <: AbstractModeller end
8 changes: 0 additions & 8 deletions src/01_preliminary/02_modelling/03_model_parsing.jl

This file was deleted.

43 changes: 0 additions & 43 deletions src/02_oceanography/volume/celerity.jl

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
16 changes: 0 additions & 16 deletions src/03_acoustics/01_profiles/celerity/ocean.jl

This file was deleted.

Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
24 changes: 0 additions & 24 deletions src/04_processing/01_sonar_types.jl

This file was deleted.

Empty file removed src/04_processing/01_windows.jl
Empty file.
17 changes: 0 additions & 17 deletions src/04_processing/02_sonar_terms.jl

This file was deleted.

9 changes: 9 additions & 0 deletions src/06_postliminary/01_preliminary.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export Atmosphere
export Ocean
export Seabed

abstract type Medium end

abstract type Atmosphere <: Medium end
abstract type Ocean <: Medium end
abstract type Seabed <: Medium end
1 change: 1 addition & 0 deletions src/06_postliminary/02_profiles/density/01_preliminary.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
struct DensityProfileFunctionType{MediumType <: Medium} <: ModellingFunction{3} end
7 changes: 7 additions & 0 deletions src/06_postliminary/02_profiles/density/02_atmosphere.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export atmosphere_density_profile

## Instantiation
const atmosphere_density_profile = DensityProfileFunctionType{Atmosphere}()

## Models
atmosphere_density_profile(::ModelName{:Homogeneous}, x::Real, y::Real, z::Real; ρ::Real = 1.225)::Real = ρ
Loading

0 comments on commit f4ff62f

Please sign in to comment.