115115
116116# # Adaptive construction
117117
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 ())
119119 for n = 50 : 100 : 5000
120120 X = coefficients (ProductFun (f,sp,n,n;tol= tol))
121121 if size (X,1 )< n && size (X,2 )< n
@@ -135,7 +135,11 @@ function ProductFun(f::Function,S::AbstractProductSpace,M::Integer,N::Integer;to
135135 vals= T[f (ptsx[k,j],ptsy[k,j]) for k= 1 : size (ptsx,1 ), j= 1 : size (ptsx,2 )]
136136 ProductFun (transform! (S,vals),S;tol= tol,chopping= true )
137137end
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)
139143
140144ProductFun (f,dx:: Space ,dy:: Space )= ProductFun (f,TensorSpace (dx,dy))
141145
180184
181185# # Conversion to other ProductSpaces with the same coefficients
182186
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)
184188ProductFun (f:: ProductFun{S,V,SS} ,sp:: ProductDomain ) where {S,V,SS<: TensorSpace }= ProductFun (f,Space (sp))
185189
186190function ProductFun (f:: ProductFun ,sp:: AbstractProductSpace )
0 commit comments