From 953faddfa28cdc74242d882b82dcc9a4613b2d01 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Fri, 31 May 2024 17:22:17 +0000 Subject: [PATCH] build based on 76da65e --- dev/.documenter-siteinfo.json | 2 +- dev/api/index.html | 56 +++++++++++++++++------------------ dev/index.html | 2 +- dev/man/config/index.html | 6 ++-- dev/man/init/index.html | 2 +- dev/man/install/index.html | 2 +- dev/man/output/index.html | 8 ++--- dev/man/overview/index.html | 4 +-- dev/man/summary/index.html | 14 ++++----- 9 files changed, 48 insertions(+), 48 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index d8e0570..f3e52d2 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-14T01:42:04","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.3","generation_timestamp":"2024-05-31T17:22:12","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 0be2904..6302c7b 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,5 +1,5 @@ -API · UltraDark.jl

API

Index

Docstrings

UltraDark.GridsType
struct Grids <: UltraDark.AbstractGrids
Grids(length, resol::Int)
+API · UltraDark.jl

API

Index

Docstrings

UltraDark.GridsType
struct Grids <: UltraDark.AbstractGrids
Grids(length, resol::Int)
 Grids(length_tuple, resol_tuple::Tuple{Int, Int, Int})

struct containing grids used in a simulation

Fields

  • x::Array{Float64, 3}: Array of x positions

  • y::Array{Float64, 3}: Array of y positions

  • z::Array{Float64, 3}: Array of z positions

  • kx::Array{Float64, 3}: Array of x Fourier modes

  • ky::Array{Float64, 3}: Array of y Fourier modes

  • kz::Array{Float64, 3}: Array of z Fourier modes

  • k::Array{Float64, 3}: Fourier space postition array

  • rkx::Array{Float64, 3}: Array of x Fourier modes for use with rfft

  • rky::Array{Float64, 3}: Array of y Fourier modes for use with rfft

  • rkz::Array{Float64, 3}: Array of z Fourier modes for use with rfft

  • rk::Array{Float64, 3}: Fourier space postition array for use with rfft

  • ψx::Array{ComplexF64, 3}: ψ field

  • ψk::Array{ComplexF64, 3}: ψ field in Fourier space

  • ρx::Array{Float64, 3}: density field ρ

  • ρk::Array{ComplexF64, 3}: density field ρ in Fourier space

  • Φx::Array{Float64, 3}: gravitational potential field Φ

  • Φk::Array{ComplexF64, 3}: gravitational potential field Φ in fourier space

  • fft_plan::Any: FFT plan for complex-to-complex transforms

  • rfft_plan::Any: FFT plan for real-to-complex transforms

  • k_vanish_indices::Vector{CartesianIndex{3}}: Indices at which k==0.0

  • rk_vanish_indices::Any: Indices at which rk==0.0

Examples

Create an empty grid with length length and resolution resol

julia> using UltraDark
 
 julia> length = 1;
@@ -14,7 +14,7 @@
 julia> Grids((1.0, 1.0, 0.5), (64, 64, 32));
 
 julia> size(ans.ψx)
-(64, 64, 32)
source
UltraDark.PencilGridsType
PencilGrids(length, resol)
 PencilGrids(length_tuple, resol_tuple::Tuple{Int, Int, Int})

struct containing grids used in a simulation

Each grid is a PencilArray, allowing multiprocess FFTs. This comes with significant overhead so is only useful when running in a multi-node environment.

Fields

  • x::Array{Float64, 3}: Array of x positions

  • y::Array{Float64, 3}: Array of y positions

  • z::Array{Float64, 3}: Array of z positions

  • kx::Array{Float64, 3}: Array of x Fourier modes

  • ky::Array{Float64, 3}: Array of y Fourier modes

  • kz::Array{Float64, 3}: Array of z Fourier modes

  • k::Any: Fourier space postition array

  • rkx::Array{Float64, 3}: Array of x Fourier modes for use with rfft

  • rky::Array{Float64, 3}: Array of y Fourier modes for use with rfft

  • rkz::Array{Float64, 3}: Array of z Fourier modes for use with rfft

  • rk::Any: Fourier space postition array for use with rfft

  • ψx::Any: ψ field

  • ψk::Any: ψ field in Fourier space

  • ρx::Any: density field ρ

  • ρk::Any: density field ρ in Fourier space

  • Φx::Any: gravitational potential field Φ

  • Φk::Any: gravitational potential field Φ in fourier space

  • fft_plan::Any: FFT plan for complex-to-complex transforms

  • rfft_plan::Any: FFT plan for real-to-complex transforms

  • k_vanish_indices::Vector{CartesianIndex{3}}: Indices at which k==0.0

  • rk_vanish_indices::Any: Indices at which rk==0.0

  • MPI_COMM::Any: MPI communicator

