96 int nPts = physfield[0].size();
101 for (
int i = 0; i < 3; i++)
105 m_fields[0]->GetCoords(coords[0], coords[1], coords[2]);
106 for (
int i = 0; i < nPts; ++i)
114 invR[i] = 1.0 / coords[0][i];
129 thermalConductivity);
132 Vmath::Vadd(nPts, derivativesO1[0][0], 1, derivativesO1[1][1], 1, divVel,
134 Vmath::Vvtvp(nPts, physfield[0], 1, invR, 1, divVel, 1, divVel, 1);
148 for (i = 0; i < 2; ++i)
150 for (j = i; j < 2; ++j)
152 Vmath::Vadd(nPts, derivativesO1[i][j], 1, derivativesO1[j][i], 1,
153 viscousTensor[i][j + 1], 1);
155 Vmath::Vmul(nPts, mu, 1, viscousTensor[i][j + 1], 1,
156 viscousTensor[i][j + 1], 1);
161 Vmath::Vadd(nPts, viscousTensor[i][j + 1], 1, divVel, 1,
162 viscousTensor[i][j + 1], 1);
168 viscousTensor[j][i + 1], 1);
176 Vmath::Vmul(nPts, physfield[0], 1, invR, 1, viscousTensor[2][3], 1);
177 Vmath::Smul(nPts, 2.0, viscousTensor[2][3], 1, viscousTensor[2][3], 1);
178 Vmath::Vmul(nPts, mu, 1, viscousTensor[2][3], 1, viscousTensor[2][3],
180 Vmath::Vadd(nPts, viscousTensor[2][3], 1, divVel, 1,
181 viscousTensor[2][3], 1);
184 Vmath::Vmul(nPts, physfield[2], 1, invR, 1, viscousTensor[2][1], 1);
185 Vmath::Smul(nPts, -1.0, viscousTensor[2][1], 1, viscousTensor[2][1], 1);
186 Vmath::Vadd(nPts, derivativesO1[0][2], 1, viscousTensor[2][1], 1,
187 viscousTensor[2][1], 1);
188 Vmath::Vmul(nPts, mu, 1, viscousTensor[2][1], 1, viscousTensor[2][1],
190 Vmath::Vcopy(nPts, viscousTensor[2][1], 1, viscousTensor[0][3], 1);
193 Vmath::Vmul(nPts, mu, 1, derivativesO1[1][2], 1, viscousTensor[2][2],
195 Vmath::Vcopy(nPts, viscousTensor[2][2], 1, viscousTensor[1][3], 1);
205 Vmath::Vvtvp(nPts, physfield[j], 1, viscousTensor[i][j + 1], 1,
230 Vmath::Vsub(nPts, viscousTensor[0][1], 1, viscousTensor[2][3], 1,