|
1 | | -mutable struct PointEvaluator{Tv <: Real, UT, KFT <: Function} |
| 1 | +mutable struct PointEvaluator{Tv <: Real, TCoeff <: Real, UT, KFT <: Function} |
2 | 2 | u_args::Array{UT, 1} |
3 | 3 | ops_args::Array{DataType, 1} |
4 | 4 | kernel::KFT |
@@ -61,11 +61,11 @@ $(_myprint(default_peval_kwargs())) |
61 | 61 | After construction, call `initialize!` to prepare the evaluator for a given solution, then use `evaluate!` or `evaluate_bary!` to perform point evaluations. |
62 | 62 |
|
63 | 63 | """ |
64 | | -function PointEvaluator(kernel, u_args, ops_args, sol = nothing; Tv = Float64, kwargs...) |
| 64 | +function PointEvaluator(kernel, u_args, ops_args, sol = nothing; Tv = Float64, TCoeff = Float64, kwargs...) |
65 | 65 | parameters = Dict{Symbol, Any}(k => v[1] for (k, v) in default_peval_kwargs()) |
66 | 66 | _update_params!(parameters, kwargs) |
67 | 67 | @assert length(u_args) == length(ops_args) |
68 | | - PE = PointEvaluator{Tv, typeof(u_args[1]), typeof(kernel)}(u_args, ops_args, kernel, nothing, nothing, nothing, 1, nothing, nothing, nothing, zeros(Tv, 2), parameters) |
| 68 | + PE = PointEvaluator{Tv, TCoeff, typeof(u_args[1]), typeof(kernel)}(u_args, ops_args, kernel, nothing, nothing, nothing, 1, nothing, nothing, nothing, zeros(Tv, 2), parameters) |
69 | 69 | if sol !== nothing |
70 | 70 | initialize!(PE, sol) |
71 | 71 | end |
@@ -121,7 +121,7 @@ $(_myprint(default_peval_kwargs())) |
121 | 121 | # Notes |
122 | 122 | - This function must be called before using `evaluate!` or `evaluate_bary!` with the `PointEvaluator`. |
123 | 123 | """ |
124 | | -function initialize!(O::PointEvaluator{T, UT}, sol; time = 0, kwargs...) where {T, UT} |
| 124 | +function initialize!(O::PointEvaluator{T, TCoeff, UT}, sol; time = 0, kwargs...) where {T, TCoeff, UT} |
125 | 125 | _update_params!(O.parameters, kwargs) |
126 | 126 | if UT <: Integer |
127 | 127 | ind_args = O.u_args |
@@ -159,7 +159,7 @@ function initialize!(O::PointEvaluator{T, UT}, sol; time = 0, kwargs...) where { |
159 | 159 | op_lengths_args = [size(O.BE_args[1][j].cvals, 1) for j in 1:nargs] |
160 | 160 | op_offsets_args = [0] |
161 | 161 | append!(op_offsets_args, cumsum(op_lengths_args)) |
162 | | - input_args = zeros(T, op_offsets_args[end]) |
| 162 | + input_args = zeros(TCoeff, op_offsets_args[end]) |
163 | 163 |
|
164 | 164 | FEATs_args = [EffAT4AssemblyType(get_AT(FES_args[j]), AT) for j in 1:nargs] |
165 | 165 | itemdofs_args::Array{Union{Adjacency{Ti}, SerialVariableTargetAdjacency{Ti}}, 1} = [FES_args[j][Dofmap4AssemblyType(FEATs_args[j])] for j in 1:nargs] |
|
0 commit comments