Skip to content

Commit 56b1056

Browse files
committed
fixed more functions that needed dependency on assembly grid
1 parent f1d720c commit 56b1056

2 files changed

Lines changed: 21 additions & 21 deletions

File tree

src/fedefs/h1v_br.jl

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ function get_basis(AT::Type{ON_CELLS}, FEType::Type{H1BR{2}}, EG::Type{<:Quadril
148148
end
149149
end
150150

151-
function get_coefficients(::Type{ON_CELLS}, FE::FESpace{Tv, Ti, H1BR{2}, APT}, ::Type{<:Triangle2D}) where {Tv, Ti, APT}
152-
xFaceNormals::Array{Tv, 2} = FE.dofgrid[FaceNormals]
153-
xCellFaces = FE.dofgrid[CellFaces]
151+
function get_coefficients(::Type{ON_CELLS}, FE::FESpace{Tv, Ti, H1BR{2}, APT}, ::Type{<:Triangle2D}, xgrid) where {Tv, Ti, APT}
152+
xFaceNormals::Array{Tv, 2} = xgrid[FaceNormals]
153+
xCellFaces = xgrid[CellFaces]
154154
return function closure(coefficients::Array{<:Real, 2}, cell)
155155
fill!(coefficients, 1.0)
156156
coefficients[1, 7] = xFaceNormals[1, xCellFaces[1, cell]]
@@ -162,9 +162,9 @@ function get_coefficients(::Type{ON_CELLS}, FE::FESpace{Tv, Ti, H1BR{2}, APT}, :
162162
end
163163
end
164164

165-
function get_coefficients(::Type{ON_CELLS}, FE::FESpace{Tv, Ti, H1BR{2}, APT}, ::Type{<:Quadrilateral2D}) where {Tv, Ti, APT}
166-
xFaceNormals::Array{Tv, 2} = FE.dofgrid[FaceNormals]
167-
xCellFaces = FE.dofgrid[CellFaces]
165+
function get_coefficients(::Type{ON_CELLS}, FE::FESpace{Tv, Ti, H1BR{2}, APT}, ::Type{<:Quadrilateral2D}, xgrid) where {Tv, Ti, APT}
166+
xFaceNormals::Array{Tv, 2} = xgrid[FaceNormals]
167+
xCellFaces = xgrid[CellFaces]
168168
return function closure(coefficients::Array{<:Real, 2}, cell)
169169
fill!(coefficients, 1.0)
170170
coefficients[1, 9] = xFaceNormals[1, xCellFaces[1, cell]]
@@ -178,8 +178,8 @@ function get_coefficients(::Type{ON_CELLS}, FE::FESpace{Tv, Ti, H1BR{2}, APT}, :
178178
end
179179
end
180180

181-
function get_coefficients(::Type{<:ON_FACES}, FE::FESpace{Tv, Ti, H1BR{2}, APT}, ::Type{<:Edge1D}) where {Tv, Ti, APT}
182-
xFaceNormals::Array{Tv, 2} = FE.dofgrid[FaceNormals]
181+
function get_coefficients(::Type{<:ON_FACES}, FE::FESpace{Tv, Ti, H1BR{2}, APT}, ::Type{<:Edge1D}, xgrid) where {Tv, Ti, APT}
182+
xFaceNormals::Array{Tv, 2} = xgrid[FaceNormals]
183183
return function closure(coefficients::Array{<:Real, 2}, face)
184184
# multiplication of face bubble with normal vector of face
185185
fill!(coefficients, 1.0)
@@ -253,9 +253,9 @@ function get_basis(AT::Type{ON_CELLS}, ::Type{H1BR{3}}, EG::Type{<:Hexahedron3D}
253253
end
254254

255255

256-
function get_coefficients(::Type{ON_CELLS}, FE::FESpace{Tv, Ti, H1BR{3}, APT}, ::Type{<:Tetrahedron3D}) where {Tv, Ti, APT}
257-
xFaceNormals::Array{Tv, 2} = FE.dofgrid[FaceNormals]
258-
xCellFaces::Adjacency{Ti} = FE.dofgrid[CellFaces]
256+
function get_coefficients(::Type{ON_CELLS}, FE::FESpace{Tv, Ti, H1BR{3}, APT}, ::Type{<:Tetrahedron3D}, xgrid) where {Tv, Ti, APT}
257+
xFaceNormals::Array{Tv, 2} = xgrid[FaceNormals]
258+
xCellFaces::Adjacency{Ti} = xgrid[CellFaces]
259259
return function closure(coefficients::Array{<:Real, 2}, cell)
260260
# multiplication with normal vectors
261261
fill!(coefficients, 1.0)
@@ -276,8 +276,8 @@ function get_coefficients(::Type{ON_CELLS}, FE::FESpace{Tv, Ti, H1BR{3}, APT}, :
276276
end
277277

278278

279-
function get_coefficients(::Type{<:ON_FACES}, FE::FESpace{Tv, Ti, H1BR{3}, APT}, ::Type{<:Triangle2D}) where {Tv, Ti, APT}
280-
xFaceNormals::Array{Tv, 2} = FE.dofgrid[FaceNormals]
279+
function get_coefficients(::Type{<:ON_FACES}, FE::FESpace{Tv, Ti, H1BR{3}, APT}, ::Type{<:Triangle2D}, xgrid) where {Tv, Ti, APT}
280+
xFaceNormals::Array{Tv, 2} = xgrid[FaceNormals]
281281
return function closure(coefficients::Array{<:Real, 2}, face)
282282
# multiplication of face bubble with normal vector of face
283283
fill!(coefficients, 1.0)
@@ -287,9 +287,9 @@ function get_coefficients(::Type{<:ON_FACES}, FE::FESpace{Tv, Ti, H1BR{3}, APT},
287287
end
288288
end
289289

290-
function get_coefficients(::Type{ON_CELLS}, FE::FESpace{Tv, Ti, H1BR{3}, APT}, ::Type{<:Hexahedron3D}) where {Tv, Ti, APT}
291-
xFaceNormals::Array{Tv, 2} = FE.dofgrid[FaceNormals]
292-
xCellFaces::Adjacency{Ti} = FE.dofgrid[CellFaces]
290+
function get_coefficients(::Type{ON_CELLS}, FE::FESpace{Tv, Ti, H1BR{3}, APT}, ::Type{<:Hexahedron3D}, xgrid) where {Tv, Ti, APT}
291+
xFaceNormals::Array{Tv, 2} = xgrid[FaceNormals]
292+
xCellFaces::Adjacency{Ti} = xgrid[CellFaces]
293293
return function closure(coefficients::Array{<:Real, 2}, cell)
294294
# multiplication with normal vectors
295295
fill!(coefficients, 1.0)
@@ -316,8 +316,8 @@ function get_coefficients(::Type{ON_CELLS}, FE::FESpace{Tv, Ti, H1BR{3}, APT}, :
316316
end
317317

318318

319-
function get_coefficients(::Type{<:ON_FACES}, FE::FESpace{Tv, Ti, H1BR{3}, APT}, ::Type{<:Quadrilateral2D}) where {Tv, Ti, APT}
320-
xFaceNormals::Array{Tv, 2} = FE.dofgrid[FaceNormals]
319+
function get_coefficients(::Type{<:ON_FACES}, FE::FESpace{Tv, Ti, H1BR{3}, APT}, ::Type{<:Quadrilateral2D}, xgrid) where {Tv, Ti, APT}
320+
xFaceNormals::Array{Tv, 2} = xgrid[FaceNormals]
321321
return function closure(coefficients::Array{<:Real, 2}, face)
322322
# multiplication of face bubble with normal vector of face
323323
fill!(coefficients, 1.0)

src/reconstructionoperators.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ end
3131
function FEEvaluator(
3232
FE::FESpace{TvG, TiG, FEType, FEAPT},
3333
operator::Type{<:Reconstruct{FETypeReconst, stdop}},
34-
qrule::QuadratureRule{TvR, EG};
34+
qrule::QuadratureRule{TvR, EG},
35+
xgrid = FE.xgrid;
3536
L2G = nothing,
3637
T = Float64,
3738
AT = ON_CELLS
@@ -40,7 +41,6 @@ function FEEvaluator(
4041
@debug "Creating FEBasisEvaluator for reconstruction of $stdop operator of $FEType into $FETypeReconst on $EG"
4142

4243
## generate FESpace for reconstruction
43-
xgrid = FE.xgrid
4444
FE2 = FESpace{FETypeReconst}(xgrid)
4545

4646
## collect dimension information
@@ -62,7 +62,7 @@ function FEEvaluator(
6262
if L2G === nothing
6363
L2G = L2GTransformer(EG, xgrid, AT)
6464
end
65-
FEB = FEEvaluator(FE2, stdop, qrule; L2G = L2G, T = T, AT = AT)
65+
FEB = FEEvaluator(FE2, stdop, qrule, xgrid; L2G = L2G, T = T, AT = AT)
6666

6767
## reconstruction coefficient handler
6868
reconst_handler = ReconstructionHandler(FE, FE2, AT, EG)

0 commit comments

Comments
 (0)