@@ -38,26 +38,6 @@ function _assemble_element!(global_val::H1Field, local_val, conn, e, b)
3838 return nothing
3939end
4040
41- # """
42- # $(TYPEDSIGNATURES)
43- # Assembly method for a block labelled as block_id.
44-
45- # This is a top level method that simply dispatches to CPU/GPU specializations
46- # based on the backend of assembler and also checks for consistent backends.
47-
48- # This method is common acroos all value types, e.g. energy, residual, stiffness, etc.
49- # to maintain a common method call syntax. The difference in dispatch is handled by the
50- # sym argument.
51- # """
52- # function _assemble_block!(assembler, physics, sym, ref_fe, U, X, conns, block_id)
53- # backend = KA.get_backend(assembler)
54- # # TODO add get_backend method of ref_fe
55- # @assert backend == KA.get_backend(U)
56- # @assert backend == KA.get_backend(X)
57- # @assert backend == KA.get_backend(conns)
58- # _assemble_block!(assembler, physics, sym, ref_fe, U, X, conns, block_id, backend)
59- # end
60-
6141_assemble_block_method_from_sym (:: Val{:mass} ) = _assemble_block_mass!
6242_assemble_block_method_from_sym (:: Val{:residual} ) = _assemble_block_residual!
6343_assemble_block_method_from_sym (:: Val{:residual_and_stiffness} ) = _assemble_block_residual_and_stiffness!
7656$(TYPEDSIGNATURES)
7757Top level assembly method for ```H1Field``` that loops over blocks and dispatches
7858to appropriate kernels based on sym.
59+
60+ TODO need to make sure at setup time that physics and elem_conns have the same
61+ values order. Otherwise, shenanigans.
7962"""
8063function assemble! (assembler, physics, U:: H1Field , sym)
8164 val_sym = Val {sym} ()
8265 _assemble_block_method! = _assemble_block_method_from_sym (val_sym)
8366 _zero_storage (assembler, val_sym)
8467 fspace = assembler. dof. H1_vars[1 ]. fspace
8568 X = fspace. coords
86- for (b, conns) in enumerate (values (fspace. elem_conns))
69+ for (b, ( conns, block_physics)) in enumerate (zip ( values (fspace. elem_conns), values (physics) ))
8770 ref_fe = values (fspace. ref_fes)[b]
8871 backend = _check_backends (assembler, U, X, conns)
89- _assemble_block_method! (assembler, physics , ref_fe, U, X, conns, b, backend)
72+ _assemble_block_method! (assembler, block_physics , ref_fe, U, X, conns, b, backend)
9073 end
9174end
9275
93- # wrapper that uses Uu and p
94- # TODO only works on H1 fields right now
95- function assemble! (assembler, physics, Uu, p, sym)
96- update_field_bcs! (p. h1_field, assembler. dof, p. h1_bcs, p. t)
97- update_field_unknowns! (p. h1_field, assembler. dof, Uu)
98- assemble! (assembler, physics, p. h1_field, sym)
99- return nothing
100- end
101-
10276"""
10377$(TYPEDSIGNATURES)
10478"""
@@ -117,16 +91,6 @@ $(TYPEDSIGNATURES)
11791"""
11892create_unknowns (asm:: AbstractAssembler , type:: Type{<:AbstractField} ) = create_unknowns (asm. dof, type)
11993
120- """
121- $(TYPEDSIGNATURES)
122- """
123- function _element_level_coordinates (X:: H1Field , ref_fe, conns, e)
124- NDim = size (X, 1 )
125- NNPE = ReferenceFiniteElements. num_vertices (ref_fe)
126- x_el = @views SMatrix {NDim, NNPE, Float64, NDim * NNPE} (X[:, conns[:, e]])
127- return x_el
128- end
129-
13094"""
13195$(TYPEDSIGNATURES)
13296"""
0 commit comments