| 2 | from yateto.input import parseXMLMatrixFile, parseJSONMatrixFile |
| 3 | |
| 4 | def addStiffnessTensor(generator): |
| 5 | stiffnessTensor = Tensor('stiffnessTensor', (3, 3, 3, 3)) |
| 6 | direction = Tensor('direction', (3,)) |
| 7 | christoffel = Tensor('christoffel', (3,3)) |
| 8 | |
| 9 | computeChristoffel = christoffel['ik'] <= stiffnessTensor['ijkl'] * direction['j'] * direction['l'] |
| 10 | generator.add('computeChristoffel', computeChristoffel) |
| 11 | |
| 12 | def includeMatrices(matricesDir): |
| 13 | matrices = parseJSONMatrixFile('{}/sampling_directions.json'.format(matricesDir)) |