23 template <
unsigned Dim,
class MFLOAT>
28 hasSpacingFields =
false;
39 template <
unsigned Dim,
class MFLOAT>
44 for (
unsigned int d=0; d<
Dim; d++) {
45 gridSizes[d] = ndi[d].length();
46 meshSpacing[d] = ndi[d].stride();
47 origin(d) = ndi[d].first();
53 template <
unsigned Dim,
class MFLOAT>
58 for (
unsigned int d=0; d<
Dim; d++) {
59 gridSizes[d] = ndi[d].length();
60 origin(d) = ndi[d].first();
62 set_meshSpacing(delX);
65 template <
unsigned Dim,
class MFLOAT>
71 for (
unsigned int d=0; d<
Dim; d++) {
72 gridSizes[d] = ndi[d].length();
75 set_meshSpacing(delX);
82 template <
unsigned Dim,
class MFLOAT>
86 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
89 meshSpacing[0] = I.
stride();
96 template <
unsigned Dim,
class MFLOAT>
100 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
102 gridSizes[0] = I.
length();
103 origin(0) = I.
first();
105 set_meshSpacing(delX);
108 template <
unsigned Dim,
class MFLOAT>
113 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
115 gridSizes[0] = I.
length();
117 set_meshSpacing(delX);
121 template <
unsigned Dim,
class MFLOAT>
125 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
127 gridSizes[0] = I.
length();
128 gridSizes[1] = J.
length();
129 meshSpacing[0] = I.
stride();
131 origin(0) = I.
first();
138 template <
unsigned Dim,
class MFLOAT>
142 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
144 gridSizes[0] = I.
length();
145 gridSizes[1] = J.
length();
147 origin(1) = J.
first();
148 set_meshSpacing(delX);
151 template <
unsigned Dim,
class MFLOAT>
156 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
159 gridSizes[1] = J.
length();
161 set_meshSpacing(delX);
165 template <
unsigned Dim,
class MFLOAT>
169 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
171 gridSizes[0] = I.
length();
173 gridSizes[2] = K.
length();
175 meshSpacing[1] = J.
stride();
176 meshSpacing[2] = K.
stride();
178 origin(1) = J.
first();
185 template <
unsigned Dim,
class MFLOAT>
190 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
193 gridSizes[1] = J.
length();
195 origin(0) = I.
first();
196 origin(1) = J.
first();
197 origin(2) = K.
first();
198 set_meshSpacing(delX);
201 template <
unsigned Dim,
class MFLOAT>
206 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
209 gridSizes[1] = J.
length();
210 gridSizes[2] = K.
length();
212 set_meshSpacing(delX);
218 template <
unsigned Dim,
class MFLOAT>
224 for (
unsigned int d=0; d<
Dim; d++) {
225 gridSizes[d] = ndi[d].length();
226 meshSpacing[d] = ndi[d].stride();
227 origin(d) = ndi[d].first();
233 template <
unsigned Dim,
class MFLOAT>
239 for (
unsigned int d=0; d<
Dim; d++) {
240 gridSizes[d] = ndi[d].length();
241 origin(d) = ndi[d].first();
243 set_meshSpacing(delX);
246 template <
unsigned Dim,
class MFLOAT>
253 for (
unsigned int d=0; d<
Dim; d++) {
254 gridSizes[d] = ndi[d].length();
257 set_meshSpacing(delX);
264 template <
unsigned Dim,
class MFLOAT>
269 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
271 gridSizes[0] = I.
length();
272 meshSpacing[0] = I.
stride();
273 origin(0) = I.
first();
279 template <
unsigned Dim,
class MFLOAT>
284 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
286 gridSizes[0] = I.
length();
287 origin(0) = I.
first();
289 set_meshSpacing(delX);
292 template <
unsigned Dim,
class MFLOAT>
298 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
300 gridSizes[0] = I.
length();
302 set_meshSpacing(delX);
306 template <
unsigned Dim,
class MFLOAT>
311 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
313 gridSizes[0] = I.
length();
314 gridSizes[1] = J.
length();
315 meshSpacing[0] = I.
stride();
316 meshSpacing[1] = J.
stride();
317 origin(0) = I.
first();
318 origin(1) = J.
first();
324 template <
unsigned Dim,
class MFLOAT>
329 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
331 gridSizes[0] = I.
length();
332 gridSizes[1] = J.
length();
333 origin(0) = I.
first();
334 origin(1) = J.
first();
335 set_meshSpacing(delX);
338 template <
unsigned Dim,
class MFLOAT>
344 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
346 gridSizes[0] = I.
length();
347 gridSizes[1] = J.
length();
349 set_meshSpacing(delX);
353 template <
unsigned Dim,
class MFLOAT>
358 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
360 gridSizes[0] = I.
length();
361 gridSizes[1] = J.
length();
362 gridSizes[2] = K.
length();
363 meshSpacing[0] = I.
stride();
364 meshSpacing[1] = J.
stride();
365 meshSpacing[2] = K.
stride();
366 origin(0) = I.
first();
367 origin(1) = J.
first();
368 origin(2) = K.
first();
374 template <
unsigned Dim,
class MFLOAT>
380 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
382 gridSizes[0] = I.
length();
383 gridSizes[1] = J.
length();
384 gridSizes[2] = K.
length();
385 origin(0) = I.
first();
386 origin(1) = J.
first();
387 origin(2) = K.
first();
388 set_meshSpacing(delX);
391 template <
unsigned Dim,
class MFLOAT>
397 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
399 gridSizes[0] = I.
length();
400 gridSizes[1] = J.
length();
401 gridSizes[2] = K.
length();
403 set_meshSpacing(delX);
410 template<
unsigned Dim,
class MFLOAT>
415 this->notifyOfChange();
418 template<
unsigned Dim,
class MFLOAT>
426 template<
unsigned Dim,
class MFLOAT>
432 for (d=0; d<
Dim; ++d) {
433 meshSpacing[d] = del[d];
438 if (hasSpacingFields) storeSpacingFields();
439 this->notifyOfChange();
442 template<
unsigned Dim,
class MFLOAT>
448 for (d=1;d<
Dim;++d) coef *= 0.5;
450 for (d=0;d<
Dim;++d) {
451 MFLOAT dvc = coef/meshSpacing[d];
452 for (
unsigned b=0; b<(1u<<
Dim); ++b) {
453 int s = ( b&(1<<d) ) ? 1 : -1;
459 template<
unsigned Dim,
class MFLOAT>
464 MFLOAT ms = meshSpacing[d];
469 template<
unsigned Dim,
class MFLOAT>
492 a = b*
e.Slope+
e.Offset;
500 template<
unsigned Dim,
class MFLOAT>
506 for (
unsigned int d=0; d<
Dim; d++) et[d] =
PARALLEL;
507 storeSpacingFields(et, -1);
510 template<
unsigned Dim,
class MFLOAT>
516 storeSpacingFields(et, vnodes);
519 template<
unsigned Dim,
class MFLOAT>
526 storeSpacingFields(et, vnodes);
529 template<
unsigned Dim,
class MFLOAT>
537 storeSpacingFields(et, vnodes);
540 template<
unsigned Dim,
class MFLOAT>
547 for (d=0; d<
Dim; d++) {
548 cells[d] =
Index(gridSizes[d]-1);
549 verts[d] =
Index(gridSizes[d]);
551 if (!hasSpacingFields) {
568 for (d=0; d<
Dim; d++)
569 vertexSpacing[d] = meshSpacing[d];
570 vertSpacings = vertexSpacing;
587 for (face=0; face < 2*
Dim; face++) {
597 vSlab[d] =
Index(cells[d].
max() + 1,
607 voffset = 2*cells[d].max() + 1 - 1;
609 voffset = 2*cells[d].min() - 1 + 1;
613 for (vfill_i=vertSpacings.
begin_if();
614 vfill_i!=vertSpacings.
end_if(); ++vfill_i)
625 if ( vSlab.
touches( fill_alloc ) )
638 src[d] = voffset - src[d];
643 for (from_i=vertSpacings.
begin_if();
644 from_i!=vertSpacings.
end_if(); ++from_i)
651 if ( src.
touches( from_owned ) )
657 LFI lhs = fill.
begin(vfill_it);
658 LFI rhs = from.
begin(from_it);
674 cellSpacings = vertexSpacing;
676 hasSpacingFields =
true;
687 template<
unsigned Dim,
class MFLOAT>
695 unsigned vnodesPerDirection[
Dim];
696 vnodesPerDirection[0] = vnodes1;
697 storeSpacingFields(et, vnodesPerDirection, recurse, vnodes);
700 template<
unsigned Dim,
class MFLOAT>
703 unsigned vnodes1,
unsigned vnodes2,
704 bool recurse,
int vnodes) {
708 unsigned vnodesPerDirection[
Dim];
709 vnodesPerDirection[0] = vnodes1;
710 vnodesPerDirection[1] = vnodes2;
711 storeSpacingFields(et, vnodesPerDirection, recurse, vnodes);
714 template<
unsigned Dim,
class MFLOAT>
717 unsigned vnodes1,
unsigned vnodes2,
unsigned vnodes3,
718 bool recurse,
int vnodes) {
723 unsigned vnodesPerDirection[
Dim];
724 vnodesPerDirection[0] = vnodes1;
725 vnodesPerDirection[1] = vnodes2;
726 vnodesPerDirection[2] = vnodes3;
727 storeSpacingFields(et, vnodesPerDirection, recurse, vnodes);
734 template<
unsigned Dim,
class MFLOAT>
737 unsigned* vnodesPerDirection,
738 bool recurse,
int vnodes)
743 for (d=0; d<
Dim; d++) {
744 cells[d] =
Index(gridSizes[d]-1);
745 verts[d] =
Index(gridSizes[d]);
747 if (!hasSpacingFields) {
765 for (d=0; d<
Dim; d++)
766 vertexSpacing[d] = meshSpacing[d];
767 vertSpacings = vertexSpacing;
784 for (face=0; face < 2*
Dim; face++) {
794 vSlab[d] =
Index(cells[d].
max() + 1,
804 voffset = 2*cells[d].max() + 1 - 1;
806 voffset = 2*cells[d].min() - 1 + 1;
810 for (vfill_i=vertSpacings.
begin_if();
811 vfill_i!=vertSpacings.
end_if(); ++vfill_i)
822 if ( vSlab.
touches( fill_alloc ) )
835 src[d] = voffset - src[d];
840 for (from_i=vertSpacings.
begin_if();
841 from_i!=vertSpacings.
end_if(); ++from_i)
848 if ( src.
touches( from_owned ) )
854 LFI lhs = fill.
begin(vfill_it);
855 LFI rhs = from.
begin(from_it);
871 cellSpacings = vertexSpacing;
873 hasSpacingFields =
true;
880 template<
unsigned Dim,
class MFLOAT >
883 print(std::ostream& out)
889 template<
unsigned Dim,
class MFLOAT >
894 out <<
"======UniformCartesian<" <<
Dim <<
",MFLOAT>==begin======\n";
896 for (d=0; d <
Dim; d++)
897 out <<
"gridSizes[" << d <<
"] = " << gridSizes[d] <<
"\n";
898 out <<
"origin = " << origin <<
"\n";
899 for (d=0; d <
Dim; d++)
900 out <<
"meshSpacing[" << d <<
"] = " << meshSpacing[d] <<
"\n";
901 for (d=0; d < (1u<<
Dim); d++)
902 out <<
"Dvc[" << d <<
"] = " << Dvc[d] <<
"\n";
903 out <<
"cell volume = " << volume <<
"\n";
904 out <<
"======UniformCartesian<" <<
Dim <<
",MFLOAT>==end========\n";
912 template <
unsigned Dim,
class MFLOAT>
918 for (d=0; d<
Dim; d++)
919 if (ndi[d].length() != 1)
920 ERRORMSG(
"UniformCartesian::getCellVolume() error: arg is not a NDIndex"
921 <<
"specifying a single element" <<
endl);
925 template <
unsigned Dim,
class MFLOAT>
935 template <
unsigned Dim,
class MFLOAT>
945 for (d=0; d<
Dim; d++) {
948 ndi0[d] =
Index(i0,i0,1);
949 ndi1[d] =
Index(i1,i1,1);
951 v0 = getVertexPosition(ndi0);
952 v1 = getVertexPosition(ndi1);
955 for (d=0; d<
Dim; d++) volume *=
abs(v1(d) - v0(d));
959 template <
unsigned Dim,
class MFLOAT>
969 for (d=0; d<
Dim; d++) {
971 i1 = ndi[d].last() + 1;
972 ndi0[d] =
Index(i0,i0,1);
973 ndi1[d] =
Index(i1,i1,1);
975 v0 = getVertexPosition(ndi0);
976 v1 = getVertexPosition(ndi1);
979 for (d=0; d<
Dim; d++) volume *=
abs(v1(d) - v0(d));
984 template <
unsigned Dim,
class MFLOAT>
993 for (
unsigned int d=0; d<
Dim; d++) {
994 i = (int)((x(d) - origin(d))/meshSpacing[d] + 0.5);
995 if (x(d) >= origin(d))
998 ndi[d] =
Index(i-1,i-1);
1003 template <
unsigned Dim,
class MFLOAT>
1012 for (
unsigned int d=0; d<
Dim; d++) {
1013 i = (int)((x(d) - origin(d))/meshSpacing[d]);
1014 if (x(d) >= origin(d))
1015 ndi[d] =
Index(i,i);
1017 ndi[d] =
Index(i-1,i-1);
1022 template <
unsigned Dim,
class MFLOAT>
1028 for (d=0; d<
Dim; d++) {
1029 if (ndi[d].length() != 1)
1030 ERRORMSG(
"UniformCartesian::getVertexPosition() error: arg is not a"
1031 <<
" NDIndex specifying a single element" <<
endl);
1035 for (d=0; d<
Dim; d++)
1036 vertexPosition(d) = ndi[d].first()*meshSpacing[d] + origin(d);
1037 return vertexPosition;
1040 template <
unsigned Dim,
class MFLOAT>
1047 int currentLocation[
Dim];
1049 vertexPositions.Uncompress();
1051 fi_end = vertexPositions.end();
1052 for (fi = vertexPositions.
begin(); fi != fi_end; ++fi) {
1053 fi.GetCurrentLocation(currentLocation);
1054 for (d=0; d<
Dim; d++)
1055 vertexPosition(d) = origin(d) + currentLocation[d]*meshSpacing[d];
1056 *fi = vertexPosition;
1058 return vertexPositions;
1062 template <
unsigned Dim,
class MFLOAT>
1068 for (d=0; d<
Dim; d++) {
1069 if (ndi[d].length() != 1)
1070 ERRORMSG(
"UniformCartesian::getCellPosition() error: arg is not a"
1071 <<
" NDIndex specifying a single element" <<
endl);
1075 for (d=0; d<
Dim; d++)
1076 cellPosition(d) = (ndi[d].first()+0.5)*meshSpacing[d] + origin(d);
1077 return cellPosition;
1080 template <
unsigned Dim,
class MFLOAT>
1087 int currentLocation[
Dim];
1089 cellPositions.Uncompress();
1091 fi_end = cellPositions.end();
1092 for (fi = cellPositions.
begin(); fi != fi_end; ++fi) {
1093 fi.GetCurrentLocation(currentLocation);
1094 for (d=0; d<
Dim; d++)
1095 cellPosition(d) = origin(d) + (currentLocation[d]+0.5)*meshSpacing[d];
1098 return cellPositions;
1102 template <
unsigned Dim,
class MFLOAT>
1109 for (
unsigned int d=0; d<
Dim; d++)
1110 vertexVertexSpacing[d] = meshSpacing[d] * ndi[d].length();
1111 return vertexVertexSpacing;
1115 template <
unsigned Dim,
class MFLOAT>
1123 for (d=0; d<
Dim; d++) vertexVertexSpacing(d) = meshSpacing[d];
1124 vertexSpacings = vertexVertexSpacing;
1125 return vertexSpacings;
1129 template <
unsigned Dim,
class MFLOAT>
1136 for (
unsigned int d=0; d<
Dim; d++)
1137 cellCellSpacing[d] = meshSpacing[d] * ndi[d].length();
1138 return cellCellSpacing;
1142 template <
unsigned Dim,
class MFLOAT>
1150 for (d=0; d<
Dim; d++) cellCellSpacing(d) = meshSpacing[d];
1151 cellSpacings = cellCellSpacing;
1152 return cellSpacings;
1155 template <
unsigned Dim,
class MFLOAT>
1162 for (d=0; d<
Dim; d++) {
1163 for (i=0; i<
Dim; i++) {
1164 surfaceNormals[2*d](i) = 0.0;
1165 surfaceNormals[2*d+1](i) = 0.0;
1167 surfaceNormals[2*d](d) = -1.0;
1168 surfaceNormals[2*d+1](d) = 1.0;
1170 return surfaceNormals;
1173 template <
unsigned Dim,
class MFLOAT>
1178 surfaceNormalsFields )
const
1182 for (d=0; d<
Dim; d++) {
1183 for (i=0; i<
Dim; i++) {
1184 surfaceNormals[2*d](i) = 0.0;
1185 surfaceNormals[2*d+1](i) = 0.0;
1187 surfaceNormals[2*d](d) = -1.0;
1188 surfaceNormals[2*d+1](d) = 1.0;
1190 for (d=0; d<2*
Dim; d++)
assign((*(surfaceNormalsFields[d])),
1199 template <
unsigned Dim,
class MFLOAT>
1211 for (d=0; d<
Dim; d++) {
1212 if ((face/2) == d) {
1213 surfaceNormal(face) = -1.0;
1215 surfaceNormal(face) = 0.0;
1219 for (d=0; d<
Dim; d++) {
1220 if ((face/2) == d) {
1221 surfaceNormal(face) = 1.0;
1223 surfaceNormal(face) = 0.0;
1227 return surfaceNormal;
1230 template <
unsigned Dim,
class MFLOAT>
1235 unsigned face)
const
1244 for (d=0; d<
Dim; d++) {
1245 if ((face/2) == d) {
1246 surfaceNormal(face) = -1.0;
1248 surfaceNormal(face) = 0.0;
1252 for (d=0; d<
Dim; d++) {
1253 if ((face/2) == d) {
1254 surfaceNormal(face) = 1.0;
1256 surfaceNormal(face) = 0.0;
1260 surfaceNormalField = surfaceNormal;
1261 return surfaceNormalField;
1277 template <
class T,
class MFLOAT >
1283 Index I = domain[0];
1286 dot(x[I ], x.get_mesh().Dvc[0]) +
1287 dot(x[I+1], x.get_mesh().Dvc[1]));
1291 template <
class T,
class MFLOAT >
1297 Index I = domain[0];
1298 Index J = domain[1];
1301 dot(x[I ][J ], x.get_mesh().Dvc[0]) +
1302 dot(x[I+1][J ], x.get_mesh().Dvc[1]) +
1303 dot(x[I ][J+1], x.get_mesh().Dvc[2]) +
1304 dot(x[I+1][J+1], x.get_mesh().Dvc[3]));
1308 template <
class T,
class MFLOAT >
1314 Index I = domain[0];
1315 Index J = domain[1];
1316 Index K = domain[2];
1319 dot(x[I ][J ][K ], x.get_mesh().Dvc[0]) +
1320 dot(x[I+1][J ][K ], x.get_mesh().Dvc[1]) +
1321 dot(x[I ][J+1][K ], x.get_mesh().Dvc[2]) +
1322 dot(x[I+1][J+1][K ], x.get_mesh().Dvc[3]) +
1323 dot(x[I ][J ][K+1], x.get_mesh().Dvc[4]) +
1324 dot(x[I+1][J ][K+1], x.get_mesh().Dvc[5]) +
1325 dot(x[I ][J+1][K+1], x.get_mesh().Dvc[6]) +
1326 dot(x[I+1][J+1][K+1], x.get_mesh().Dvc[7]));
1332 template <
class T,
class MFLOAT >
1338 Index I = domain[0];
1341 dot(x[I-1], x.get_mesh().Dvc[0]) +
1342 dot(x[I ], x.get_mesh().Dvc[1]));
1347 template <
class T,
class MFLOAT >
1353 Index I = domain[0];
1354 Index J = domain[1];
1357 dot(x[I-1][J-1], x.get_mesh().Dvc[0]) +
1358 dot(x[I ][J-1], x.get_mesh().Dvc[1]) +
1359 dot(x[I-1][J ], x.get_mesh().Dvc[2]) +
1360 dot(x[I ][J ], x.get_mesh().Dvc[3]));
1364 template <
class T,
class MFLOAT >
1370 Index I = domain[0];
1371 Index J = domain[1];
1372 Index K = domain[2];
1375 dot(x[I-1][J-1][K-1], x.get_mesh().Dvc[0]) +
1376 dot(x[I ][J-1][K-1], x.get_mesh().Dvc[1]) +
1377 dot(x[I-1][J ][K-1], x.get_mesh().Dvc[2]) +
1378 dot(x[I ][J ][K-1], x.get_mesh().Dvc[3]) +
1379 dot(x[I-1][J-1][K ], x.get_mesh().Dvc[4]) +
1380 dot(x[I ][J-1][K ], x.get_mesh().Dvc[5]) +
1381 dot(x[I-1][J ][K ], x.get_mesh().Dvc[6]) +
1382 dot(x[I ][J ][K ], x.get_mesh().Dvc[7]));
1388 template <
class T,
class MFLOAT >
1394 Index I = domain[0];
1396 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
1398 assign( r[I] ,
dot( idx , (x[I+1] - x[I-1]) ) );
1402 template <
class T,
class MFLOAT >
1408 Index I = domain[0];
1409 Index J = domain[1];
1411 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
1414 idy[1] = 0.5/x.get_mesh().get_meshSpacing(1);
1417 dot( idx , (x[I+1][J ] - x[I-1][J ])) +
1418 dot( idy , (x[I ][J+1] - x[I ][J-1])) );
1422 template <
class T,
class MFLOAT >
1428 Index I = domain[0];
1429 Index J = domain[1];
1430 Index K = domain[2];
1432 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
1436 idy[1] = 0.5/x.get_mesh().get_meshSpacing(1);
1440 idz[2] = 0.5/x.get_mesh().get_meshSpacing(2);
1443 dot(idx , (x[I+1][J ][K ] - x[I-1][J ][K ] )) +
1444 dot(idy , (x[I ][J+1][K ] - x[I ][J-1][K ] )) +
1445 dot(idz , (x[I ][J ][K+1] - x[I ][J ][K-1] )) );
1451 template <
class T,
class MFLOAT >
1457 Index I = domain[0];
1459 idx[0] = 1.0/x.get_mesh().get_meshSpacing(0);
1461 assign( r[I] ,
dot( idx , (x[I] - x[I-1]) ) );
1465 template <
class T,
class MFLOAT >
1471 Index I = domain[0];
1472 Index J = domain[1];
1474 idx[0] = 1.0/x.get_mesh().get_meshSpacing(0);
1477 idy[1] = 1.0/x.get_mesh().get_meshSpacing(1);
1480 dot( idx , (x[I][J] - x[I-1][J ])) +
1481 dot( idy , (x[I][J] - x[I ][J-1])) );
1485 template <
class T,
class MFLOAT >
1491 Index I = domain[0];
1492 Index J = domain[1];
1493 Index K = domain[2];
1495 idx[0] = 1.0/x.get_mesh().get_meshSpacing(0);
1499 idy[1] = 1.0/x.get_mesh().get_meshSpacing(1);
1503 idz[2] = 1.0/x.get_mesh().get_meshSpacing(2);
1506 dot(idx , (x[I][J][K] - x[I-1][J ][K ] )) +
1507 dot(idy , (x[I][J][K] - x[I ][J-1][K ] )) +
1508 dot(idz , (x[I][J][K] - x[I ][J ][K-1] )) );
1514 template <
class T,
class MFLOAT >
1520 Index I = domain[0];
1522 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
1524 assign( r[I] ,
dot( idx , (x[I+1] - x[I-1]) ) );
1528 template <
class T,
class MFLOAT >
1534 Index I = domain[0];
1535 Index J = domain[1];
1537 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
1540 idy[1] = 0.5/x.get_mesh().get_meshSpacing(1);
1543 dot( idx , (x[I+1][J ] - x[I-1][J ])) +
1544 dot( idy , (x[I ][J+1] - x[I ][J-1])) );
1548 template <
class T,
class MFLOAT >
1554 Index I = domain[0];
1555 Index J = domain[1];
1556 Index K = domain[2];
1558 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
1562 idy[1] = 0.5/x.get_mesh().get_meshSpacing(1);
1566 idz[2] = 0.5/x.get_mesh().get_meshSpacing(2);
1569 dot(idx , (x[I+1][J ][K ] - x[I-1][J ][K ] )) +
1570 dot(idy , (x[I ][J+1][K ] - x[I ][J-1][K ] )) +
1571 dot(idz , (x[I ][J ][K+1] - x[I ][J ][K-1] )) );
1577 template <
class T,
class MFLOAT >
1583 Index I = domain[0];
1586 dot(x[I ], x.get_mesh().Dvc[0]) +
1587 dot(x[I+1], x.get_mesh().Dvc[1]));
1591 template <
class T,
class MFLOAT >
1597 Index I = domain[0];
1598 Index J = domain[1];
1601 dot(x[I ][J ], x.get_mesh().Dvc[0]) +
1602 dot(x[I+1][J ], x.get_mesh().Dvc[1]) +
1603 dot(x[I ][J+1], x.get_mesh().Dvc[2]) +
1604 dot(x[I+1][J+1], x.get_mesh().Dvc[3]));
1609 template <
class T,
class MFLOAT >
1615 Index I = domain[0];
1616 Index J = domain[1];
1617 Index K = domain[2];
1620 dot(x[I ][J ][K ], x.get_mesh().Dvc[0]) +
1621 dot(x[I+1][J ][K ], x.get_mesh().Dvc[1]) +
1622 dot(x[I ][J+1][K ], x.get_mesh().Dvc[2]) +
1623 dot(x[I+1][J+1][K ], x.get_mesh().Dvc[3]) +
1624 dot(x[I ][J ][K+1], x.get_mesh().Dvc[4]) +
1625 dot(x[I+1][J ][K+1], x.get_mesh().Dvc[5]) +
1626 dot(x[I ][J+1][K+1], x.get_mesh().Dvc[6]) +
1627 dot(x[I+1][J+1][K+1], x.get_mesh().Dvc[7]));
1634 template <
class T,
class MFLOAT >
1640 Index I = domain[0];
1643 dot(x[I ], x.get_mesh().Dvc[0]) +
1644 dot(x[I+1], x.get_mesh().Dvc[1]));
1648 template <
class T,
class MFLOAT >
1654 Index I = domain[0];
1655 Index J = domain[1];
1658 dot(x[I ][J ], x.get_mesh().Dvc[0]) +
1659 dot(x[I+1][J ], x.get_mesh().Dvc[1]) +
1660 dot(x[I ][J+1], x.get_mesh().Dvc[2]) +
1661 dot(x[I+1][J+1], x.get_mesh().Dvc[3]));
1665 template <
class T,
class MFLOAT >
1671 Index I = domain[0];
1672 Index J = domain[1];
1673 Index K = domain[2];
1676 dot(x[I ][J ][K ], x.get_mesh().Dvc[0]) +
1677 dot(x[I+1][J ][K ], x.get_mesh().Dvc[1]) +
1678 dot(x[I ][J+1][K ], x.get_mesh().Dvc[2]) +
1679 dot(x[I+1][J+1][K ], x.get_mesh().Dvc[3]) +
1680 dot(x[I ][J ][K+1], x.get_mesh().Dvc[4]) +
1681 dot(x[I+1][J ][K+1], x.get_mesh().Dvc[5]) +
1682 dot(x[I ][J+1][K+1], x.get_mesh().Dvc[6]) +
1683 dot(x[I+1][J+1][K+1], x.get_mesh().Dvc[7]));
1690 template <
class T,
class MFLOAT >
1696 Index I = domain[0];
1699 dot(x[I-1], x.get_mesh().Dvc[0]) +
1700 dot(x[I ], x.get_mesh().Dvc[1]));
1704 template <
class T,
class MFLOAT >
1710 Index I = domain[0];
1711 Index J = domain[1];
1714 dot(x[I-1][J-1], x.get_mesh().Dvc[0]) +
1715 dot(x[I ][J-1], x.get_mesh().Dvc[1]) +
1716 dot(x[I-1][J ], x.get_mesh().Dvc[2]) +
1717 dot(x[I ][J ], x.get_mesh().Dvc[3]));
1721 template <
class T,
class MFLOAT >
1727 Index I = domain[0];
1728 Index J = domain[1];
1729 Index K = domain[2];
1732 dot(x[I-1][J-1][K-1], x.get_mesh().Dvc[0]) +
1733 dot(x[I ][J-1][K-1], x.get_mesh().Dvc[1]) +
1734 dot(x[I-1][J ][K-1], x.get_mesh().Dvc[2]) +
1735 dot(x[I ][J ][K-1], x.get_mesh().Dvc[3]) +
1736 dot(x[I-1][J-1][K ], x.get_mesh().Dvc[4]) +
1737 dot(x[I ][J-1][K ], x.get_mesh().Dvc[5]) +
1738 dot(x[I-1][J ][K ], x.get_mesh().Dvc[6]) +
1739 dot(x[I ][J ][K ], x.get_mesh().Dvc[7]));
1746 template <
class T,
class MFLOAT >
1752 Index I = domain[0];
1755 dot(x[I-1], x.get_mesh().Dvc[0]) +
1756 dot(x[I ], x.get_mesh().Dvc[1]));
1760 template <
class T,
class MFLOAT >
1766 Index I = domain[0];
1767 Index J = domain[1];
1770 dot(x[I-1][J-1], x.get_mesh().Dvc[0]) +
1771 dot(x[I ][J-1], x.get_mesh().Dvc[1]) +
1772 dot(x[I-1][J ], x.get_mesh().Dvc[2]) +
1773 dot(x[I ][J ], x.get_mesh().Dvc[3]));
1777 template <
class T,
class MFLOAT >
1783 Index I = domain[0];
1784 Index J = domain[1];
1785 Index K = domain[2];
1788 dot(x[I-1][J-1][K-1], x.get_mesh().Dvc[0]) +
1789 dot(x[I ][J-1][K-1], x.get_mesh().Dvc[1]) +
1790 dot(x[I-1][J ][K-1], x.get_mesh().Dvc[2]) +
1791 dot(x[I ][J ][K-1], x.get_mesh().Dvc[3]) +
1792 dot(x[I-1][J-1][K ], x.get_mesh().Dvc[4]) +
1793 dot(x[I ][J-1][K ], x.get_mesh().Dvc[5]) +
1794 dot(x[I-1][J ][K ], x.get_mesh().Dvc[6]) +
1795 dot(x[I ][J ][K ], x.get_mesh().Dvc[7]));
1802 template <
class T,
class MFLOAT >
1808 Index I = domain[0];
1811 x[I ] * x.get_mesh().Dvc[0] +
1812 x[I+1] * x.get_mesh().Dvc[1]);
1816 template <
class T,
class MFLOAT >
1822 Index I = domain[0];
1823 Index J = domain[1];
1826 x[I ][J ] * x.get_mesh().Dvc[0] +
1827 x[I+1][J ] * x.get_mesh().Dvc[1] +
1828 x[I ][J+1] * x.get_mesh().Dvc[2] +
1829 x[I+1][J+1] * x.get_mesh().Dvc[3]);
1833 template <
class T,
class MFLOAT >
1839 Index I = domain[0];
1840 Index J = domain[1];
1841 Index K = domain[2];
1844 x[I ][J ][K ] * x.get_mesh().Dvc[0] +
1845 x[I+1][J ][K ] * x.get_mesh().Dvc[1] +
1846 x[I ][J+1][K ] * x.get_mesh().Dvc[2] +
1847 x[I+1][J+1][K ] * x.get_mesh().Dvc[3] +
1848 x[I ][J ][K+1] * x.get_mesh().Dvc[4] +
1849 x[I+1][J ][K+1] * x.get_mesh().Dvc[5] +
1850 x[I ][J+1][K+1] * x.get_mesh().Dvc[6] +
1851 x[I+1][J+1][K+1] * x.get_mesh().Dvc[7]);
1858 template <
class T,
class MFLOAT >
1864 Index I =
Index(domain[0].first(), domain[0].last()-1);
1867 x[I ] * x.get_mesh().Dvc[0] +
1868 x[I+1] * x.get_mesh().Dvc[1]);
1872 template <
class T,
class MFLOAT >
1878 Index I =
Index(domain[0].first(), domain[0].last()-1);
1879 Index J =
Index(domain[1].first(), domain[1].last()-1);
1882 idx[0] = 1.0/x.get_mesh().get_meshSpacing(0);
1885 idy[1] = 1.0/x.get_mesh().get_meshSpacing(1);
1888 (x[I+1][J ] - x[I ][J ]) * idx +
1889 (x[I ][J+1] - x[I ][J ]) * idy);
1890 I =
Index(domain[0].last(), domain[0].last());
1892 (x[I][J+1] - x[I][J]));
1893 I =
Index(domain[0].first(), domain[0].last()-1);
1894 J =
Index(domain[1].last(), domain[1].last());
1896 (x[I+1][J] - x[I][J]));
1897 J =
Index(domain[1].first(), domain[1].last()-1);
1901 template <
class T,
class MFLOAT >
1907 Index I =
Index(domain[0].first(), domain[0].last()-1);
1908 Index J =
Index(domain[1].first(), domain[1].last()-1);
1909 Index K =
Index(domain[2].first(), domain[2].last()-1);
1912 idx[0] = 1.0/x.get_mesh().get_meshSpacing(0);
1916 idy[1] = 1.0/x.get_mesh().get_meshSpacing(1);
1920 idz[2] = 1.0/x.get_mesh().get_meshSpacing(2);
1923 (x[I+1][J ][K ] - x[I ][J ][K ]) * idx +
1924 (x[I ][J+1][K ] - x[I ][J ][K ]) * idy +
1925 (x[I ][J ][K+1] - x[I ][J ][K ]) * idz);
1926 I =
Index(domain[0].last(), domain[0].last());
1928 (x[I ][J+1][K ] - x[I ][J ][K ]));
1930 (x[I ][J ][K+1] - x[I ][J ][K ]));
1931 I =
Index(domain[0].first(), domain[0].last()-1);
1932 J =
Index(domain[1].last(), domain[1].last());
1934 (x[I+1][J ][K ] - x[I ][J ][K ]));
1936 (x[I ][J ][K+1] - x[I ][J ][K ]));
1937 J =
Index(domain[1].first(), domain[1].last()-1);
1938 K =
Index(domain[2].last(), domain[2].last());
1940 (x[I+1][J ][K ] - x[I ][J ][K ]));
1942 (x[I ][J+1][K ] - x[I ][J ][K ]));
1943 K =
Index(domain[2].first(), domain[2].last()-1);
1950 template <
class T,
class MFLOAT >
1956 Index I = domain[0];
1959 x[I-1] * x.get_mesh().Dvc[0] +
1960 x[I ] * x.get_mesh().Dvc[1]);
1964 template <
class T,
class MFLOAT >
1970 Index I = domain[0];
1971 Index J = domain[1];
1974 x[I-1][J-1] * x.get_mesh().Dvc[0] +
1975 x[I ][J-1] * x.get_mesh().Dvc[1] +
1976 x[I-1][J ] * x.get_mesh().Dvc[2] +
1977 x[I ][J ] * x.get_mesh().Dvc[3]);
1981 template <
class T,
class MFLOAT >
1987 Index I = domain[0];
1988 Index J = domain[1];
1989 Index K = domain[2];
1992 x[I-1][J-1][K-1] * x.get_mesh().Dvc[0] +
1993 x[I ][J-1][K-1] * x.get_mesh().Dvc[1] +
1994 x[I-1][J ][K-1] * x.get_mesh().Dvc[2] +
1995 x[I ][J ][K-1] * x.get_mesh().Dvc[3] +
1996 x[I-1][J-1][K ] * x.get_mesh().Dvc[4] +
1997 x[I ][J-1][K ] * x.get_mesh().Dvc[5] +
1998 x[I-1][J ][K ] * x.get_mesh().Dvc[6] +
1999 x[I ][J ][K ] * x.get_mesh().Dvc[7]);
2005 template <
class T,
class MFLOAT >
2011 Index I = domain[0];
2014 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
2016 assign( r[I] , idx * (x[I+1] - x[I-1] ) );
2020 template <
class T,
class MFLOAT >
2026 Index I = domain[0];
2027 Index J = domain[1];
2030 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
2033 idy[1] = 0.5/x.get_mesh().get_meshSpacing(1);
2036 idx * (x[I+1][J ] - x[I-1][J ]) +
2037 idy * (x[I ][J+1] - x[I ][J-1]) );
2041 template <
class T,
class MFLOAT >
2047 Index I = domain[0];
2048 Index J = domain[1];
2049 Index K = domain[2];
2052 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
2056 idy[1] = 0.5/x.get_mesh().get_meshSpacing(1);
2060 idz[2] = 0.5/x.get_mesh().get_meshSpacing(2);
2063 idx * (x[I+1][J ][K ] - x[I-1][J ][K ]) +
2064 idy * (x[I ][J+1][K ] - x[I ][J-1][K ]) +
2065 idz * (x[I ][J ][K+1] - x[I ][J ][K-1]));
2071 template <
class T,
class MFLOAT >
2077 Index I = domain[0];
2080 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
2082 assign( r[I] , idx * (x[I+1] - x[I-1] ) );
2086 template <
class T,
class MFLOAT >
2092 Index I = domain[0];
2093 Index J = domain[1];
2096 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
2099 idy[1] = 0.5/x.get_mesh().get_meshSpacing(1);
2102 idx * (x[I+1][J ] - x[I-1][J ]) +
2103 idy * (x[I ][J+1] - x[I ][J-1]) );
2108 template <
class T,
class MFLOAT >
2114 Index I = domain[0];
2115 Index J = domain[1];
2116 Index K = domain[2];
2119 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
2123 idy[1] = 0.5/x.get_mesh().get_meshSpacing(1);
2127 idz[2] = 0.5/x.get_mesh().get_meshSpacing(2);
2130 idx * (x[I+1][J ][K ] - x[I-1][J ][K ]) +
2131 idy * (x[I ][J+1][K ] - x[I ][J-1][K ]) +
2132 idz * (x[I ][J ][K+1] - x[I ][J ][K-1]));
2141 int maxI = I.
length() - 1;
2142 int maxJ = J.
length() - 1;
2143 int maxK = K.
length() - 1;
2145 Index Iup(maxI, maxI);
2146 Index Jup(maxJ, maxJ);
2147 Index Kup(maxK, maxK);
2149 r[lo][J][K] = (idx * (- 1.0*x[lo+2][J][K]
2154 r[Iup][J][K] = (idx * ( 1.0*x[Iup-2][J][K]
2155 - 4.0*x[Iup-1][J][K]
2156 + 3.0*x[Iup ][J][K])
2160 r[I][lo][K] = (idy * (- 1.0*x[I][lo+2][K]
2165 r[I][Jup][K] = (idy * ( 1.0*x[I][Jup-2][K]
2166 - 4.0*x[I][Jup-1][K]
2167 + 3.0*x[I][Jup ][K])
2171 r[I][J][lo] = (idz * (- 1.0*x[I][J][lo+2]
2176 r[I][J][Kup] = (idz * ( 1.0*x[I][J][Kup-2]
2177 - 4.0*x[I][J][Kup-1]
2178 + 3.0*x[I][J][Kup ])
2186 template <
class T,
class MFLOAT >
2192 Index I = domain[0];
2193 Index J = domain[1];
2194 Index K = domain[2];
2197 idx[0] = 0.5/x.get_mesh().get_meshSpacing(0);
2201 idy[1] = 0.5/x.get_mesh().get_meshSpacing(1);
2205 idz[2] = 0.5/x.get_mesh().get_meshSpacing(2);
2208 idx * (x[I+1][J ][K ] - x[I-1][J ][K ]) +
2209 idy * (x[I ][J+1][K ] - x[I ][J-1][K ]) +
2210 idz * (x[I ][J ][K+1] - x[I ][J ][K-1]));
2216 template <
class T,
class MFLOAT >
2222 Index I = domain[0];
2230 template <
class T,
class MFLOAT >
2236 Index I = domain[0];
2237 Index J = domain[1];
2247 template <
class T,
class MFLOAT >
2253 Index I = domain[0];
2254 Index J = domain[1];
2255 Index K = domain[2];
2261 outerProduct( x[I+1][J+1][K ] , x.get_mesh().Dvc[3] ) +
2263 outerProduct( x[I+1][J ][K+1] , x.get_mesh().Dvc[5] ) +
2264 outerProduct( x[I ][J+1][K+1] , x.get_mesh().Dvc[6] ) +
2265 outerProduct( x[I+1][J+1][K+1] , x.get_mesh().Dvc[7] ));
2272 template <
class T,
class MFLOAT >
2278 Index I = domain[0];
2286 template <
class T,
class MFLOAT >
2292 Index I = domain[0];
2293 Index J = domain[1];
2303 template <
class T,
class MFLOAT >
2309 Index I = domain[0];
2310 Index J = domain[1];
2311 Index K = domain[2];
2314 outerProduct( x[I-1][J-1][K-1] , x.get_mesh().Dvc[0] ) +
2315 outerProduct( x[I ][J-1][K-1] , x.get_mesh().Dvc[1] ) +
2316 outerProduct( x[I-1][J ][K-1] , x.get_mesh().Dvc[2] ) +
2318 outerProduct( x[I-1][J-1][K ] , x.get_mesh().Dvc[4] ) +
2330 template <
class T1,
class T2,
class MFLOAT >
2337 Index I = domain[0];
2339 ( x[I-1] * w[I-1] + x[I ] * w[I ] )/
2340 ( w[I-1] + w[I ] ) );
2344 template <
class T1,
class T2,
class MFLOAT >
2351 Index I = domain[0];
2352 Index J = domain[1];
2355 ( x[I-1][J-1] * w[I-1][J-1] +
2356 x[I ][J-1] * w[I ][J-1] +
2357 x[I-1][J ] * w[I-1][J ] +
2358 x[I ][J ] * w[I ][J ] )/
2366 template <
class T1,
class T2,
class MFLOAT >
2373 Index I = domain[0];
2374 Index J = domain[1];
2375 Index K = domain[2];
2378 ( x[I-1][J-1][K-1] * w[I-1][J-1][K-1] +
2379 x[I ][J-1][K-1] * w[I ][J-1][K-1] +
2380 x[I-1][J ][K-1] * w[I-1][J ][K-1] +
2381 x[I ][J ][K-1] * w[I ][J ][K-1] +
2382 x[I-1][J-1][K ] * w[I-1][J-1][K ] +
2383 x[I ][J-1][K ] * w[I ][J-1][K ] +
2384 x[I-1][J ][K ] * w[I-1][J ][K ] +
2385 x[I ][J ][K ] * w[I ][J ][K ] )/
2386 ( w[I-1][J-1][K-1] +
2400 template <
class T1,
class T2,
class MFLOAT >
2407 Index I = domain[0];
2409 ( x[I+1] * w[I+1] + x[I ] * w[I ] )/
2410 ( w[I+1] + w[I ] ) );
2414 template <
class T1,
class T2,
class MFLOAT >
2421 Index I = domain[0];
2422 Index J = domain[1];
2425 ( x[I+1][J+1] * w[I+1][J+1] +
2426 x[I ][J+1] * w[I ][J+1] +
2427 x[I+1][J ] * w[I+1][J ] +
2428 x[I ][J ] * w[I ][J ] )/
2436 template <
class T1,
class T2,
class MFLOAT >
2443 Index I = domain[0];
2444 Index J = domain[1];
2445 Index K = domain[2];
2448 ( x[I+1][J+1][K+1] * w[I+1][J+1][K+1] +
2449 x[I ][J+1][K+1] * w[I ][J+1][K+1] +
2450 x[I+1][J ][K+1] * w[I+1][J ][K+1] +
2451 x[I ][J ][K+1] * w[I ][J ][K+1] +
2452 x[I+1][J+1][K ] * w[I+1][J+1][K ] +
2453 x[I ][J+1][K ] * w[I ][J+1][K ] +
2454 x[I+1][J ][K ] * w[I+1][J ][K ] +
2455 x[I ][J ][K ] * w[I ][J ][K ] )/
2456 ( w[I+1][J+1][K+1] +
2470 template <
class T1,
class MFLOAT >
2476 Index I = domain[0];
2477 r[I] = 0.5*(x[I-1] + x[I ]);
2481 template <
class T1,
class MFLOAT >
2487 Index I = domain[0];
2488 Index J = domain[1];
2489 r[I][J] = 0.25*(x[I-1][J-1] + x[I ][J-1] + x[I-1][J ] + x[I ][J ]);
2493 template <
class T1,
class MFLOAT >
2499 Index I = domain[0];
2500 Index J = domain[1];
2501 Index K = domain[2];
2502 r[I][J][K] = 0.125*(x[I-1][J-1][K-1] + x[I ][J-1][K-1] + x[I-1][J ][K-1] +
2503 x[I ][J ][K-1] + x[I-1][J-1][K ] + x[I ][J-1][K ] +
2504 x[I-1][J ][K ] + x[I ][J ][K ]);
2511 template <
class T1,
class MFLOAT >
2518 Index I = domain[0];
2519 r[I] = 0.5*(x[I+1] + x[I ]);
2523 template <
class T1,
class MFLOAT >
2529 Index I = domain[0];
2530 Index J = domain[1];
2531 r[I][J] = 0.25*(x[I+1][J+1] + x[I ][J+1] + x[I+1][J ] + x[I ][J ]);
2535 template <
class T1,
class MFLOAT >
2541 Index I = domain[0];
2542 Index J = domain[1];
2543 Index K = domain[2];
2544 r[I][J][K] = 0.125*(x[I+1][J+1][K+1] + x[I ][J+1][K+1] + x[I+1][J ][K+1] +
2545 x[I ][J ][K+1] + x[I+1][J+1][K ] + x[I ][J+1][K ] +
2546 x[I+1][J ][K ] + x[I ][J ][K ]);
double dot(const Vector3D &lhs, const Vector3D &rhs)
Vector dot product.
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, D > outerProduct(const Vektor< T1, D > &v1, const Vektor< T2, D > &v2)
void assign(const BareField< T, Dim > &a, RHS b, OP op, ExprTag< true >)
NDIndex< Dim > AddGuardCells(const NDIndex< Dim > &idx, const GuardCellSizes< Dim > &g)
T::PETE_Expr_t::PETE_Return_t max(const PETE_Expr< T > &expr, NDIndex< D > &loc)
T::PETE_Expr_t::PETE_Return_t min(const PETE_Expr< T > &expr, NDIndex< D > &loc)
Field< T, 1U, UniformCartesian< 1U, MFLOAT >, Cell > & Div(Field< Vektor< T, 1U >, 1U, UniformCartesian< 1U, MFLOAT >, Vert > &x, Field< T, 1U, UniformCartesian< 1U, MFLOAT >, Cell > &r)
Field< Vektor< T, 1U >, 1U, UniformCartesian< 1U, MFLOAT >, Cell > & Grad(Field< T, 1U, UniformCartesian< 1U, MFLOAT >, Vert > &x, Field< Vektor< T, 1U >, 1U, UniformCartesian< 1U, MFLOAT >, Cell > &r)
Field< Vektor< T, 3U >, 3U, UniformCartesian< 3U, MFLOAT >, Cell > & Grad1Ord(Field< T, 3U, UniformCartesian< 3U, MFLOAT >, Cell > &x, Field< Vektor< T, 3U >, 3U, UniformCartesian< 3U, MFLOAT >, Cell > &r)
void PETE_apply(OpUMeshExtrapolate< T > e, T &a, T b)
PETE_TUTree< FnAbs, typename T::PETE_Expr_t > abs(const PETE_Expr< T > &l)
Inform & endl(Inform &inf)
constexpr double e
The value of.
std::string::iterator iterator
Field< T1, 1U, Cartesian< 1U, MFLOAT >, Vert > & Average(Field< T1, 1U, Cartesian< 1U, MFLOAT >, Cell > &x, Field< T2, 1U, Cartesian< 1U, MFLOAT >, Cell > &w, Field< T1, 1U, Cartesian< 1U, MFLOAT >, Vert > &r)
NDIndex< Dim > plugBase(const NDIndex< D > &i) const
bool touches(const NDIndex< Dim > &) const
NDIndex< Dim > intersect(const NDIndex< Dim > &) const
unsigned rightGuard(unsigned d) const
ac_id_larray::iterator iterator_if
const GuardCellSizes< Dim > & getGuardCellSizes() const
virtual void fillGuardCells(bool reallyFill=true) const
unsigned leftGuard(unsigned d) const
const NDIndex< Dim > & getOwned() const
const NDIndex< Dim > & getAllocated() const
const iterator & begin() const
NDIndex< Dim > getVertexBelow(const Vektor< MFLOAT, Dim > &) const
void getSurfaceNormalFields(Field< Vektor< MFLOAT, Dim >, Dim, UniformCartesian< Dim, MFLOAT >, Cell > **) const
Field< Vektor< MFLOAT, Dim >, Dim, UniformCartesian< Dim, MFLOAT >, Vert > & getDeltaCellField(Field< Vektor< MFLOAT, Dim >, Dim, UniformCartesian< Dim, MFLOAT >, Vert > &) const
void set_origin(const Vektor< MFLOAT, Dim > &o)
Vektor< MFLOAT, Dim > * getSurfaceNormals(const NDIndex< Dim > &) const
Field< MFLOAT, Dim, UniformCartesian< Dim, MFLOAT >, Cell > & getCellVolumeField(Field< MFLOAT, Dim, UniformCartesian< Dim, MFLOAT >, Cell > &) const
Vektor< MFLOAT, Dim > getVertexPosition(const NDIndex< Dim > &) const
Field< Vektor< MFLOAT, Dim >, Dim, UniformCartesian< Dim, MFLOAT >, Cell > & getDeltaVertexField(Field< Vektor< MFLOAT, Dim >, Dim, UniformCartesian< Dim, MFLOAT >, Cell > &) const
MFLOAT get_meshSpacing(unsigned d) const
Field< Vektor< MFLOAT, Dim >, Dim, UniformCartesian< Dim, MFLOAT >, Cell > & getSurfaceNormalField(Field< Vektor< MFLOAT, Dim >, Dim, UniformCartesian< Dim, MFLOAT >, Cell > &, unsigned) const
MFLOAT get_volume() const
Vektor< MFLOAT, Dim > getDeltaVertex(const NDIndex< Dim > &) const
MFLOAT getCellVolume(const NDIndex< Dim > &) const
MFLOAT getCellRangeVolume(const NDIndex< Dim > &) const
Field< Vektor< MFLOAT, Dim >, Dim, UniformCartesian< Dim, MFLOAT >, Cell > & getCellPositionField(Field< Vektor< MFLOAT, Dim >, Dim, UniformCartesian< Dim, MFLOAT >, Cell > &) const
Field< Vektor< MFLOAT, Dim >, Dim, UniformCartesian< Dim, MFLOAT >, Vert > & getVertexPositionField(Field< Vektor< MFLOAT, Dim >, Dim, UniformCartesian< Dim, MFLOAT >, Vert > &) const
void set_meshSpacing(MFLOAT *const del)
NDIndex< Dim > getNearestVertex(const Vektor< MFLOAT, Dim > &) const
MFLOAT getVertRangeVolume(const NDIndex< Dim > &) const
void storeSpacingFields()
Vektor< MFLOAT, Dim > getCellPosition(const NDIndex< Dim > &) const
void print(std::ostream &)
Vektor< MFLOAT, Dim > get_origin() const
Vektor< MFLOAT, Dim > getSurfaceNormal(const NDIndex< Dim > &, unsigned) const
void initialize(const NDIndex< Dim > &ndi)
Vektor< MFLOAT, Dim > getDeltaCell(const NDIndex< Dim > &) const
unsigned int length() const
OpUMeshExtrapolate(T &o, T &s)