115
115
116
116
# # Adaptive construction
117
117
118
- function ProductFun (f:: Function , sp:: AbstractProductSpace{Tuple{S,V }} ; tol= 100 eps ()) where {S <: UnivariateSpace ,V <: UnivariateSpace }
118
+ function ProductFun (f:: Function , sp:: AbstractProductSpace{<:NTuple{2,UnivariateSpace }} ; tol= 100 eps ())
119
119
for n = 50 : 100 : 5000
120
120
X = coefficients (ProductFun (f,sp,n,n;tol= tol))
121
121
if size (X,1 )< n && size (X,2 )< n
@@ -135,7 +135,11 @@ function ProductFun(f::Function,S::AbstractProductSpace,M::Integer,N::Integer;to
135
135
vals= T[f (ptsx[k,j],ptsy[k,j]) for k= 1 : size (ptsx,1 ), j= 1 : size (ptsx,2 )]
136
136
ProductFun (transform! (S,vals),S;tol= tol,chopping= true )
137
137
end
138
- ProductFun (f:: Function ,S:: TensorSpace ) = ProductFun (LowRankFun (f,S))
138
+ _ProductFunLowRank (f, S) = ProductFun (LowRankFun (f,S))
139
+ ProductFun (f:: Function , S:: TensorSpace2D ) =
140
+ _ProductFunLowRank (f, S)
141
+ ProductFun (f:: Fun , S:: TensorSpace2D ) =
142
+ _ProductFunLowRank (f, S)
139
143
140
144
ProductFun (f,dx:: Space ,dy:: Space )= ProductFun (f,TensorSpace (dx,dy))
141
145
180
184
181
185
# # Conversion to other ProductSpaces with the same coefficients
182
186
183
- ProductFun (f:: ProductFun ,sp:: TensorSpace )= space (f)== sp ? f : ProductFun (coefficients (f,sp),sp)
187
+ ProductFun (f:: ProductFun ,sp:: TensorSpace2D )= space (f)== sp ? f : ProductFun (coefficients (f,sp),sp)
184
188
ProductFun (f:: ProductFun{S,V,SS} ,sp:: ProductDomain ) where {S,V,SS<: TensorSpace }= ProductFun (f,Space (sp))
185
189
186
190
function ProductFun (f:: ProductFun ,sp:: AbstractProductSpace )
0 commit comments