Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
termi-official authored Jan 17, 2024
1 parent 469fa43 commit 69b0456
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions test/test_microstructures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

ip_fsn = Lagrange{ref_shape, order}()^3
ip_geo = Lagrange{ref_shape, order}()^3
cv = CellValues(QuadratureRule{ref_shape}(1), ip_fsn, ip_geo)
cv = CellValues(QuadratureRule{ref_shape}(2), ip_fsn, ip_geo)

ring_grid = generate_ring_mesh(8,2,2)
ring_grid = generate_ring_mesh(20,2,2)
ring_cs = compute_midmyocardial_section_coordinate_system(ring_grid, ip_geo)
@testset "OrthotropicMicrostructureModel" begin
ms = create_simple_microstructure_model(ring_cs, ip_fsn, ip_geo,
Expand All @@ -21,16 +21,17 @@
for qp in QuadratureIterator(cv)
coords = getcoordinates(cellcache)
sc = spatial_coordinate(cv, qp, coords)
# If we set all angles to 0, then the generator on the ring simply generates sheetlets which point in positive z direction, where the normal point radially outwards.
ndir = Vec(sc[1:2]..., 0.)/norm(sc[1:2])
sdir = Vec(0., 0., 1.)
fdir = sdir × ndir
eval_cooef = evaluate_coefficient(ms, cellcache, qp, 0)
fdir_eval = eval_cooef[1]
sdir_eval = eval_cooef[2]
ndir_eval = eval_cooef[3]
@test fdir_eval fdir
@test sdir_eval sdir
@test ndir_eval ndir
@test fdir_eval fdir atol=1e-8
@test sdir_eval sdir atol=1e-8
@test ndir_eval ndir atol=1e-8
end
end
end
Expand Down

0 comments on commit 69b0456

Please sign in to comment.