Examples

Create an empty grid with length length and resolution resol. Uses PencilFFTs to create PencilArrays.

julia> using UltraDark
 
 julia> len = 1;
@@ -25,19 +25,19 @@
 

Create an empty length[1]xlength[2]xlength[3] grid with resolution resol[1]xresol[2]xresol[3].

julia> using UltraDark
 
 julia> PencilGrids((1.0, 1.0, 0.5), (64, 64, 32));
-
source
UltraDark.E_gravity_densityMethod
E_gravity_density(psi::Number, Phi::Real) -> Real
-

Gravitational energy density of field psi in gravitational potential Phi

source
UltraDark.E_totalMethod
E_total(grids; constants)
-

Total energy of the scalar field: the sum of the kinetic and quantum energies.

source
UltraDark.actual_time_stepMethod
actual_time_step(max_time_step, time_interval, time_step_options)

Actual size and number of time steps that should be taken if the maximum is max_time_step. No more than time_step_options.update_period steps should be taken, and they should fit in time_interval.

Examples

julia> using UltraDark: actual_time_step, TimeStepOptions
+
source
UltraDark.E_gravity_densityMethod
E_gravity_density(psi::Number, Phi::Real) -> Real
+

Gravitational energy density of field psi in gravitational potential Phi

source
UltraDark.E_totalMethod
E_total(grids; constants)
+

Total energy of the scalar field: the sum of the kinetic and quantum energies.

source
UltraDark.actual_time_stepMethod
actual_time_step(max_time_step, time_interval, time_step_options)

Actual size and number of time steps that should be taken if the maximum is max_time_step. No more than time_step_options.update_period steps should be taken, and they should fit in time_interval.

Examples

julia> using UltraDark: actual_time_step, TimeStepOptions
 
 julia> actual_time_step(0.11, 1, TimeStepOptions())
-(0.1, 10)
source
UltraDark.add_external_potential!Method
add_external_potential!(t, grids, constants)

Add a gravitational potential to the grid. By default this does nothing, but can be overridden in multiple dispatch.

source
UltraDark.angular_momentumMethod
angular_momentum(grids)
-angular_momentum(grids, ψx, ρx)

Calculate total angular momentum

Returns

L: AbstractArray with length 3

source
UltraDark.angular_momentum_densityMethod
angular_momentum_density(grids)
-angular_momentum_density(grids, ψx, ρx)

Calculate angular momentum density at each grid point

Returns

L: AbstractArray with dimensions 3 x resolx x resoly x resol_z

source
UltraDark.auxiliary_step!Method
auxiliary_step!(Δt, grids, t, constants)
-auxiliary_step!(Δt, grids, t, constants, s; a = 1.0)

Do an auxiliary inner step. By default this does nothing, but can be overridden in multiple dispatch.

source
UltraDark.add_external_potential!Method
add_external_potential!(t, grids, constants)

Add a gravitational potential to the grid. By default this does nothing, but can be overridden in multiple dispatch.

source
UltraDark.angular_momentumMethod
angular_momentum(grids)
+angular_momentum(grids, ψx, ρx)

Calculate total angular momentum

Returns

L: AbstractArray with length 3

source
UltraDark.angular_momentum_densityMethod
angular_momentum_density(grids)
+angular_momentum_density(grids, ψx, ρx)

Calculate angular momentum density at each grid point

Returns

L: AbstractArray with dimensions 3 x resolx x resoly x resol_z

