sandialabs / compadre

Compadre (Compatible Particle Discretization and Remap)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider extracting target operation calculation / contraction from generateAlphas function

kuberry opened this issue · comments

Currently, generateAlphas calls generatePolynomialCoefficients which inverts a matrix against multiple right hand sides. Rather than store the solution matrix (number of basis x number of neighbors) for each GMLS problem, it is then contracted against the vector that results from evaluating the target operation on the polynomial at predefined sites (target site + alternate sites (usually, quadrature)).

Generally, this will result in storing something of size [1 x number of neighbors], which is why it has been done in the past. For the variational approach, it is generally (1 + number of quadrature) x number of neighbors for each GMLS problem.

Since quadrature scales with polynomial order around 1:1 in 2D, the order of a rule needed to capture the product of two polynomials is around 2:1 (relative to the original polynomial order of either of the terms being multiplied).

Values to consider: For two terms multiplied, each of polynomial order k, the storage is approximately [2k x number of neighbors] for each GMLS problem, regardless of dimension. If instead the solution matrix were saved, the storage would be approximately [(k+1)*(k+2)/2 x number of neighbors].

Based on this calculation, there is still a storage savings, even in the variational approach requiring quadrature.