0

I'm planing on writing a 3D-SEM library, in which I need to evaluate expressions such as:

integral(mesh, f*v);

With f a function and v is a test function. The expression f*v can effectively be rewritten as a rank 6 tensor:

T_{i,j,k,\hat{i},\hat{j},\hat{k}} := v_{i}(x_{\hat{i}}) v_{j}(x_{\hat{j}}) v_{k}(x_{\hat{k}}) f(x_{\hat{i}}, x_{\hat{j}}, x_{\hat{k}})

and the integral is then a tensor reduction:

b_{i,j,k} := \sum_{\hat{i},\hat{j},\hat{k}} w_{\hat{i}} v_{i}(x_{\hat{i}}) w_{\hat{j}} v_{j}(x_{\hat{j}})  w_{\hat{k}} v_{k}(x_{\hat{k}}) f(x_{\hat{i}}, x_{\hat{j}}, x_{\hat{k}})

This can be evaluated quickly in three steps:

partial eval

The math are quite simple, but I'm not quite sure how to implement it. Are there some tensor library that are able to perform similar things ?

Alternatively, are there articles I could read that could give me some pointers on how to implement this ?

Thanks in advance

0 Answers0