Debian Codegraph @

tools/physicalModeling/mesh2faust/vega/libraries/stvk/StVKCubeABCD.cpp

raw symbols SCIP
1 /*************************************************************************
2 * *
3 * Vega FEM Simulation Library Version 3.1 *
4 * *
5 * "StVK" library , Copyright (C) 2007 CMU, 2009 MIT, 2016 USC *
6 * All rights reserved. *
7 * *
8 * Code author: Jernej Barbic *
9 * http://www.jernejbarbic.com/code *
10 * *
11 * Research: Jernej Barbic, Fun Shing Sin, Daniel Schroeder, *
12 * Doug L. James, Jovan Popovic *
13 * *
14 * Funding: National Science Foundation, Link Foundation, *
15 * Singapore-MIT GAMBIT Game Lab, *
16 * Zumberge Research and Innovation Fund at USC *
17 * *
18 * This library is free software; you can redistribute it and/or *
19 * modify it under the terms of the BSD-style license that is *
20 * included with this library in the file LICENSE.txt *
21 * *
22 * This library is distributed in the hope that it will be useful, *
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file *
25 * LICENSE.TXT for more details. *
26 * *
27 *************************************************************************/
28
29 #include "StVKCubeABCD.h"
30 #include "cubicMeshIntegrals.cpp"
31
32 StVKCubeABCD::StVKCubeABCD(double cubeSize)
33 {
34 double * rawIntegrals = cubicMeshIntegrals;
35
36 int i,j,k,l;
37
38 // A
39 for (i=0; i<8; i++)
40 for (j=0; j<8; j++)
41 for (k=0; k<3; k++)
42 for (l=0; l<3; l++)
43 {
44 A_[i][j][k][l] = cubeSize * *rawIntegrals;
45 rawIntegrals++;
46 }
47
48 // B
49 for (i=0; i<8; i++)
50 for (j=0; j<8; j++)
51 {
52 B_[i][j] = cubeSize * *rawIntegrals;
53 rawIntegrals++;
54 }
55
56 // C
57 for (i=0; i<8; i++)
58 for (j=0; j<8; j++)
59 for (k=0; k<8; k++)
60 for (l=0; l<3; l++)
61 {
62 C_[i][j][k][l] = *rawIntegrals;
63 rawIntegrals++;
64 }
65
66 // D
67 for (i=0; i<8; i++)
68 for (j=0; j<8; j++)
69 for (k=0; k<8; k++)
70 for (l=0; l<8; l++)
71 {
72 D_[i][j][k][l] = 1.0 / cubeSize * *rawIntegrals;
73 rawIntegrals++;
74 }
75 }
76