mirror of
https://github.com/JuliaFEM/JuliaFEM.jl.git
synced 2026-09-07 03:36:23 +00:00
added test to save xdmf model to disk
This commit is contained in:
+10
-1
@@ -99,7 +99,7 @@ facts("test test data") do
|
||||
@fact string(xdoc) => testdata
|
||||
end
|
||||
|
||||
using JuliaFEM.xdmf: xdmf_new_model, xdmf_new_grid, xdmf_new_temporal_collection, xdmf_new_mesh, xdmf_new_field
|
||||
using JuliaFEM.xdmf: xdmf_new_model, xdmf_new_grid, xdmf_new_temporal_collection, xdmf_new_mesh, xdmf_new_field, xdmf_save_model
|
||||
|
||||
facts("test model write XML") do
|
||||
X = [0 0 0; 1 0 0; 0 1 0; 0 0 1]'
|
||||
@@ -122,3 +122,12 @@ facts("test that xdmf throws error when trying to add field not able to handle")
|
||||
temperature_field = ["56"] # strings not supported by xdmf
|
||||
@fact_throws xdmf_new_field(grid, "unknown field data", "elements", temperature_field)
|
||||
end
|
||||
|
||||
facts("test saving xdmf model") do
|
||||
xdoc, model = xdmf_new_model()
|
||||
# FIXME: xdoc here is just / of xml file, we're not interested of it but
|
||||
# xdmf_new_model returns it that we're able to save xml file.
|
||||
t = tempname()
|
||||
xdmf_save_model(xdoc, t)
|
||||
@fact isfile(t) => true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user