144 idx[0] =
elem.getLoLoLoIndex();
145 idx[1] =
elem.getUpLoLoIndex();
146 idx[2] =
elem.getLoUpLoIndex();
147 idx[3] =
elem.getUpUpLoIndex();
148 idx[4] =
elem.getLoLoUpIndex();
149 idx[5] =
elem.getUpLoUpIndex();
150 idx[6] =
elem.getLoUpUpIndex();
151 idx[7] =
elem.getUpUpUpIndex();
154 double dx =
elem.getUpper0() -
elem.getLower0();
155 double dy =
elem.getUpper1() -
elem.getLower1();
156 double dz =
elem.getUpper2() -
elem.getLower2();
167 std::tie(ky,
kz) = std::tuple<double,double>(material->thermk(
temp,
thickness[
elem.getIndex()]));
169 ky *= 1
e-6;
kz *= 1
e-6;
172 kx /=
dx; kx *=
dy; kx *= dz;
173 ky *=
dx; ky /=
dy; ky *= dz;
180 double f = 0.125e-18 *
dx *
dy * dz * heats[
elem.getIndex()];
184 K[0][0] =
K[1][1] =
K[2][2] =
K[3][3] =
K[4][4] =
K[5][5] =
K[6][6] =
K[7][7] = (kx + ky +
kz) / 9.;
186 K[1][0] =
K[3][2] =
K[5][4] =
K[7][6] = (-2.*kx + ky +
kz) / 18.;
187 K[2][0] =
K[3][1] =
K[6][4] =
K[7][5] = ( kx - 2.*ky +
kz) / 18.;
188 K[4][0] =
K[5][1] =
K[6][2] =
K[7][3] = ( kx + ky - 2.*
kz) / 18.;
190 K[4][2] =
K[5][3] =
K[6][0] =
K[7][1] = ( kx - 2.*ky - 2.*
kz) / 36.;
191 K[4][1] =
K[5][0] =
K[6][3] =
K[7][2] = (-2.*kx + ky - 2.*
kz) / 36.;
192 K[2][1] =
K[3][0] =
K[6][5] =
K[7][4] = (-2.*kx - 2.*ky +
kz) / 36.;
194 K[4][3] =
K[5][2] =
K[6][1] =
K[7][0] = -(kx + ky +
kz) / 36.;
197 for (
int i = 0; i < 8; ++i) {
198 for (
int j = 0; j <= i; ++j) {
209 for (
int i = 0; i < 8; ++i) {
210 A(idx[i],idx[i]) += c;
211 B(idx[i],idx[i]) += c;
218 C[0][0] = C[1][1] = C[2][2] = C[3][3] = C[4][4] = C[5][5] = C[6][6] = C[7][7] = c * 8 / 27.;
219 C[1][0] = C[3][0] = C[4][0] = C[2][1] = C[5][1] = C[3][2] = C[6][2] = C[7][3] = C[5][4] = C[7][4] = C[6][5] = C[7][6] = c * 4 / 27.;
220 C[2][0] = C[5][0] = C[7][0] = C[3][1] = C[4][1] = C[6][1] = C[5][2] = C[7][2] = C[4][3] = C[6][3] = C[6][4] = C[7][5] = c * 2 / 27.;
221 C[6][0] = C[7][1] = C[4][2] = C[5][3] = c / 27.;
223 for (
int i = 0; i < 8; ++i) {
224 for (
int j = 0; j <= i; ++j) {
225 A(idx[i],idx[j]) += C[i][j];
226 B(idx[i],idx[j]) += C[i][j];
240 double*
aend = A.data + A.size;
398 auto point = flags.wrap(dest_mesh->at(i));
399 std::size_t x = solver->mesh->axis[0]->findUpIndex(point[0]),
400 y = solver->mesh->axis[1]->findUpIndex(point[1]),
401 z = solver->mesh->axis[2]->findUpIndex(point[2]);
402 if (x == 0 || y == 0 || z == 0 || x == solver->mesh->axis[0]->size() || y == solver->mesh->axis[1]->size() || z == solver->mesh->axis[2]->size())
405 auto elem = solver->maskedMesh->element(x-1, y-1, z-1);
406 auto material = solver->geometry->getMaterial(
elem.getMidpoint());
407 size_t idx =
elem.getIndex();
409 return material->thermk(temps[idx], solver->thickness[idx]);