Skip to content

Commit

Permalink
Add 3/4
Browse files Browse the repository at this point in the history
  • Loading branch information
hkjeldsberg committed Oct 24, 2023
1 parent 755def5 commit 5982e2d
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions tests/test_pre_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,38 +73,38 @@ def test_mesh_model_with_one_inlet_and_two_outlets():
remove(output_file)


#
#
# def test_mesh_model_with_constant_edge_length():
# model_path = "tests/test_data/artery/artery.stl"
# # Get default input parameters
# common_input = read_command_line(model_path)
# common_input.update(dict(meshing_method="constant",
# edge_length=0.35,
# smoothing_method="laplace",
# refine_region=False,
# visualize=False,
# compress_mesh=False,
# outlet_flow_extension_length=1,
# inlet_flow_extension_length=1
# ))
#
# # Run pre processing
# run_pre_processing(**common_input)
#
# model_name = model_path.replace(".stl", "")
#
# # Check that output files exist
# output_files = [model_name + suffix for suffix in ['.vtu', '.xml', '_info.json', '_probe_point.json']]
# check_files(output_files)
#
# num_points = 6944
# num_cells = 38647
# check_mesh(output_files, num_points=num_points, num_cells=num_cells)
#
# # Remove output files
# for output_file in output_files:
# remove(output_file)
def test_mesh_model_with_constant_edge_length():
model_path = "tests/test_data/artery/artery.stl"
# Get default input parameters
common_input = read_command_line(model_path)
common_input.update(dict(meshing_method="constant",
edge_length=0.35,
smoothing_method="laplace",
refine_region=False,
visualize=False,
compress_mesh=False,
outlet_flow_extension_length=1,
inlet_flow_extension_length=1
))

# Run pre processing
run_pre_processing(**common_input)

model_name = model_path.replace(".stl", "")

# Check that output files exist
output_files = [model_name + suffix for suffix in ['.vtu', '.xml', '_info.json', '_probe_point.json']]
check_files(output_files)

num_points = 6944
num_cells = 38647
check_mesh(output_files, num_points=num_points, num_cells=num_cells)

# Remove output files
for output_file in output_files:
remove(output_file)


#
#
# def test_moving_domain_meshing():
Expand Down

0 comments on commit 5982e2d

Please sign in to comment.