89
89
90
90
# The methods below are specialized on the mortar type
91
91
# and called from the basic `create_cache` method at the top.
92
- function create_cache (mesh:: Union {TreeMesh{2 }, StructuredMesh{2 }, UnstructuredMesh2D,
93
- P4estMesh{2 }, P4estMeshView{2 }, T8codeMesh{2 }},
94
- equations, mortar_l2:: LobattoLegendreMortarL2 , uEltype)
92
+ function create_cache (mesh:: TreeMesh{2} , equations,
93
+ mortar_l2:: LobattoLegendreMortarL2 , uEltype)
95
94
# TODO : Taal performance using different types
96
- MA2d = MArray{Tuple{nvariables (equations), nnodes (mortar_l2)}, uEltype, 2 ,
95
+ MA2d = MArray{Tuple{nvariables (equations), nnodes (mortar_l2)},
96
+ uEltype, 2 ,
97
97
nvariables (equations) * nnodes (mortar_l2)}
98
98
fstar_primary_upper_threaded = MA2d[MA2d (undef) for _ in 1 : Threads. nthreads ()]
99
99
fstar_primary_lower_threaded = MA2d[MA2d (undef) for _ in 1 : Threads. nthreads ()]
@@ -104,8 +104,10 @@ function create_cache(mesh::Union{TreeMesh{2}, StructuredMesh{2}, UnstructuredMe
104
104
# fstar_upper_threaded = [A2d(undef, nvariables(equations), nnodes(mortar_l2)) for _ in 1:Threads.nthreads()]
105
105
# fstar_lower_threaded = [A2d(undef, nvariables(equations), nnodes(mortar_l2)) for _ in 1:Threads.nthreads()]
106
106
107
- (; fstar_primary_upper_threaded, fstar_primary_lower_threaded,
108
- fstar_secondary_upper_threaded, fstar_secondary_lower_threaded)
107
+ cache = (; fstar_primary_upper_threaded, fstar_primary_lower_threaded,
108
+ fstar_secondary_upper_threaded, fstar_secondary_lower_threaded)
109
+
110
+ return cache
109
111
end
110
112
111
113
# TODO : Taal discuss/refactor timer, allowing users to pass a custom timer?
0 commit comments