From 10421c45537057adfa878f557bfe891bd1e57c12 Mon Sep 17 00:00:00 2001 From: Bittens Date: Thu, 21 Sep 2023 13:21:45 +0200 Subject: [PATCH] ins --- src/DistributedSparseGrids.jl | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/DistributedSparseGrids.jl b/src/DistributedSparseGrids.jl index 7ff832e..22d3e0b 100644 --- a/src/DistributedSparseGrids.jl +++ b/src/DistributedSparseGrids.jl @@ -504,6 +504,19 @@ function integrate_inplace_ops(asg::SG) where {N,CP,RT,HCP<:AbstractHierarchical return res end +function integrate_inplace_ops(asg::SG, res::RT, tmp::RT) where {N,CP,RT,HCP<:AbstractHierarchicalCollocationPoint{N,CP,RT}, SG<:AbstractHierarchicalSparseGrid{N,HCP}} + println("N=$N,CP=$CP,RT=$RT") + res = fill!(res,0.0) + tmp = fill(tmp,0.0) + for cpt in asg + bf = integral_basis_fun(cpt) + sw = scaling_weight(cpt) + mul!(tmp, sw, bf) + add!(res, tmp) + end + return res +end + #function integrate(asg::SG,fun::Function) where {N,CP,RT,HCP<:AbstractHierarchicalCollocationPoint{N,CP,RT}, SG<:AbstractHierarchicalSparseGrid{N,HCP}} # println("N=$N,CP=$CP,RT=$RT") # maxp = maxporder(asg)