source
UltraDark.auxiliary_step!Method
auxiliary_step!(Δt, grids, t, constants)
+auxiliary_step!(Δt, grids, t, constants, s; a = 1.0)

Do an auxiliary inner step. By default this does nothing, but can be overridden in multiple dispatch.

source
UltraDark.azimuthal_angleMethod
azimuthal_angle(x, y, z)
 azimuthal_angle(grids)
-azimuthal_angle(grids, r0)

Calculate the azimuthal angle in spherical or cylindrical coordinates

This is \phi in conventional physics notation.

source
UltraDark.dVMethod
dV(grids) -> Any
+azimuthal_angle(grids, r0)

Calculate the azimuthal angle in spherical or cylindrical coordinates

This is \phi in conventional physics notation.

source
UltraDark.dVMethod
dV(grids) -> Any
 

Calculate the volume of each grid cell

Examples

julia> using UltraDark
 
 julia> box_length = 1.0;
@@ -47,7 +47,7 @@
 julia> g = Grids(box_length, resol);
 
 julia> dV(g) * resol^3 == box_length^3
-true
source
UltraDark.evolve_to!Method
evolve_to!(
     t_start,
     t_end,
     grids,
@@ -56,9 +56,9 @@
     constants,
     external_states
 ) -> Any
-

Evolve grids forward from t_start to t_end

source
UltraDark.inner_step!Method
inner_step!(Δt, grids, constants; a=1.0)
-inner_step!(Δt, grids, constants, s; a=1.0)

Perform the "inner" time step in the symmetrized split-step Fourier method.

This step applies the diffusion terms and updates the gravitational potential.

source
UltraDark.inner_step!Method
inner_step!(Δt, grids, constants; a=1.0)
+inner_step!(Δt, grids, constants, s; a=1.0)

Perform the "inner" time step in the symmetrized split-step Fourier method.

This step applies the diffusion terms and updates the gravitational potential.

source
UltraDark.k_vecMethod
k_vec(
     lengths,
     resols
 ) -> Tuple{AbstractFFTs.Frequencies, AbstractFFTs.Frequencies, AbstractFFTs.Frequencies}
@@ -71,7 +71,7 @@
   0.0
   1.0
  -2.0
- -1.0
source
UltraDark.massMethod
mass(grids)
 mass(grids, rho)

Calculate total mass of a density field

Examples

julia> using UltraDark
 
 julia> g = Grids(1.0, 16);
@@ -81,11 +81,11 @@
 julia> g.ρx[1, 1, 1] = 1.0;
 
 julia> UltraDark.mass(g) == 1.0 * (1.0 / 16)^3
-true
source
UltraDark.max_normed_phase_diffMethod
normed_max_phase_grad(grids)

Compute maximum phase gradient of a grid

Normalised to ignore large gradients in regions with low density. These tend to be anomalous.

source
UltraDark.max_time_stepMethod
max_time_step(grids, a, external_states)

Consolidate the maximum time step implied by grids and each member of external_states.

source
UltraDark.max_time_step_gridsMethod
max_time_step_grids(grids, a)
-max_time_step_grids(grids::PencilGrids, a)

Calculate an upper bound on the time step from grid properties

This time step depends on the gravitational potential and the resolution.

source
UltraDark.outer_step!Method
outer_step!(Δt, grids, constants; a=1.0)
-outer_step!(Δt, grids, constants, s; a=1.0)

Perform the "outer" time step in the symmetrized split-step Fourier method.

This step only updates the phase of ψ applying accelerations due to gravity, the amplitude is not changed.

source
UltraDark.phase_diffMethod
phase_diff(field, dir)

Compute point-to-point difference of phase on a grid along a direction

Returns an array of size (size(field)[1], size(field)[2], size(field)[3]) containing differences in direction dir.

source
UltraDark.phase_diffMethod
phase_diff(field::PencilArray, dir)

Compute point-to-point difference of phase on a grid along a direction

Returns an array of size (size(field)[1], size(field)[2], size(field)[3]) containing differences in direction dir.

source
UltraDark.max_normed_phase_diffMethod
normed_max_phase_grad(grids)

Compute maximum phase gradient of a grid

Normalised to ignore large gradients in regions with low density. These tend to be anomalous.

source
UltraDark.max_time_stepMethod
max_time_step(grids, a, external_states)

Consolidate the maximum time step implied by grids and each member of external_states.

source
UltraDark.max_time_step_gridsMethod
max_time_step_grids(grids, a)
+max_time_step_grids(grids::PencilGrids, a)

Calculate an upper bound on the time step from grid properties

This time step depends on the gravitational potential and the resolution.

source
UltraDark.outer_step!Method
outer_step!(Δt, grids, constants; a=1.0)
+outer_step!(Δt, grids, constants, s; a=1.0)

Perform the "outer" time step in the symmetrized split-step Fourier method.

This step only updates the phase of ψ applying accelerations due to gravity, the amplitude is not changed.

source
UltraDark.phase_diffMethod
phase_diff(field, dir)

Compute point-to-point difference of phase on a grid along a direction

Returns an array of size (size(field)[1], size(field)[2], size(field)[3]) containing differences in direction dir.

source
UltraDark.phase_diffMethod
phase_diff(field::PencilArray, dir)

Compute point-to-point difference of phase on a grid along a direction

Returns an array of size (size(field)[1], size(field)[2], size(field)[3]) containing differences in direction dir.

source
UltraDark.polar_angleMethod
polar_angle(x, y, z)
 polar_angle(grids)
-polar_angle(grids, r0)

Calculate the polar angle in spherical coordinates

This is \theta in conventional physics notation.

source
UltraDark.radius_cylindricalMethod
radius_cylindrical(x, y, z)
+polar_angle(grids, r0)

Calculate the polar angle in spherical coordinates

This is \theta in conventional physics notation.

source
UltraDark.radius_cylindricalMethod
radius_cylindrical(x, y, z)
 radius_cylindrical(grids)
 radius_cylindrical(grids, r0)

Calculate the radial coordinate in cylindrical coordinates

Examples

julia> using UltraDark
 
@@ -104,7 +104,7 @@
            radius_cylindrical(g, (0.0, 0.0, 1.0)) .* cos.(azimuthal_angle(g, (0.0, 0.0, 1.0))) .≈
            g.x,
        )
-true
source
UltraDark.radius_sphericalMethod
radius_spherical(x, y, z)
 radius_spherical(grids)
 radius_spherical(grids, r0)

Calculate the radial coordinate in a spherical coordinate system

Examples

julia> using UltraDark
 
@@ -123,13 +123,13 @@
            radius_spherical(g, (1.0, 0.0, 0.0)) .* sin.(polar_angle(g, (1.0, 0.0, 0.0))) .*
            cos.(azimuthal_angle(g, (1.0, 0.0, 0.0))) .+ 1.0 .≈ g.x,
        )
-true
source
UltraDark.rk_vecMethod
rk_vec(
     lengths,
     resols
 ) -> Tuple{AbstractFFTs.Frequencies, AbstractFFTs.Frequencies, AbstractFFTs.Frequencies}
-
source
UltraDark.simulate!Method
simulate!(grids, output_config::OutputConfig; constants = nothing, external_states = (),)
-simulate!(grids, sim_config, output_config::OutputConfig; constants = nothing, external_states = (),)

simulate! is the main entry point into a simulation

simulate! evolves grids and external_states forward, writing output as specified by output_config.

Arguments

grids::AbstractGrids Contains coordinate systems and the scalar field ψ.

sim_config::UltraDark.Config gives further control over the way the simulation is done.

output_config::OutputConfig controls what output is written and when.

constants::Any can be used to overload other functions in the evolution, for example to introduce self-interactions.

external_states::Tuple{Any} can be used in combination with overloading to add other dynamical objects to a simulation.

source
UltraDark.take_steps!Method

Take n steps with time step Δt

Examples

julia> using UltraDark: take_steps!, Grids, OutputConfig, Config
+
source
UltraDark.simulate!Method
simulate!(grids, output_config::OutputConfig; constants = nothing, external_states = (),)
+simulate!(grids, sim_config, output_config::OutputConfig; constants = nothing, external_states = (),)

