Skip to content

Example code and helpful functionality for the BYU Scientific Computing Course's semester long project

License

Notifications You must be signed in to change notification settings

BYUHPC/WaveSim.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WaveSim.jl

WaveSim.jl is a package that's meant to make life easier for students of BYU's Scientific Computing Course. It serves to make debugging some phases of the project easier, and is used as example and base code for others.

Install

Open the Julia package manager and run:

pkg> add https://github.com/BYUHPC/WaveSim.jl.git

WaveSim.jl can be removed with:

pkg> remove WaveSim

Usage Example

The WaveSim package can be used to interactively check your assignment output files--for example, given an input file in.wo, you can see if your C++ code compiled to wavesim_serial is correct, and figure out what's wrong if not:

shell> ./wavesim_serial in.wo out.wo

julia> using WaveSim

julia> wgood = WaveOrthotope(open("in.wo"));

julia> solve!(wgood)

julia> wtest = WaveOrthotope(open("out.wo"));

julia> if !isapprox(wgood, wtest)
           println("out.wo is incorrect")
           println("Damping coefficients: $(dampingcoef(wgood)), $(dampingcoef(wtest))")
           println("Simulation times:     $(simtime(wgood)), $(simtime(wtest))")
           println("Max u difference:     $(maximum(abs.(wgood.u - wtest.u))...)")
           println("Max v difference:     $(maximum(abs.(wgood.v - wtest.v))...)")
       end

Easy wavefiles.tar.gz Access

wavefiles.tar.gz is provided as a lazily loaded artifact. You can use the provided wavefiles function to access files therein:

small2din = WaveOrthotope(wavefiles(2, :small, :in)) # small-2d-in.wo
tiny3dout = WaveOrthotope(wavefiles("3d-tiny-out.wo"))
wavediffbinary = wavefiles("wavediff")

About

Example code and helpful functionality for the BYU Scientific Computing Course's semester long project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages