-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Included export inside
@threads
loop
- Loading branch information
1 parent
7d897bd
commit 82411cb
Showing
12 changed files
with
144 additions
and
79 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,55 @@ | ||
@testitem "ExportOptions" begin | ||
@testitem "ExportOptions BBVerletStorage" begin | ||
o = Dict{Symbol,Any}(:path => "rootpath", :freq => 10) | ||
eo = Peridynamics.get_export_options(BBMaterial, o) | ||
eo = Peridynamics.get_export_options(Peridynamics.BBVerletStorage, o) | ||
@test eo.exportflag == true | ||
@test eo.root == "rootpath" | ||
@test eo.vtk == joinpath("rootpath", "vtk") | ||
@test eo.logfile == joinpath("rootpath", "logfile.log") | ||
@test eo.freq == 10 | ||
@test eo.fields == (:displacement, :damage) | ||
@test eo.fields == ((:displacement, Matrix{Float64}), (:damage, Vector{Float64})) | ||
|
||
o = Dict{Symbol,Any}(:path => "rootpath") | ||
eo = Peridynamics.get_export_options(BBMaterial, o) | ||
eo = Peridynamics.get_export_options(Peridynamics.BBVerletStorage, o) | ||
@test eo.exportflag == true | ||
@test eo.root == "rootpath" | ||
@test eo.vtk == joinpath("rootpath", "vtk") | ||
@test eo.logfile == joinpath("rootpath", "logfile.log") | ||
@test eo.freq == 10 | ||
@test eo.fields == (:displacement, :damage) | ||
@test eo.fields == ((:displacement, Matrix{Float64}), (:damage, Vector{Float64})) | ||
|
||
o = Dict{Symbol,Any}(:freq => 10) | ||
msg = "if `freq` is spedified, the keyword `path` is also needed!\n" | ||
@test_throws ArgumentError(msg) Peridynamics.get_export_options(BBMaterial, o) | ||
@test_throws ArgumentError(msg) begin | ||
Peridynamics.get_export_options(Peridynamics.BBVerletStorage, o) | ||
end | ||
|
||
o = Dict{Symbol,Any}() | ||
eo = Peridynamics.get_export_options(BBMaterial, o) | ||
eo = Peridynamics.get_export_options(Peridynamics.BBVerletStorage, o) | ||
@test eo.exportflag == false | ||
@test eo.root == "" | ||
@test eo.vtk == "" | ||
@test eo.logfile == "" | ||
@test eo.freq == 0 | ||
@test eo.fields == NTuple{0,Symbol}() | ||
@test eo.fields == NTuple{0,Tuple{Symbol,DataType}}() | ||
|
||
o = Dict{Symbol,Any}(:path => "rootpath", :freq => -10) | ||
msg = "`freq` should be larger than zero!\n" | ||
@test_throws ArgumentError(msg) Peridynamics.get_export_options(BBMaterial, o) | ||
@test_throws ArgumentError(msg) begin | ||
Peridynamics.get_export_options(Peridynamics.BBVerletStorage, o) | ||
end | ||
|
||
o = Dict{Symbol,Any}(:path => "rootpath", :write => (:displacement, :damage, :b_int)) | ||
eo = Peridynamics.get_export_options(BBMaterial, o) | ||
eo = Peridynamics.get_export_options(Peridynamics.BBVerletStorage, o) | ||
@test eo.exportflag == true | ||
@test eo.root == "rootpath" | ||
@test eo.vtk == joinpath("rootpath", "vtk") | ||
@test eo.logfile == joinpath("rootpath", "logfile.log") | ||
@test eo.freq == 10 | ||
@test eo.fields == (:displacement, :damage, :b_int) | ||
@test eo.fields == ((:displacement, Matrix{Float64}), | ||
(:damage, Vector{Float64}), | ||
(:b_int, Matrix{Float64})) | ||
end | ||
|
||
@testitem "export_results" begin | ||
|
||
end |
Oops, something went wrong.