simulate! is the main entry point into a simulation

simulate! evolves grids and external_states forward, writing output as specified by output_config.

Arguments

grids::AbstractGrids Contains coordinate systems and the scalar field ψ.

sim_config::UltraDark.Config gives further control over the way the simulation is done.

output_config::OutputConfig controls what output is written and when.

constants::Any can be used to overload other functions in the evolution, for example to introduce self-interactions.

external_states::Tuple{Any} can be used in combination with overloading to add other dynamical objects to a simulation.

source
UltraDark.take_steps!Method

Take n steps with time step Δt

Examples

julia> using UltraDark: take_steps!, Grids, OutputConfig, Config
 
 julia> take_steps!(
            Grids(1.0, 16),
@@ -141,5 +141,5 @@
            nothing,
            (),
        )
-5.0
source
UltraDark.update_gravitational_potential!Method
update_gravitational_potential!(grids; a = 1.0)
-update_gravitational_potential!(grids, constants; a = 1.0)

Update density grids.ρx and the gravitational potential grids.Φx based on grids.ψx

source
+5.0
source
UltraDark.update_gravitational_potential!Method
update_gravitational_potential!(grids; a = 1.0)
+update_gravitational_potential!(grids, constants; a = 1.0)

Update density grids.ρx and the gravitational potential grids.Φx based on grids.ψx

source
diff --git a/dev/index.html b/dev/index.html index a8bb950..c679d3f 100644 --- a/dev/index.html +++ b/dev/index.html @@ -9,4 +9,4 @@ + diff --git a/dev/man/config/index.html b/dev/man/config/index.html index 7191138..4d95bb9 100644 --- a/dev/man/config/index.html +++ b/dev/man/config/index.html @@ -1,6 +1,6 @@ -Simulation Configuration · UltraDark.jl

Simulation Configuration

UltraDark.Config.TimeStepOptionsType
struct TimeStepOptions

struct containing options controlling the size and calculation of time steps.

See also: SimulationConfig

Examples

julia> using UltraDark
+Simulation Configuration · UltraDark.jl

Simulation Configuration

UltraDark.Config.TimeStepOptionsType
struct TimeStepOptions

struct containing options controlling the size and calculation of time steps.

See also: SimulationConfig

Examples

julia> using UltraDark
 
 julia> TimeStepOptions()
-TimeStepOptions(10, 1.0)

Fields

  • update_period::Int64: controls how many steps are taken before the timestep is updated

  • multiplier::Float64: multiplies the calculated maximum time step by a constant

source
+TimeStepOptions(10, 1.0)

Fields

  • update_period::Int64: controls how many steps are taken before the timestep is updated

  • multiplier::Float64: multiplies the calculated maximum time step by a constant

source
diff --git a/dev/man/init/index.html b/dev/man/init/index.html index 4ed9448..068aa18 100644 --- a/dev/man/init/index.html +++ b/dev/man/init/index.html @@ -22,4 +22,4 @@ # output -truesource +truesource diff --git a/dev/man/install/index.html b/dev/man/install/index.html index dd0143f..8773143 100644 --- a/dev/man/install/index.html +++ b/dev/man/install/index.html @@ -3,4 +3,4 @@ pkg> dev UltraDark.jl -pkg> test UltraDark

This may take a while to run. There are a lot of packages to compile and some of the tests are of real simulations.

If the tests succeed, you're all set!

Next, check out the overview or to jump to running the example notebooks in IJulia.

+pkg> test UltraDark

This may take a while to run. There are a lot of packages to compile and some of the tests are of real simulations.

If the tests succeed, you're all set!

Next, check out the overview or to jump to running the example notebooks in IJulia.

diff --git a/dev/man/output/index.html b/dev/man/output/index.html index cd96e3f..57da91d 100644 --- a/dev/man/output/index.html +++ b/dev/man/output/index.html @@ -1,5 +1,5 @@ -Output Configuration · UltraDark.jl

Output Configuration

UltraDark.Output.OutputConfigType
struct OutputConfig

struct containing information about what to output.

There are two possible output formats:

  • .npy files that use numpy's format. They can be read with NPZ.
  • HDF5 files that can be read with HDF5.

Each member of summary_statistics should be another struct whose constructor generates summary statistics from t, a, Δt and a grids object. If it is to be used with a PencilGrids object, each field must be concrete and have a binary representation that MPI can handle.

By default, summary_statistics will write only the wall time and simulation time.

Fields

  • directory::String: where to write output

  • output_times::Array{Float64}: times at which to output

  • box::Bool: whether to output boxes

  • slice::Bool: whether to output slices

  • psi::Bool: whether to output ψ

  • rho::Bool: whether to output ρ

  • npy::Bool: write .npy files

  • h5::Bool: write HDF5 files

  • summary_statistics::Tuple: Type of summary statistics to collect

source
UltraDark.Output.OutputConfigMethod
OutputConfig(
+Output Configuration · UltraDark.jl

Output Configuration

UltraDark.Output.OutputConfigType
struct OutputConfig

struct containing information about what to output.

There are two possible output formats:

  • .npy files that use numpy's format. They can be read with NPZ.
  • HDF5 files that can be read with HDF5.

Each member of summary_statistics should be another struct whose constructor generates summary statistics from t, a, Δt and a grids object. If it is to be used with a PencilGrids object, each field must be concrete and have a binary representation that MPI can handle.

By default, summary_statistics will write only the wall time and simulation time.

Fields

  • directory::String: where to write output

  • output_times::Array{Float64}: times at which to output

  • box::Bool: whether to output boxes

  • slice::Bool: whether to output slices

  • psi::Bool: whether to output ψ

  • rho::Bool: whether to output ρ

  • npy::Bool: write .npy files

  • h5::Bool: write HDF5 files

  • summary_statistics::Tuple: Type of summary statistics to collect

source
UltraDark.Output.OutputConfigMethod
OutputConfig(
     directory,
     output_times;
     box,
@@ -10,11 +10,11 @@
     h5,
     summary_statistics
 ) -> OutputConfig
-

Construct an OutputConfig object

source
UltraDark.Output.output_external_stateMethod
output_external_state(
     external_state,
     output_config::OutputConfig,
     step,
     index
 )
-

Output states other than the ψ field.

By default this does nothing. It is most useful if overloaded to dispatch on the type of external_state.

Arguments

external_state

output_config::OutputConfig

step

index index of state in external states

source
+

Output states other than the ψ field.

By default this does nothing. It is most useful if overloaded to dispatch on the type of external_state.

Arguments

external_state

output_config::OutputConfig

step

index index of state in external states

source
diff --git a/dev/man/overview/index.html b/dev/man/overview/index.html index b6dcf70..a42a236 100644 --- a/dev/man/overview/index.html +++ b/dev/man/overview/index.html @@ -18,7 +18,7 @@ [ Info: Reached time 1.0 [ Info: Reached time 1.5000000000000009 [ Info: Reached time 2.0 - 4.077440 seconds (40.20 k allocations: 746.612 MiB, 6.25% gc time, 0.93% compilation time)

We initialised the soliton with a nonzero velocity. Let's check if the soliton moved during the simulation.

argmax(grids.ρx)
CartesianIndex(45, 32, 32)

Yes, it did – the maximum is now at a different location.

We can also check this by loading output files from output_dir and plotting them.

using CairoMakie
+  3.835580 seconds (40.20 k allocations: 746.612 MiB, 0.40% gc time, 0.96% compilation time)

We initialised the soliton with a nonzero velocity. Let's check if the soliton moved during the simulation.

argmax(grids.ρx)
CartesianIndex(45, 33, 33)

Yes, it did – the maximum is now at a different location.

We can also check this by loading output files from output_dir and plotting them.

using CairoMakie
 using LaTeXStrings
 using NPZ
 
@@ -29,4 +29,4 @@
     ax = Axis(fig[1, i], title=L"$t = %$(output_times[t_index])$", aspect=DataAspect())
     heatmap!(grids.x[:, 1, 1], grids.y[1, :, 1], rho[:, :, Int(resol//2)])
 end
-fig

After understanding this overview you may want to browse the example notebooks to see more complex simulations and analysis.

Please open an issue if you run into problems or have feature requests.

+fig

After understanding this overview you may want to browse the example notebooks to see more complex simulations and analysis.

Please open an issue if you run into problems or have feature requests.

diff --git a/dev/man/summary/index.html b/dev/man/summary/index.html index e00c529..a9f4f65 100644 --- a/dev/man/summary/index.html +++ b/dev/man/summary/index.html @@ -5,25 +5,25 @@ ρx_min = minimum(grids.ρx) MinDensity(ρx_max) -end
MaxDensity (generic function with 1 method)

Passing this object into a simulation will add a column to $output_path/summary.csv containing the single value contained by MinDensity.

More complex statistics are also possible.

Docstrings

UltraDark.SummaryModule
Summary

The Summary module contains utilities for computing and outputting summary statistics at each time step.

source
UltraDark.Summary.AngularMomentumType
struct AngularMomentum

Total angular momentum in each of 3 directions

Examples

A stationary field has no angular momentum

```jldoctest julia> using UltraDark

julia> g = Grids(1.0, 16);

julia> g.ψx .= 1;

julia> Summary.AngularMomentum(0., 1., 1e-1, g, nothing) UltraDark.Summary.AngularMomentum(0.0, 0.0, 0.0)

Fields

  • Lx::Float64

  • Ly::Float64

  • Lz::Float64

source
UltraDark.Summary.EnergyGravityType
struct EnergyGravity

Gravitational potential energy

Fields

  • E_grav::Float64
source
UltraDark.Summary.EnergyKineticQuantumType
struct EnergyKineticQuantum

Gravitational potential energy

Fields

  • E_kq::Float64
source
UltraDark.Summary.MaxDensityType
struct MaxDensity

Fields

  • ρx_max::Float64: max of density
source
UltraDark.Summary.MaxDensityIndexType
struct MaxDensityIndex

This struct contains 4 useful pieces of information: the maxiumum value and three indices. Each is output to a summary.

Fields

  • ρx_max::Float64: max of density

  • max_index_x::Int32: x index of max density

  • max_index_y::Int32: y index of max density

  • max_index_z::Int32: z index of max density

source
UltraDark.Summary.MeanDensityType
struct MeanDensity

Summary statistic containing the mean density and the number of cells over which it was calculated.

Examples

julia> using UltraDark
+end
MaxDensity (generic function with 1 method)

Passing this object into a simulation will add a column to $output_path/summary.csv containing the single value contained by MinDensity.

More complex statistics are also possible.

Docstrings

UltraDark.SummaryModule
Summary

The Summary module contains utilities for computing and outputting summary statistics at each time step.

source
UltraDark.Summary.AngularMomentumType
struct AngularMomentum

Total angular momentum in each of 3 directions

Examples

A stationary field has no angular momentum

```jldoctest julia> using UltraDark

julia> g = Grids(1.0, 16);

julia> g.ψx .= 1;

julia> Summary.AngularMomentum(0., 1., 1e-1, g, nothing) UltraDark.Summary.AngularMomentum(0.0, 0.0, 0.0)

Fields

  • Lx::Float64

  • Ly::Float64

  • Lz::Float64

source
UltraDark.Summary.MaxDensityIndexType
struct MaxDensityIndex

This struct contains 4 useful pieces of information: the maxiumum value and three indices. Each is output to a summary.

Fields

  • ρx_max::Float64: max of density

  • max_index_x::Int32: x index of max density

  • max_index_y::Int32: y index of max density

  • max_index_z::Int32: z index of max density

source
UltraDark.Summary.MeanDensityType
struct MeanDensity

Summary statistic containing the mean density and the number of cells over which it was calculated.

Examples

julia> using UltraDark
 
 julia> g = Grids(1.0, 16);
 
 julia> Summary.MeanDensity(g)
-UltraDark.Summary.MeanDensity(0.0, 4096)

Fields

  • ρx_mean::Float64: mean of density

  • n::Int64: number of grid points summarized

source
UltraDark.Summary.TotalMassType
struct TotalMass

Total mass on a grid

Examples

julia> using UltraDark
+UltraDark.Summary.MeanDensity(0.0, 4096)

Fields

  • ρx_mean::Float64: mean of density

  • n::Int64: number of grid points summarized

source
UltraDark.Summary.TotalMassType
struct TotalMass

Total mass on a grid

Examples

julia> using UltraDark
 
 julia> g = Grids(1.0, 16);
 
 julia> Summary.TotalMass(0.0, 1.0, 1e-1, g, nothing, ())
 UltraDark.Summary.TotalMass(0.0)
-

Fields

  • mass::Float64
source
UltraDark.Summary.WallTimeType
struct WallTime

The current time in the real world.

Examples

WallTime created after another contains a later time.

julia> using UltraDark
+

Fields

  • mass::Float64
source
UltraDark.Summary.WallTimeType
struct WallTime

The current time in the real world.

Examples

WallTime created after another contains a later time.

julia> using UltraDark
 
 julia> t1 = Summary.WallTime();
 
 julia> t2 = Summary.WallTime(0.0, 1.0, 1e-1, Grids(1.0, 16), nothing, ());
 
 julia> t1.date <= t2.date
-true

Fields

  • date::Dates.DateTime: wall time
source
UltraDark.Summary.column_titleMethod
column_title(summary_struct)

Get column title

Assumes that the desired column title is the name of the first field. This can be refined for other structs by defining a specialization for the given datatype.

Note that the input argument is of type Val{T}, so that one can dispatch on T.

source
UltraDark.Summary.get_relevant_dataMethod
get_relevant_data(summary_struct)

Format column entry as string

By default, assumes that the desired data is in the first field of the struct. This can be refined for other structs by defining a specialization for the given datatype and returning a comma separated string.

source
UltraDark.Summary.column_titleMethod
column_title(summary_struct)

Get column title

Assumes that the desired column title is the name of the first field. This can be refined for other structs by defining a specialization for the given datatype.

Note that the input argument is of type Val{T}, so that one can dispatch on T.

source
UltraDark.Summary.get_relevant_dataMethod
get_relevant_data(summary_struct)

Format column entry as string

By default, assumes that the desired data is in the first field of the struct. This can be refined for other structs by defining a specialization for the given datatype and returning a comma separated string.

source
UltraDark.Summary.output_summary_headerMethod
output_summary_header(output_config) -> Int64
-

Write a header for a summary file

The header contains labels for each column of the summary CSV file. This function overwrites the current contents of the file.

source
UltraDark.Summary.output_summary_headerMethod
output_summary_header(output_config) -> Int64
+

Write a header for a summary file

The header contains labels for each column of the summary CSV file. This function overwrites the current contents of the file.

source
+

Write a new row to the summary file

source
UltraDark.Summary.pool_summarystatMethod
pool_summarystat(S1::MaxDensity, S2::MaxDensity)

MPI reduction operator for max density

source
UltraDark.Summary.pool_summarystatMethod
pool_summarystat(S1::MaxDensity, S2::MaxDensity)

MPI reduction operator for max density index

source
UltraDark.Summary.pool_summarystatMethod
pool_summarystat(S1::MeanDensity, S2::MeanDensity)

MPI reduction operator for mean density

source
UltraDark.Summary.pool_summarystatMethod
pool_summarystat(S1::RmsDensityContrast, S2::RmsDensityContrast)

MPI reduction operator for summary statistics.

source
UltraDark.Summary.pool_summarystatMethod
pool_summarystat(S1::ScaleFactor, S2::ScaleFactor)

MPI reduction operator for scale factor

Check that scale factors are equal and return

source
UltraDark.Summary.pool_summarystatMethod
pool_summarystat(S1::SimulationTime, S2::SimulationTime)

MPI reduction operator for simulation time

Check that times are equal and return

source
UltraDark.Summary.pool_summarystatMethod
pool_summarystat(S1::TimeStep, S2::TimeStep)

MPI reduction operator for scale factor

Check that scale factors are equal and return

source
UltraDark.Summary.pool_summarystatMethod
pool_summarystat(S1::WallTime, S2::WallTime)

MPI reduction operator for wall time

Return the time of the first argument.

source