43template <
unsigned Dim,
class MFLOAT>
48 hasSpacingFields =
false;
54template <
unsigned Dim,
class MFLOAT>
60 gridSizes[d] = ndi[d].length();
62 for (d=0; d<
Dim; d++) {
65 origin(d) = ndi[d].first();
67 for (i=0; i < gridSizes[d]-1; i++) {
68 (meshSpacing[d])[i] = ndi[d].stride();
69 (meshPosition[d])[i] = MFLOAT(i);
71 (meshPosition[d])[gridSizes[d]-1] = MFLOAT(gridSizes[d]-1);
76template <
unsigned Dim,
class MFLOAT>
82 gridSizes[d] = ndi[d].length();
84 for (d=0; d<
Dim; d++) {
87 origin(d) = ndi[d].first();
89 set_meshSpacing(delX);
93template <
unsigned Dim,
class MFLOAT>
100 gridSizes[d] = ndi[d].length();
102 for (d=0; d<
Dim; d++) {
107 set_meshSpacing(delX);
111template <
unsigned Dim,
class MFLOAT>
117 for (d=0; d<
Dim; d++)
118 gridSizes[d] = ndi[d].length();
122 set_meshSpacing(delX);
130template <
unsigned Dim,
class MFLOAT>
134 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
135 gridSizes[0] = I.
length();
137 origin(0) = I.
first();
140 for (i=0; i < gridSizes[0]-1; i++) {
141 (meshSpacing[0])[i] = I.
stride();
142 (meshPosition[0])[i] = MFLOAT(i);
144 (meshPosition[0])[gridSizes[0]-1] = MFLOAT(gridSizes[0]-1);
145 for (
unsigned int d=0; d<
Dim; d++) {
152template <
unsigned Dim,
class MFLOAT>
156 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
157 gridSizes[0] = I.
length();
159 origin(0) = I.
first();
160 for (
unsigned int d=0; d<
Dim; d++) {
164 set_meshSpacing(delX);
168template <
unsigned Dim,
class MFLOAT>
173 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
175 gridSizes[0] = I.
length();
176 for (
unsigned int d=0; d<
Dim; d++) {
181 set_meshSpacing(delX);
185template <
unsigned Dim,
class MFLOAT>
190 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
192 gridSizes[0] = I.
length();
195 set_meshSpacing(delX);
200template <
unsigned Dim,
class MFLOAT>
204 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
205 gridSizes[0] = I.
length();
206 gridSizes[1] = J.
length();
208 origin(0) = I.
first();
209 origin(1) = J.
first();
212 for (i=0; i < gridSizes[0]-1; i++) {
213 (meshSpacing[0])[i] = I.
stride();
214 (meshPosition[0])[i] = MFLOAT(i);
216 (meshPosition[0])[gridSizes[0]-1] = MFLOAT(gridSizes[0]-1);
217 for (i=0; i < gridSizes[1]-1; i++) {
218 (meshSpacing[1])[i] = J.
stride();
219 (meshPosition[1])[i] = MFLOAT(i);
221 (meshPosition[1])[gridSizes[1]-1] = MFLOAT(gridSizes[1]-1);
222 for (
unsigned int d=0; d<
Dim; d++) {
229template <
unsigned Dim,
class MFLOAT>
233 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
234 gridSizes[0] = I.
length();
235 gridSizes[1] = J.
length();
237 origin(0) = I.
first();
238 origin(1) = J.
first();
239 for (
unsigned int d=0; d<
Dim; d++) {
243 set_meshSpacing(delX);
247template <
unsigned Dim,
class MFLOAT>
252 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
253 gridSizes[0] = I.
length();
254 gridSizes[1] = J.
length();
256 for (
unsigned int d=0; d<
Dim; d++) {
261 set_meshSpacing(delX);
265template <
unsigned Dim,
class MFLOAT>
270 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
271 gridSizes[0] = I.
length();
272 gridSizes[1] = J.
length();
276 set_meshSpacing(delX);
281template <
unsigned Dim,
class MFLOAT>
285 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
286 gridSizes[0] = I.
length();
287 gridSizes[1] = J.
length();
288 gridSizes[2] = K.
length();
291 origin(0) = I.
first();
292 origin(1) = J.
first();
293 origin(2) = K.
first();
296 for (i=0; i < gridSizes[0]-1; i++) {
297 (meshSpacing[0])[i] = I.
stride();
298 (meshPosition[0])[i] = MFLOAT(i);
300 (meshPosition[0])[gridSizes[0]-1] = MFLOAT(gridSizes[0]-1);
301 for (i=0; i < gridSizes[1]-1; i++) {
302 (meshSpacing[1])[i] = J.
stride();
303 (meshPosition[1])[i] = MFLOAT(i);
305 (meshPosition[1])[gridSizes[1]-1] = MFLOAT(gridSizes[1]-1);
306 for (i=0; i < gridSizes[2]-1; i++) {
307 (meshSpacing[2])[i] = K.
stride();
308 (meshPosition[2])[i] = MFLOAT(i);
310 (meshPosition[2])[gridSizes[2]-1] = MFLOAT(gridSizes[2]-1);
312 for (
unsigned int d=0; d<
Dim; d++) {
319template <
unsigned Dim,
class MFLOAT>
324 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
325 gridSizes[0] = I.
length();
326 gridSizes[1] = J.
length();
327 gridSizes[2] = K.
length();
329 origin(0) = I.
first();
330 origin(1) = J.
first();
331 origin(2) = K.
first();
332 for (
unsigned int d=0; d<
Dim; d++) {
336 set_meshSpacing(delX);
340template <
unsigned Dim,
class MFLOAT>
345 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
346 gridSizes[0] = I.
length();
347 gridSizes[1] = J.
length();
348 gridSizes[2] = K.
length();
350 for (
unsigned int d=0; d<
Dim; d++) {
355 set_meshSpacing(delX);
359template <
unsigned Dim,
class MFLOAT>
365 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
366 gridSizes[0] = I.
length();
367 gridSizes[1] = J.
length();
368 gridSizes[2] = K.
length();
372 set_meshSpacing(delX);
379template <
unsigned Dim,
class MFLOAT>
385 for (d=0; d<
Dim; d++)
386 gridSizes[d] = ndi[d].length();
388 for (d=0; d<
Dim; d++) {
391 origin(d) = ndi[d].first();
393 for (i=0; i < gridSizes[d]-1; i++) {
394 (meshSpacing[d])[i] = ndi[d].stride();
395 (meshPosition[d])[i] = MFLOAT(i);
397 (meshPosition[d])[gridSizes[d]-1] = MFLOAT(gridSizes[d]-1);
402template <
unsigned Dim,
class MFLOAT>
408 for (d=0; d<
Dim; d++)
409 gridSizes[d] = ndi[d].length();
411 for (d=0; d<
Dim; d++) {
414 origin(d) = ndi[d].first();
416 set_meshSpacing(delX);
420template <
unsigned Dim,
class MFLOAT>
427 for (d=0; d<
Dim; d++)
428 gridSizes[d] = ndi[d].length();
430 for (d=0; d<
Dim; d++) {
435 set_meshSpacing(delX);
439template <
unsigned Dim,
class MFLOAT>
446 for (d=0; d<
Dim; d++)
447 gridSizes[d] = ndi[d].length();
451 set_meshSpacing(delX);
459template <
unsigned Dim,
class MFLOAT>
464 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
465 gridSizes[0] = I.
length();
467 origin(0) = I.
first();
470 for (i=0; i < gridSizes[0]-1; i++) {
471 (meshSpacing[0])[i] = I.
stride();
472 (meshPosition[0])[i] = MFLOAT(i);
474 (meshPosition[0])[gridSizes[0]-1] = MFLOAT(gridSizes[0]-1);
475 for (
unsigned int d=0; d<
Dim; d++) {
482template <
unsigned Dim,
class MFLOAT>
487 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
488 gridSizes[0] = I.
length();
490 origin(0) = I.
first();
491 for (
unsigned int d=0; d<
Dim; d++) {
495 set_meshSpacing(delX);
499template <
unsigned Dim,
class MFLOAT>
505 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
507 gridSizes[0] = I.
length();
508 for (
unsigned int d=0; d<
Dim; d++) {
513 set_meshSpacing(delX);
517template <
unsigned Dim,
class MFLOAT>
523 PInsist(
Dim==1,
"Number of Index arguments does not match mesh dimension!!");
525 gridSizes[0] = I.
length();
528 set_meshSpacing(delX);
533template <
unsigned Dim,
class MFLOAT>
538 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
539 gridSizes[0] = I.
length();
540 gridSizes[1] = J.
length();
542 origin(0) = I.
first();
543 origin(1) = J.
first();
546 for (i=0; i < gridSizes[0]-1; i++) {
547 (meshSpacing[0])[i] = I.
stride();
548 (meshPosition[0])[i] = MFLOAT(i);
550 (meshPosition[0])[gridSizes[0]-1] = MFLOAT(gridSizes[0]-1);
551 for (i=0; i < gridSizes[1]-1; i++) {
552 (meshSpacing[1])[i] = J.
stride();
553 (meshPosition[1])[i] = MFLOAT(i);
555 (meshPosition[1])[gridSizes[1]-1] = MFLOAT(gridSizes[1]-1);
556 for (
unsigned int d=0; d<
Dim; d++) {
563template <
unsigned Dim,
class MFLOAT>
568 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
569 gridSizes[0] = I.
length();
570 gridSizes[1] = J.
length();
572 origin(0) = I.
first();
573 origin(1) = J.
first();
574 for (
unsigned int d=0; d<
Dim; d++) {
578 set_meshSpacing(delX);
582template <
unsigned Dim,
class MFLOAT>
588 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
589 gridSizes[0] = I.
length();
590 gridSizes[1] = J.
length();
592 for (
unsigned int d=0; d<
Dim; d++) {
597 set_meshSpacing(delX);
601template <
unsigned Dim,
class MFLOAT>
607 PInsist(
Dim==2,
"Number of Index arguments does not match mesh dimension!!");
608 gridSizes[0] = I.
length();
609 gridSizes[1] = J.
length();
613 set_meshSpacing(delX);
618template <
unsigned Dim,
class MFLOAT>
623 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
624 gridSizes[0] = I.
length();
625 gridSizes[1] = J.
length();
626 gridSizes[2] = K.
length();
629 origin(0) = I.
first();
630 origin(1) = J.
first();
631 origin(2) = K.
first();
634 for (i=0; i < gridSizes[0]-1; i++) {
635 (meshSpacing[0])[i] = I.
stride();
636 (meshPosition[0])[i] = MFLOAT(i);
638 (meshPosition[0])[gridSizes[0]-1] = MFLOAT(gridSizes[0]-1);
639 for (i=0; i < gridSizes[1]-1; i++) {
640 (meshSpacing[1])[i] = J.
stride();
641 (meshPosition[1])[i] = MFLOAT(i);
643 (meshPosition[1])[gridSizes[1]-1] = MFLOAT(gridSizes[1]-1);
644 for (i=0; i < gridSizes[2]-1; i++) {
645 (meshSpacing[2])[i] = K.
stride();
646 (meshPosition[2])[i] = MFLOAT(i);
648 (meshPosition[2])[gridSizes[2]-1] = MFLOAT(gridSizes[2]-1);
650 for (
unsigned int d=0; d<
Dim; d++) {
657template <
unsigned Dim,
class MFLOAT>
663 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
664 gridSizes[0] = I.
length();
665 gridSizes[1] = J.
length();
666 gridSizes[2] = K.
length();
668 origin(0) = I.
first();
669 origin(1) = J.
first();
670 origin(2) = K.
first();
671 for (
unsigned int d=0; d<
Dim; d++) {
675 set_meshSpacing(delX);
679template <
unsigned Dim,
class MFLOAT>
685 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
686 gridSizes[0] = I.
length();
687 gridSizes[1] = J.
length();
688 gridSizes[2] = K.
length();
690 for (
unsigned int d=0; d<
Dim; d++) {
695 set_meshSpacing(delX);
699template <
unsigned Dim,
class MFLOAT>
706 PInsist(
Dim==3,
"Number of Index arguments does not match mesh dimension!!");
707 gridSizes[0] = I.
length();
708 gridSizes[1] = J.
length();
709 gridSizes[2] = K.
length();
713 set_meshSpacing(delX);
721template<
unsigned Dim,
class MFLOAT>
726 for (
unsigned d=0; d<
Dim; ++d) {
727 (meshPosition[d])[0] = o(d);
728 for (
unsigned vert=1; vert<gridSizes[d]; ++vert) {
729 (meshPosition[d])[vert] = (meshPosition[d])[vert-1] +
730 (meshSpacing[d])[vert-1];
734 for (
unsigned face=0; face < 2*
Dim; ++face) updateMeshSpacingGuards(face);
735 this->notifyOfChange();
738template<
unsigned Dim,
class MFLOAT>
746template<
unsigned Dim,
class MFLOAT>
750 unsigned d, cell, face;
752 for (d=0;d<
Dim;++d) {
753 (meshPosition[d])[0] = origin(d);
754 for (cell=0; cell < gridSizes[d]-1; cell++) {
755 (meshSpacing[d])[cell] = del[d][cell];
756 (meshPosition[d])[cell+1] = (meshPosition[d])[cell] + del[d][cell];
760 for (face=0; face < 2*
Dim; ++face) updateMeshSpacingGuards(face);
762 if (hasSpacingFields) storeSpacingFields();
763 this->notifyOfChange();
767template<
unsigned Dim,
class MFLOAT>
773 for (d=1;d<
Dim;++d) coef *= 0.5;
775 for (d=0;d<
Dim;++d) {
777 for (
unsigned b=0; b<(1<<
Dim); ++b) {
778 int s = ( b&(1<<d) ) ? 1 : -1;
785template<
unsigned Dim,
class MFLOAT>
790 for (
unsigned int cell=0; cell < gridSizes[d]-1; cell++)
791 spacings[cell] = (*(meshSpacing[d].
find(cell))).second;
830 a = b*
e.Slope+
e.Offset;
838template<
unsigned Dim,
class MFLOAT>
844 for (
unsigned int d=0; d<
Dim; d++) et[d] =
PARALLEL;
845 storeSpacingFields(et, -1);
848template<
unsigned Dim,
class MFLOAT>
854 storeSpacingFields(et, vnodes);
857template<
unsigned Dim,
class MFLOAT>
864 storeSpacingFields(et, vnodes);
867template<
unsigned Dim,
class MFLOAT>
875 storeSpacingFields(et, vnodes);
880template<
unsigned Dim,
class MFLOAT>
885 int currentLocation[
Dim];
887 for (d=0; d<
Dim; d++) {
888 cells[d] =
Index(gridSizes[d]-1);
889 verts[d] =
Index(gridSizes[d]);
891 if (!hasSpacingFields) {
907 cfi_end = vertSpacings.
end();
908 for (cfi = vertSpacings.
begin(); cfi != cfi_end; ++cfi) {
909 cfi.GetCurrentLocation(currentLocation);
910 for (d=0; d<
Dim; d++)
911 vertexSpacing(d) = (*(meshSpacing[d].find(currentLocation[d]))).second;
912 *cfi = vertexSpacing;
919 vfi_end = cellSpacings.
end();
920 for (vfi = cellSpacings.
begin(); vfi != vfi_end; ++vfi) {
921 vfi.GetCurrentLocation(currentLocation);
922 for (d=0; d<
Dim; d++)
923 cellSpacing(d) = 0.5 * ((meshSpacing[d])[currentLocation[d]] +
924 (meshSpacing[d])[currentLocation[d]-1]);
942 int coffset, voffset;
945 for (
unsigned int face=0; face < 2*
Dim; face++) {
956 cSlab[d] =
Index(verts[d].
max() + 1,
958 vSlab[d] =
Index(cells[d].
max() + 1,
967 switch (MeshBC[face]) {
971 coffset = -verts[d].length();
972 voffset = -cells[d].length();
974 coffset = verts[d].length();
975 voffset = cells[d].length();
981 coffset = 2*verts[d].max() + 1;
982 voffset = 2*cells[d].max() + 1 - 1;
984 coffset = 2*verts[d].min() - 1;
985 voffset = 2*cells[d].min() - 1 + 1;
991 coffset = 2*verts[d].max() + 1;
992 voffset = 2*cells[d].max() + 1 - 1;
994 coffset = 2*verts[d].min() - 1;
995 voffset = 2*cells[d].min() - 1 + 1;
999 throw IpplException(
"Cartesian::storeSpacingFields",
"unknown MeshBC type");
1004 for (cfill_i=cellSpacings.
begin_if();
1005 cfill_i!=cellSpacings.
end_if(); ++cfill_i)
1016 if ( cSlab.
touches( fill_alloc ) )
1029 src[d] = coffset - src[d];
1034 for (from_i=cellSpacings.
begin_if();
1035 from_i!=cellSpacings.
end_if(); ++from_i)
1042 if ( src.
touches( from_owned ) )
1048 LFI lhs = fill.
begin(cfill_it);
1049 LFI rhs = from.
begin(from_it);
1070 for (vfill_i=vertSpacings.
begin_if();
1071 vfill_i!=vertSpacings.
end_if(); ++vfill_i)
1082 if ( vSlab.
touches( fill_alloc ) )
1095 src[d] = voffset - src[d];
1100 for (from_i=vertSpacings.
begin_if();
1101 from_i!=vertSpacings.
end_if(); ++from_i)
1108 if ( src.
touches( from_owned ) )
1114 LFI lhs = fill.
begin(vfill_it);
1115 LFI rhs = from.
begin(from_it);
1138 hasSpacingFields =
true;
1150template<
unsigned Dim,
class MFLOAT>
1158 unsigned vnodesPerDirection[
Dim];
1159 vnodesPerDirection[0] = vnodes1;
1160 storeSpacingFields(et, vnodesPerDirection, recurse, vnodes);
1163template<
unsigned Dim,
class MFLOAT>
1166 unsigned vnodes1,
unsigned vnodes2,
1167 bool recurse,
int vnodes) {
1171 unsigned vnodesPerDirection[
Dim];
1172 vnodesPerDirection[0] = vnodes1;
1173 vnodesPerDirection[1] = vnodes2;
1174 storeSpacingFields(et, vnodesPerDirection, recurse, vnodes);
1177template<
unsigned Dim,
class MFLOAT>
1180 unsigned vnodes1,
unsigned vnodes2,
unsigned vnodes3,
1181 bool recurse,
int vnodes) {
1186 unsigned vnodesPerDirection[
Dim];
1187 vnodesPerDirection[0] = vnodes1;
1188 vnodesPerDirection[1] = vnodes2;
1189 vnodesPerDirection[2] = vnodes3;
1190 storeSpacingFields(et, vnodesPerDirection, recurse, vnodes);
1197template<
unsigned Dim,
class MFLOAT>
1200 unsigned* vnodesPerDirection,
1201 bool recurse,
int vnodes) {
1203 int currentLocation[
Dim];
1205 for (d=0; d<
Dim; d++) {
1206 cells[d] =
Index(gridSizes[d]-1);
1207 verts[d] =
Index(gridSizes[d]);
1209 if (!hasSpacingFields) {
1227 cfi_end = vertSpacings.
end();
1228 for (cfi = vertSpacings.
begin(); cfi != cfi_end; ++cfi) {
1229 cfi.GetCurrentLocation(currentLocation);
1230 for (d=0; d<
Dim; d++)
1231 vertexSpacing(d) = (*(meshSpacing[d].find(currentLocation[d]))).second;
1232 *cfi = vertexSpacing;
1239 vfi_end = cellSpacings.
end();
1240 for (vfi = cellSpacings.
begin(); vfi != vfi_end; ++vfi) {
1241 vfi.GetCurrentLocation(currentLocation);
1242 for (d=0; d<
Dim; d++)
1243 cellSpacing(d) = 0.5 * ((meshSpacing[d])[currentLocation[d]] +
1244 (meshSpacing[d])[currentLocation[d]-1]);
1263 int coffset, voffset;
1266 for (face=0; face < 2*
Dim; face++) {
1277 cSlab[d] =
Index(verts[d].
max() + 1,
1279 vSlab[d] =
Index(cells[d].
max() + 1,
1283 verts[d].min() - 1);
1285 cells[d].min() - 1);
1288 switch (MeshBC[face]) {
1292 coffset = -verts[d].length();
1293 voffset = -cells[d].length();
1295 coffset = verts[d].length();
1296 voffset = cells[d].length();
1302 coffset = 2*verts[d].max() + 1;
1303 voffset = 2*cells[d].max() + 1 - 1;
1305 coffset = 2*verts[d].min() - 1;
1306 voffset = 2*cells[d].min() - 1 + 1;
1312 coffset = 2*verts[d].max() + 1;
1313 voffset = 2*cells[d].max() + 1 - 1;
1315 coffset = 2*verts[d].min() - 1;
1316 voffset = 2*cells[d].min() - 1 + 1;
1320 ERRORMSG(
"Cartesian::storeSpacingFields(): unknown MeshBC type" <<
endl);
1326 for (cfill_i=cellSpacings.
begin_if();
1327 cfill_i!=cellSpacings.
end_if(); ++cfill_i)
1338 if ( cSlab.
touches( fill_alloc ) )
1351 src[d] = coffset - src[d];
1356 for (from_i=cellSpacings.
begin_if();
1357 from_i!=cellSpacings.
end_if(); ++from_i)
1364 if ( src.
touches( from_owned ) )
1370 LFI lhs = fill.
begin(cfill_it);
1371 LFI rhs = from.
begin(from_it);
1392 for (vfill_i=vertSpacings.
begin_if();
1393 vfill_i!=vertSpacings.
end_if(); ++vfill_i)
1404 if ( vSlab.
touches( fill_alloc ) )
1417 src[d] = voffset - src[d];
1422 for (from_i=vertSpacings.
begin_if();
1423 from_i!=vertSpacings.
end_if(); ++from_i)
1430 if ( src.
touches( from_owned ) )
1436 LFI lhs = fill.
begin(vfill_it);
1437 LFI rhs = from.
begin(from_it);
1460 hasSpacingFields =
true;
1468template<
unsigned Dim,
class MFLOAT >
1471print(std::ostream& out)
1474 out <<
"======Cartesian<" <<
Dim <<
",MFLOAT>==begin======" <<
std::endl;
1475 for (d=0; d <
Dim; d++)
1476 out <<
"gridSizes[" << d <<
"] = " << gridSizes[d] <<
std::endl;
1477 out <<
"origin = " << origin <<
std::endl;
1478 for (d=0; d <
Dim; d++) {
1479 out <<
"--------meshSpacing[" << d <<
"]---------" <<
std::endl;
1481 for (mi=meshSpacing[d].
begin(); mi != meshSpacing[d].end(); ++mi) {
1482 out <<
"meshSpacing[" << d <<
"][" << (*mi).first <<
"] = "
1486 for (
unsigned b=0; b < (1<<
Dim); b++)
1487 out <<
"Dvc[" << b <<
"] = " << Dvc[b] <<
std::endl;
1488 for (d=0; d <
Dim; d++)
1492 out <<
"======Cartesian<" <<
Dim <<
",MFLOAT>==end========" <<
std::endl;
1500template <
unsigned Dim,
class MFLOAT>
1505 MFLOAT volume = 1.0;
1506 for (
unsigned int d=0; d<
Dim; d++)
1507 if (ndi[d].length() != 1) {
1508 ERRORMSG(
"Cartesian::getCellVolume() error: arg is not a NDIndex"
1509 <<
"specifying a single element" <<
endl);
1512 volume *= (*(meshSpacing[d].find(ndi[d].first()))).second;
1517template <
unsigned Dim,
class MFLOAT>
1526 int currentLocation[
Dim];
1527 volumes.Uncompress();
1530 fi_end=volumes.end();
1531 for (fi = volumes.
begin(); fi != fi_end; ++fi) {
1532 fi.GetCurrentLocation(currentLocation);
1533 for (
unsigned int d=0; d<
Dim; d++)
1534 *fi *= (*(meshSpacing[d].
find(currentLocation[d]))).second;
1539template <
unsigned Dim,
class MFLOAT>
1548 for (d=0; d<
Dim; d++) {
1549 i0 = ndi[d].first();
1550 if ( (i0 < -(
int(gridSizes[d])-1)/2) ||
1551 (i0 > 3*(
int(gridSizes[d])-1)/2) )
1552 ERRORMSG(
"Cartesian::getVertRangeVolume() error: " << ndi
1553 <<
" is an NDIndex ranging outside the mesh and guard layers;"
1554 <<
" not allowed." <<
endl);
1555 v0(d) = (*(meshPosition[d].find(i0))).second;
1557 if ( (i1 < -(
int(gridSizes[d])-1)/2) ||
1558 (i1 > 3*(
int(gridSizes[d])-1)/2) )
1559 ERRORMSG(
"Cartesian::getVertRangeVolume() error: " << ndi
1560 <<
" is an NDIndex ranging outside the mesh and guard layers;"
1561 <<
" not allowed." <<
endl);
1562 v1(d) = (*(meshPosition[d].find(i1))).second;
1565 MFLOAT volume = 1.0;
1566 for (d=0; d<
Dim; d++) volume *=
std::abs(v1(d) - v0(d));
1570template <
unsigned Dim,
class MFLOAT>
1578 for (
unsigned int d=0; d<
Dim; d++) {
1579 i0 = ndi[d].first();
1580 if ( (i0 < -(
int(gridSizes[d])-1)/2) ||
1581 (i0 > 3*(
int(gridSizes[d])-1)/2) )
1582 ERRORMSG(
"Cartesian::getCellRangeVolume() error: " << ndi
1583 <<
" is an NDIndex ranging outside the mesh and guard layers;"
1584 <<
" not allowed." <<
endl);
1585 v0(d) = (*(meshPosition[d].find(i0))).second;
1586 i1 = ndi[d].last()+1;
1587 if ( (i1 < -(
int(gridSizes[d])-1)/2) ||
1588 (i1 > 3*(
int(gridSizes[d])-1)/2) )
1589 ERRORMSG(
"Cartesian::getCellRangeVolume() error: " << ndi
1590 <<
" is an NDIndex ranging outside the mesh and guard layers;"
1591 <<
" not allowed." <<
endl);
1592 v1(d) = (*(meshPosition[d].find(i1))).second;
1595 MFLOAT volume = 1.0;
1596 for (
unsigned int d=0; d<
Dim; d++) volume *=
std::abs(v1(d) - v0(d));
1601template <
unsigned Dim,
class MFLOAT>
1608 for (d=0; d<
Dim; d++) {
1609 int gs = (int(gridSizes[d])-1)/2;
1610 boxMin(d) = (*(meshPosition[d].find(-gs))).second;
1611 boxMax(d) = (*(meshPosition[d].find(3*gs))).second;
1613 for (d=0; d<
Dim; d++)
1614 if ( (x(d) < boxMin(d)) || (x(d) > boxMax(d)) )
1615 ERRORMSG(
"Cartesian::getNearestVertex() - input point is outside"
1616 <<
" mesh boundary and guard layers; not allowed." <<
endl);
1620 MFLOAT xVertexBelow, xVertexAbove, xVertex;
1621 int vertBelow, vertAbove, vertNearest[
Dim];
1622 for (d=0; d<
Dim; d++) {
1623 vertBelow = -(int(gridSizes[d])-1)/2;
1624 vertAbove = 3*(int(gridSizes[d])-1)/2;
1625 xVertexBelow = (*(meshPosition[d].find(vertBelow))).second;
1626 xVertexAbove = (*(meshPosition[d].find(vertAbove))).second;
1628 if (x(d) < xVertexBelow) {
1629 vertNearest[d] = vertBelow;
1632 if (x(d) > xVertexAbove) {
1633 vertNearest[d] = vertAbove;
1636 while (vertAbove > vertBelow+1) {
1637 vertNearest[d] = (vertAbove+vertBelow)/2;
1638 xVertex = (*(meshPosition[d].find(vertNearest[d]))).second;
1639 if (x(d) > xVertex) {
1640 vertBelow = vertNearest[d];
1641 xVertexBelow = xVertex;
1643 else if (x(d) < xVertex) {
1644 vertAbove = vertNearest[d];
1645 xVertexAbove = xVertex;
1648 vertAbove = vertBelow;
1651 if (vertAbove != vertBelow) {
1652 if ((x(d)-xVertexBelow)<(xVertexAbove-x(d))) {
1653 vertNearest[d] = vertBelow;
1656 vertNearest[d] = vertAbove;
1663 for (d=0; d<
Dim; d++) ndi[d] =
Index(vertNearest[d],vertNearest[d],1);
1668template <
unsigned Dim,
class MFLOAT>
1675 for (d=0; d<
Dim; d++) {
1676 int gs = (int(gridSizes[d]) - 1)/2;
1677 boxMin(d) = (*(meshPosition[d].find(-gs))).second;
1678 boxMax(d) = (*(meshPosition[d].find(3*gs))).second;
1680 for (d=0; d<
Dim; d++)
1681 if ( (x(d) < boxMin(d)) || (x(d) > boxMax(d)) )
1682 ERRORMSG(
"Cartesian::getVertexBelow() - input point is outside"
1683 <<
" mesh boundary and guard layers; not allowed." <<
endl);
1686 MFLOAT xVertexBelow, xVertexAbove, xVertex;
1687 int vertBelow, vertAbove, vertNearest[
Dim];
1688 for (d=0; d<
Dim; d++) {
1689 vertBelow = -(int(gridSizes[d])-1)/2;
1690 vertAbove = 3*(int(gridSizes[d])-1)/2;
1691 xVertexBelow = (*(meshPosition[d].find(vertBelow))).second;
1692 xVertexAbove = (*(meshPosition[d].find(vertAbove))).second;
1694 if (x(d) < xVertexBelow) {
1695 vertNearest[d] = vertBelow;
1698 if (x(d) > xVertexAbove) {
1699 vertNearest[d] = vertAbove;
1702 while (vertAbove > vertBelow+1) {
1703 vertNearest[d] = (vertAbove+vertBelow)/2;
1704 xVertex = (*(meshPosition[d].find(vertNearest[d]))).second;
1705 if (x(d) > xVertex) {
1706 vertBelow = vertNearest[d];
1707 xVertexBelow = xVertex;
1709 else if (x(d) < xVertex) {
1710 vertAbove = vertNearest[d];
1711 xVertexAbove = xVertex;
1714 vertAbove = vertBelow;
1717 if (vertAbove != vertBelow) {
1718 vertNearest[d] = vertBelow;
1724 for (d=0; d<
Dim; d++) ndi[d] =
Index(vertNearest[d],vertNearest[d],1);
1729template <
unsigned Dim,
class MFLOAT>
1737 for (d=0; d<
Dim; d++) {
1738 if (ndi[d].length() != 1)
1739 ERRORMSG(
"Cartesian::getVertexPosition() error: " << ndi
1740 <<
" is not an NDIndex specifying a single element" <<
endl);
1742 if ( (i < -(
int(gridSizes[d])-1)/2) ||
1743 (i > 3*(
int(gridSizes[d])-1)/2) )
1744 ERRORMSG(
"Cartesian::getVertexPosition() error: " << ndi
1745 <<
" is an NDIndex outside the mesh and guard layers;"
1746 <<
" not allowed." <<
endl);
1747 vertexPosition(d) = (*(meshPosition[d].find(i))).second;
1749 return vertexPosition;
1752template <
unsigned Dim,
class MFLOAT>
1758 int currentLocation[
Dim];
1760 vertexPositions.Uncompress();
1762 fi_end = vertexPositions.end();
1763 for (fi = vertexPositions.
begin(); fi != fi_end; ++fi) {
1765 fi.GetCurrentLocation(currentLocation);
1766 for (
unsigned int d=0; d<
Dim; d++) {
1767 vertexPosition(d) = (*(meshPosition[d].find(currentLocation[d]))).second;
1769 *fi = vertexPosition;
1771 return vertexPositions;
1775template <
unsigned Dim,
class MFLOAT>
1783 for (d=0; d<
Dim; d++) {
1784 if (ndi[d].length() != 1)
1785 ERRORMSG(
"Cartesian::getCellPosition() error: " << ndi
1786 <<
" is not an NDIndex specifying a single element" <<
endl);
1788 if ( (i < -(
int(gridSizes[d])-1)/2) ||
1789 (i >= 3*(
int(gridSizes[d])-1)/2) )
1790 ERRORMSG(
"Cartesian::getCellPosition() error: " << ndi
1791 <<
" is an NDIndex outside the mesh and guard layers;"
1792 <<
" not allowed." <<
endl);
1793 cellPosition(d) = 0.5 * ( (*(meshPosition[d].find(i))).second +
1794 (*(meshPosition[d].find(i+1))).second );
1796 return cellPosition;
1799template <
unsigned Dim,
class MFLOAT>
1805 int currentLocation[
Dim];
1807 cellPositions.Uncompress();
1809 fi_end = cellPositions.end();
1810 for (fi = cellPositions.
begin(); fi != fi_end; ++fi) {
1812 fi.GetCurrentLocation(currentLocation);
1813 for (
unsigned int d=0; d<
Dim; d++) {
1815 0.5 * ( (*(meshPosition[d].find(currentLocation[d]))).second +
1816 (*(meshPosition[d].find(currentLocation[d]+1))).second );
1820 return cellPositions;
1824template <
unsigned Dim,
class MFLOAT>
1832 for (
unsigned int d=0; d<
Dim; d++) {
1834 int a = ndi[d].first();
1835 int b = ndi[d].last();
1837 int tmpa =
a;
a = b; b = tmpa;
1841 if (
a < -((
int(gridSizes[d])-1)/2) || b >= 3*(
int(gridSizes[d])-1)/2) {
1842 ERRORMSG(
"Cartesian::getDeltaVertex() error: " << ndi
1843 <<
" is an NDIndex ranging outside"
1844 <<
" the mesh and guard layers region; not allowed."
1851 vertexVertexSpacing[d] += (*(meshSpacing[d].find(
a++))).second;
1854 return vertexVertexSpacing;
1858template <
unsigned Dim,
class MFLOAT>
1864 int currentLocation[
Dim];
1866 vertexSpacings.Uncompress();
1868 fi_end = vertexSpacings.end();
1869 for (fi = vertexSpacings.
begin(); fi != fi_end; ++fi) {
1870 fi.GetCurrentLocation(currentLocation);
1871 for (
unsigned int d=0; d<
Dim; d++)
1872 vertexVertexSpacing[d]=(*(meshSpacing[d].
find(currentLocation[d]))).second;
1873 *fi = vertexVertexSpacing;
1875 return vertexSpacings;
1879template <
unsigned Dim,
class MFLOAT>
1887 for (
unsigned int d=0; d<
Dim; d++) {
1889 int a = ndi[d].first();
1890 int b = ndi[d].last();
1892 int tmpa =
a;
a = b; b = tmpa;
1896 if (
a <= -(
int(gridSizes[d])-1)/2 || b >= 3*(
int(gridSizes[d])-1)/2) {
1897 ERRORMSG(
"Cartesian::getDeltaCell() error: " << ndi
1898 <<
" is an NDIndex ranging outside"
1899 <<
" the mesh and guard layers region; not allowed."
1905 cellCellSpacing[d] += ((*(meshSpacing[d].find(
a))).second +
1906 (*(meshSpacing[d].find(
a-1))).second) * 0.5;
1910 return cellCellSpacing;
1914template <
unsigned Dim,
class MFLOAT>
1920 int currentLocation[
Dim];
1922 cellSpacings.Uncompress();
1924 fi_end = cellSpacings.end();
1925 for (fi = cellSpacings.
begin(); fi != fi_end; ++fi) {
1926 fi.GetCurrentLocation(currentLocation);
1927 for (
unsigned int d=0; d<
Dim; d++)
1928 cellCellSpacing[d]+=((*(meshSpacing[d].
find(currentLocation[d]))).second +
1929 (*(meshSpacing[d].
find(currentLocation[d]-1))).second) * 0.5;
1930 *fi = cellCellSpacing;
1932 return cellSpacings;
1935template <
unsigned Dim,
class MFLOAT>
1942 for (d=0; d<
Dim; d++) {
1943 for (i=0; i<
Dim; i++) {
1944 surfaceNormals[2*d](i) = 0.0;
1945 surfaceNormals[2*d+1](i) = 0.0;
1947 surfaceNormals[2*d](d) = -1.0;
1948 surfaceNormals[2*d+1](d) = 1.0;
1950 return surfaceNormals;
1953template <
unsigned Dim,
class MFLOAT>
1958 surfaceNormalsFields )
const
1962 for (d=0; d<
Dim; d++) {
1963 for (i=0; i<
Dim; i++) {
1964 surfaceNormals[2*d](i) = 0.0;
1965 surfaceNormals[2*d+1](i) = 0.0;
1967 surfaceNormals[2*d](d) = -1.0;
1968 surfaceNormals[2*d+1](d) = 1.0;
1970 for (d=0; d<2*
Dim; d++)
assign((*(surfaceNormalsFields[d])),
1979template <
unsigned Dim,
class MFLOAT>
1991 for (d=0; d<
Dim; d++) {
1992 if ((face/2) == d) {
1993 surfaceNormal(face) = -1.0;
1995 surfaceNormal(face) = 0.0;
1999 for (d=0; d<
Dim; d++) {
2000 if ((face/2) == d) {
2001 surfaceNormal(face) = 1.0;
2003 surfaceNormal(face) = 0.0;
2007 return surfaceNormal;
2010template <
unsigned Dim,
class MFLOAT>
2015 unsigned face)
const
2024 for (d=0; d<
Dim; d++) {
2025 if ((face/2) == d) {
2026 surfaceNormal(face) = -1.0;
2028 surfaceNormal(face) = 0.0;
2032 for (d=0; d<
Dim; d++) {
2033 if ((face/2) == d) {
2034 surfaceNormal(face) = 1.0;
2036 surfaceNormal(face) = 0.0;
2040 surfaceNormalField = surfaceNormal;
2041 return surfaceNormalField;
2048template <
unsigned Dim,
class MFLOAT>
2053 MeshBC[face] = meshBCType;
2054 updateMeshSpacingGuards(face);
2056 if (hasSpacingFields) storeSpacingFields();
2059template <
unsigned Dim,
class MFLOAT>
2064 for (
unsigned int face=0; face < 2*
Dim; face++) {
2065 MeshBC[face] = meshBCTypes[face];
2066 updateMeshSpacingGuards(face);
2069 if (hasSpacingFields) storeSpacingFields();
2072template <
unsigned Dim,
class MFLOAT>
2081 unsigned int cell, guardLayer;
2088 switch (MeshBC[d*2]) {
2090 for (guardLayer = 0; guardLayer <= (gridSizes[d]-1)/2; guardLayer++) {
2091 cell = gridSizes[d] - 1 + guardLayer;
2092 (meshSpacing[d])[cell] = (meshSpacing[d])[guardLayer];
2093 (meshPosition[d])[cell+1] = (meshPosition[d])[cell] +
2094 (meshSpacing[d])[cell];
2098 for (guardLayer = 0; guardLayer <= (gridSizes[d]-1)/2; guardLayer++) {
2099 cell = gridSizes[d] - 1 + guardLayer;
2100 (meshSpacing[d])[cell] = (meshSpacing[d])[cell - guardLayer - 1];
2101 (meshPosition[d])[cell+1] = (meshPosition[d])[cell] +
2102 (meshSpacing[d])[cell];
2106 for (guardLayer = 0; guardLayer <= (gridSizes[d]-1)/2; guardLayer++) {
2107 cell = gridSizes[d] - 1 + guardLayer;
2108 (meshSpacing[d])[cell] = 0;
2109 (meshPosition[d])[cell+1] = (meshPosition[d])[cell] +
2110 (meshSpacing[d])[cell];
2114 ERRORMSG(
"Cartesian::updateMeshSpacingGuards(): unknown MeshBC type"
2121 switch (MeshBC[d]) {
2123 for (guardLayer = 0; guardLayer <= (gridSizes[d]-1)/2; guardLayer++) {
2124 cell = -1 - guardLayer;
2125 (meshSpacing[d])[cell] = (meshSpacing[d])[gridSizes[d] + cell];
2126 (meshPosition[d])[cell] = (meshPosition[d])[cell+1] -
2127 (meshSpacing[d])[cell];
2131 for (guardLayer = 0; guardLayer <= (gridSizes[d]-1)/2; guardLayer++) {
2132 cell = -1 - guardLayer;
2133 (meshSpacing[d])[cell] = (meshSpacing[d])[-cell - 1];
2134 (meshPosition[d])[cell] = (meshPosition[d])[cell+1] -
2135 (meshSpacing[d])[cell];
2139 for (guardLayer = 0; guardLayer <= (gridSizes[d]-1)/2; guardLayer++) {
2140 cell = -1 - guardLayer;
2141 (meshSpacing[d])[cell] = 0;
2142 (meshPosition[d])[cell] = (meshPosition[d])[cell+1] -
2143 (meshSpacing[d])[cell];
2147 ERRORMSG(
"Cartesian::updateMeshSpacingGuards(): unknown MeshBC type"
2156template <
unsigned Dim,
class MFLOAT>
2166template <
unsigned Dim,
class MFLOAT>
2172 for (
unsigned int b=0; b < 2*
Dim; b++) mb[b] = MeshBC[b];
2190template <
class T,
class MFLOAT >
2195 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2198 Index I = domain[0];
2200 dot(x[I ], x.get_mesh().Dvc[0]/vertSpacings[I]) +
2201 dot(x[I+1], x.get_mesh().Dvc[1]/vertSpacings[I]);
2205template <
class T,
class MFLOAT >
2210 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2213 Index I = domain[0];
2214 Index J = domain[1];
2216 dot(x[I ][J ], x.get_mesh().Dvc[0]/vertSpacings[I][J]) +
2217 dot(x[I+1][J ], x.get_mesh().Dvc[1]/vertSpacings[I][J]) +
2218 dot(x[I ][J+1], x.get_mesh().Dvc[2]/vertSpacings[I][J]) +
2219 dot(x[I+1][J+1], x.get_mesh().Dvc[3]/vertSpacings[I][J]);
2223template <
class T,
class MFLOAT >
2228 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2231 Index I = domain[0];
2232 Index J = domain[1];
2233 Index K = domain[2];
2235 dot(x[I ][J ][K ], x.get_mesh().Dvc[0]/vertSpacings[I][J][K]) +
2236 dot(x[I+1][J ][K ], x.get_mesh().Dvc[1]/vertSpacings[I][J][K]) +
2237 dot(x[I ][J+1][K ], x.get_mesh().Dvc[2]/vertSpacings[I][J][K]) +
2238 dot(x[I+1][J+1][K ], x.get_mesh().Dvc[3]/vertSpacings[I][J][K]) +
2239 dot(x[I ][J ][K+1], x.get_mesh().Dvc[4]/vertSpacings[I][J][K]) +
2240 dot(x[I+1][J ][K+1], x.get_mesh().Dvc[5]/vertSpacings[I][J][K]) +
2241 dot(x[I ][J+1][K+1], x.get_mesh().Dvc[6]/vertSpacings[I][J][K]) +
2242 dot(x[I+1][J+1][K+1], x.get_mesh().Dvc[7]/vertSpacings[I][J][K]);
2248template <
class T,
class MFLOAT >
2253 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2256 Index I = domain[0];
2258 dot(x[I-1], x.get_mesh().Dvc[0]/cellSpacings[I]) +
2259 dot(x[I ], x.get_mesh().Dvc[1]/cellSpacings[I]);
2263template <
class T,
class MFLOAT >
2268 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2271 Index I = domain[0];
2272 Index J = domain[1];
2274 dot(x[I-1][J-1], x.get_mesh().Dvc[0]/cellSpacings[I][J]) +
2275 dot(x[I ][J-1], x.get_mesh().Dvc[1]/cellSpacings[I][J]) +
2276 dot(x[I-1][J ], x.get_mesh().Dvc[2]/cellSpacings[I][J]) +
2277 dot(x[I ][J ], x.get_mesh().Dvc[3]/cellSpacings[I][J]);
2281template <
class T,
class MFLOAT >
2286 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2289 Index I = domain[0];
2290 Index J = domain[1];
2291 Index K = domain[2];
2293 dot(x[I-1][J-1][K-1], x.get_mesh().Dvc[0]/cellSpacings[I][J][K]) +
2294 dot(x[I ][J-1][K-1], x.get_mesh().Dvc[1]/cellSpacings[I][J][K]) +
2295 dot(x[I-1][J ][K-1], x.get_mesh().Dvc[2]/cellSpacings[I][J][K]) +
2296 dot(x[I ][J ][K-1], x.get_mesh().Dvc[3]/cellSpacings[I][J][K]) +
2297 dot(x[I-1][J-1][K ], x.get_mesh().Dvc[4]/cellSpacings[I][J][K]) +
2298 dot(x[I ][J-1][K ], x.get_mesh().Dvc[5]/cellSpacings[I][J][K]) +
2299 dot(x[I-1][J ][K ], x.get_mesh().Dvc[6]/cellSpacings[I][J][K]) +
2300 dot(x[I ][J ][K ], x.get_mesh().Dvc[7]/cellSpacings[I][J][K]);
2321template <
class T,
class MFLOAT >
2326 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2329 Index I = domain[0];
2332 r[I] =
dot(idx, (x[I+1] - x[I-1])/(vS[I ] + vS[I-1]));
2336template <
class T,
class MFLOAT >
2341 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2344 Index I = domain[0];
2345 Index J = domain[1];
2352 dot(idx, (x[I+1][J ] - x[I-1][J ])/(vS[I ][J ] + vS[I-1][J ])) +
2353 dot(idy, (x[I ][J+1] - x[I ][J-1])/(vS[I ][J ] + vS[I ][J-1]));
2357template <
class T,
class MFLOAT >
2362 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2365 Index I = domain[0];
2366 Index J = domain[1];
2367 Index K = domain[2];
2379 dot(idx, ((x[I+1][J ][K ] - x[I-1][J ][K ])/
2380 (vS[I ][J ][K ] + vS[I-1][J ][K ]))) +
2381 dot(idy, ((x[I ][J+1][K ] - x[I ][J-1][K ])/
2382 (vS[I ][J ][K ] + vS[I ][J-1][K ]))) +
2383 dot(idz, ((x[I ][J ][K+1] - x[I ][J ][K-1])/
2384 (vS[I ][J ][K ] + vS[I ][J ][K-1])));
2394template <
class T,
class MFLOAT >
2399 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2402 Index I = domain[0];
2405 r[I] =
dot(idx, (x[I+1] - x[I-1])/(cS[I ] + cS[I-1]));
2409template <
class T,
class MFLOAT >
2414 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2417 Index I = domain[0];
2418 Index J = domain[1];
2425 dot(idx, (x[I+1][J ] - x[I-1][J ])/(cS[I ][J ] + cS[I-1][J ])) +
2426 dot(idy, (x[I ][J+1] - x[I ][J-1])/(cS[I ][J ] + cS[I ][J-1]));
2430template <
class T,
class MFLOAT >
2435 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2438 Index I = domain[0];
2439 Index J = domain[1];
2440 Index K = domain[2];
2452 dot(idx, ((x[I+1][J ][K ] - x[I-1][J ][K ])/
2453 (cS[I ][J ][K ] + cS[I-1][J ][K ]))) +
2454 dot(idy, ((x[I ][J+1][K ] - x[I ][J-1][K ])/
2455 (cS[I ][J ][K ] + cS[I ][J-1][K ]))) +
2456 dot(idz, ((x[I ][J ][K+1] - x[I ][J ][K-1])/
2457 (cS[I ][J ][K ] + cS[I ][J ][K-1])));
2463template <
class T,
class MFLOAT >
2468 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2471 Index I = domain[0];
2473 dot(x[I ], x.get_mesh().Dvc[0]/vertSpacings[I]) +
2474 dot(x[I+1], x.get_mesh().Dvc[1]/vertSpacings[I]);
2478template <
class T,
class MFLOAT >
2483 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2486 Index I = domain[0];
2487 Index J = domain[1];
2489 dot(x[I ][J ], x.get_mesh().Dvc[0]/vertSpacings[I][J]) +
2490 dot(x[I+1][J ], x.get_mesh().Dvc[1]/vertSpacings[I][J]) +
2491 dot(x[I ][J+1], x.get_mesh().Dvc[2]/vertSpacings[I][J]) +
2492 dot(x[I+1][J+1], x.get_mesh().Dvc[3]/vertSpacings[I][J]);
2496template <
class T,
class MFLOAT >
2501 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2504 Index I = domain[0];
2505 Index J = domain[1];
2506 Index K = domain[2];
2508 dot(x[I ][J ][K ], x.get_mesh().Dvc[0]/vertSpacings[I][J][K]) +
2509 dot(x[I+1][J ][K ], x.get_mesh().Dvc[1]/vertSpacings[I][J][K]) +
2510 dot(x[I ][J+1][K ], x.get_mesh().Dvc[2]/vertSpacings[I][J][K]) +
2511 dot(x[I+1][J+1][K ], x.get_mesh().Dvc[3]/vertSpacings[I][J][K]) +
2512 dot(x[I ][J ][K+1], x.get_mesh().Dvc[4]/vertSpacings[I][J][K]) +
2513 dot(x[I+1][J ][K+1], x.get_mesh().Dvc[5]/vertSpacings[I][J][K]) +
2514 dot(x[I ][J+1][K+1], x.get_mesh().Dvc[6]/vertSpacings[I][J][K]) +
2515 dot(x[I+1][J+1][K+1], x.get_mesh().Dvc[7]/vertSpacings[I][J][K]);
2521template <
class T,
class MFLOAT >
2526 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2529 Index I = domain[0];
2531 dot(x[I ], x.get_mesh().Dvc[0]/vertSpacings[I]) +
2532 dot(x[I+1], x.get_mesh().Dvc[1]/vertSpacings[I]);
2536template <
class T,
class MFLOAT >
2541 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2544 Index I = domain[0];
2545 Index J = domain[1];
2547 dot(x[I ][J ], x.get_mesh().Dvc[0]/vertSpacings[I][J]) +
2548 dot(x[I+1][J ], x.get_mesh().Dvc[1]/vertSpacings[I][J]) +
2549 dot(x[I ][J+1], x.get_mesh().Dvc[2]/vertSpacings[I][J]) +
2550 dot(x[I+1][J+1], x.get_mesh().Dvc[3]/vertSpacings[I][J]);
2554template <
class T,
class MFLOAT >
2559 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2562 Index I = domain[0];
2563 Index J = domain[1];
2564 Index K = domain[2];
2566 dot(x[I ][J ][K ], x.get_mesh().Dvc[0]/vertSpacings[I][J][K]) +
2567 dot(x[I+1][J ][K ], x.get_mesh().Dvc[1]/vertSpacings[I][J][K]) +
2568 dot(x[I ][J+1][K ], x.get_mesh().Dvc[2]/vertSpacings[I][J][K]) +
2569 dot(x[I+1][J+1][K ], x.get_mesh().Dvc[3]/vertSpacings[I][J][K]) +
2570 dot(x[I ][J ][K+1], x.get_mesh().Dvc[4]/vertSpacings[I][J][K]) +
2571 dot(x[I+1][J ][K+1], x.get_mesh().Dvc[5]/vertSpacings[I][J][K]) +
2572 dot(x[I ][J+1][K+1], x.get_mesh().Dvc[6]/vertSpacings[I][J][K]) +
2573 dot(x[I+1][J+1][K+1], x.get_mesh().Dvc[7]/vertSpacings[I][J][K]);
2580template <
class T,
class MFLOAT >
2585 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2588 Index I = domain[0];
2590 dot(x[I-1], x.get_mesh().Dvc[0]/cellSpacings[I]) +
2591 dot(x[I ], x.get_mesh().Dvc[1]/cellSpacings[I]);
2595template <
class T,
class MFLOAT >
2600 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2603 Index I = domain[0];
2604 Index J = domain[1];
2606 dot(x[I-1][J-1], x.get_mesh().Dvc[0]/cellSpacings[I][J]) +
2607 dot(x[I ][J-1], x.get_mesh().Dvc[1]/cellSpacings[I][J]) +
2608 dot(x[I-1][J ], x.get_mesh().Dvc[2]/cellSpacings[I][J]) +
2609 dot(x[I ][J ], x.get_mesh().Dvc[3]/cellSpacings[I][J]);
2613template <
class T,
class MFLOAT >
2618 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2621 Index I = domain[0];
2622 Index J = domain[1];
2623 Index K = domain[2];
2625 dot(x[I-1][J-1][K-1], x.get_mesh().Dvc[0]/cellSpacings[I][J][K]) +
2626 dot(x[I ][J-1][K-1], x.get_mesh().Dvc[1]/cellSpacings[I][J][K]) +
2627 dot(x[I-1][J ][K-1], x.get_mesh().Dvc[2]/cellSpacings[I][J][K]) +
2628 dot(x[I ][J ][K-1], x.get_mesh().Dvc[3]/cellSpacings[I][J][K]) +
2629 dot(x[I-1][J-1][K ], x.get_mesh().Dvc[4]/cellSpacings[I][J][K]) +
2630 dot(x[I ][J-1][K ], x.get_mesh().Dvc[5]/cellSpacings[I][J][K]) +
2631 dot(x[I-1][J ][K ], x.get_mesh().Dvc[6]/cellSpacings[I][J][K]) +
2632 dot(x[I ][J ][K ], x.get_mesh().Dvc[7]/cellSpacings[I][J][K]);
2639template <
class T,
class MFLOAT >
2644 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2647 Index I = domain[0];
2649 dot(x[I-1], x.get_mesh().Dvc[0]/cellSpacings[I]) +
2650 dot(x[I ], x.get_mesh().Dvc[1]/cellSpacings[I]);
2654template <
class T,
class MFLOAT >
2659 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2662 Index I = domain[0];
2663 Index J = domain[1];
2665 dot(x[I-1][J-1], x.get_mesh().Dvc[0]/cellSpacings[I][J]) +
2666 dot(x[I ][J-1], x.get_mesh().Dvc[1]/cellSpacings[I][J]) +
2667 dot(x[I-1][J ], x.get_mesh().Dvc[2]/cellSpacings[I][J]) +
2668 dot(x[I ][J ], x.get_mesh().Dvc[3]/cellSpacings[I][J]);
2672template <
class T,
class MFLOAT >
2677 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2680 Index I = domain[0];
2681 Index J = domain[1];
2682 Index K = domain[2];
2684 dot(x[I-1][J-1][K-1], x.get_mesh().Dvc[0]/cellSpacings[I][J][K]) +
2685 dot(x[I ][J-1][K-1], x.get_mesh().Dvc[1]/cellSpacings[I][J][K]) +
2686 dot(x[I-1][J ][K-1], x.get_mesh().Dvc[2]/cellSpacings[I][J][K]) +
2687 dot(x[I ][J ][K-1], x.get_mesh().Dvc[3]/cellSpacings[I][J][K]) +
2688 dot(x[I-1][J-1][K ], x.get_mesh().Dvc[4]/cellSpacings[I][J][K]) +
2689 dot(x[I ][J-1][K ], x.get_mesh().Dvc[5]/cellSpacings[I][J][K]) +
2690 dot(x[I-1][J ][K ], x.get_mesh().Dvc[6]/cellSpacings[I][J][K]) +
2691 dot(x[I ][J ][K ], x.get_mesh().Dvc[7]/cellSpacings[I][J][K]);
2700template <
class T,
class MFLOAT >
2705 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2708 Index I = domain[0];
2709 r[I] = (x[I ]*x.get_mesh().Dvc[0] +
2710 x[I+1]*x.get_mesh().Dvc[1])/vertSpacings[I];
2714template <
class T,
class MFLOAT >
2719 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2722 Index I = domain[0];
2723 Index J = domain[1];
2724 r[I][J] = (x[I ][J ]*x.get_mesh().Dvc[0] +
2725 x[I+1][J ]*x.get_mesh().Dvc[1] +
2726 x[I ][J+1]*x.get_mesh().Dvc[2] +
2727 x[I+1][J+1]*x.get_mesh().Dvc[3])/vertSpacings[I][J];
2731template <
class T,
class MFLOAT >
2736 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2739 Index I = domain[0];
2740 Index J = domain[1];
2741 Index K = domain[2];
2742 r[I][J][K] = (x[I ][J ][K ]*x.get_mesh().Dvc[0] +
2743 x[I+1][J ][K ]*x.get_mesh().Dvc[1] +
2744 x[I ][J+1][K ]*x.get_mesh().Dvc[2] +
2745 x[I+1][J+1][K ]*x.get_mesh().Dvc[3] +
2746 x[I ][J ][K+1]*x.get_mesh().Dvc[4] +
2747 x[I+1][J ][K+1]*x.get_mesh().Dvc[5] +
2748 x[I ][J+1][K+1]*x.get_mesh().Dvc[6] +
2749 x[I+1][J+1][K+1]*x.get_mesh().Dvc[7])/vertSpacings[I][J][K];
2757template <
class T,
class MFLOAT >
2762 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2765 Index I = domain[0];
2766 r[I] = (x[I-1]*x.get_mesh().Dvc[0] +
2767 x[I ]*x.get_mesh().Dvc[1])/cellSpacings[I];
2771template <
class T,
class MFLOAT >
2776 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2779 Index I = domain[0];
2780 Index J = domain[1];
2781 r[I][J] = (x[I-1][J-1]*x.get_mesh().Dvc[0] +
2782 x[I ][J-1]*x.get_mesh().Dvc[1] +
2783 x[I-1][J ]*x.get_mesh().Dvc[2] +
2784 x[I ][J ]*x.get_mesh().Dvc[3])/cellSpacings[I][J];
2788template <
class T,
class MFLOAT >
2793 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2796 Index I = domain[0];
2797 Index J = domain[1];
2798 Index K = domain[2];
2800 for (
unsigned int d=0; d < 1<<3U; d++) dvc[d] = x.get_mesh().Dvc[d];
2801 r[I][J][K] = (x[I-1][J-1][K-1]*dvc[0] +
2802 x[I ][J-1][K-1]*dvc[1] +
2803 x[I-1][J ][K-1]*dvc[2] +
2804 x[I ][J ][K-1]*dvc[3] +
2805 x[I-1][J-1][K ]*dvc[4] +
2806 x[I ][J-1][K ]*dvc[5] +
2807 x[I-1][J ][K ]*dvc[6] +
2808 x[I ][J ][K ]*dvc[7])/
2809 cellSpacings[I][J][K];
2828template <
class T,
class MFLOAT >
2833 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2835 *(x.get_mesh().VertSpacings);
2837 Index I = domain[0];
2842 r[I] = idx*((x[I+1] - x[I-1])/(vertSpacings[I] + vertSpacings[I-1]));
2846template <
class T,
class MFLOAT >
2851 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2853 *(x.get_mesh().VertSpacings);
2855 Index I = domain[0];
2856 Index J = domain[1];
2865 idx*((x[I+1][J ] - x[I-1][J ])/
2866 (vertSpacings[I][J] + vertSpacings[I-1][J])) +
2867 idy*((x[I ][J+1] - x[I ][J-1])/
2868 (vertSpacings[I][J] + vertSpacings[I][J-1]));
2872template <
class T,
class MFLOAT >
2877 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2879 *(x.get_mesh().VertSpacings);
2881 Index I = domain[0];
2882 Index J = domain[1];
2883 Index K = domain[2];
2897 idx*((x[I+1][J ][K ] - x[I-1][J ][K ])/
2898 (vertSpacings[I][J][K] + vertSpacings[I-1][J][K])) +
2899 idy*((x[I ][J+1][K ] - x[I ][J-1][K ])/
2900 (vertSpacings[I][J][K] + vertSpacings[I][J-1][K])) +
2901 idz*((x[I ][J ][K+1] - x[I ][J ][K-1])/
2902 (vertSpacings[I][J][K] + vertSpacings[I][J][K-1]));
2908template <
class T,
class MFLOAT >
2913 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2915 *(x.get_mesh().CellSpacings);
2917 Index I = domain[0];
2922 r[I] = idx*((x[I+1] - x[I-1])/(cellSpacings[I] + cellSpacings[I+1]));
2926template <
class T,
class MFLOAT >
2931 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2933 *(x.get_mesh().CellSpacings);
2935 Index I = domain[0];
2936 Index J = domain[1];
2945 idx*((x[I+1][J ] - x[I-1][J ])/
2946 (cellSpacings[I][J] + cellSpacings[I+1][J])) +
2947 idy*((x[I ][J+1] - x[I ][J-1])/
2948 (cellSpacings[I][J] + cellSpacings[I][J+1]));
2952template <
class T,
class MFLOAT >
2957 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2959 *(x.get_mesh().CellSpacings);
2961 Index I = domain[0];
2962 Index J = domain[1];
2963 Index K = domain[2];
2977 idx*((x[I+1][J ][K ] - x[I-1][J ][K ])/
2978 (cellSpacings[I][J][K] + cellSpacings[I+1][J][K])) +
2979 idy*((x[I ][J+1][K ] - x[I ][J-1][K ])/
2980 (cellSpacings[I][J][K] + cellSpacings[I][J+1][K])) +
2981 idz*((x[I ][J ][K+1] - x[I ][J ][K-1])/
2982 (cellSpacings[I][J][K] + cellSpacings[I][J][K+1]));
2988template <
class T,
class MFLOAT >
2993 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
2996 Index I = domain[0];
3003template <
class T,
class MFLOAT >
3008 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
3011 Index I = domain[0];
3012 Index J = domain[1];
3014 outerProduct(x[I ][J ], x.get_mesh().Dvc[0]/vS[I][J]) +
3015 outerProduct(x[I+1][J ], x.get_mesh().Dvc[1]/vS[I][J]) +
3016 outerProduct(x[I ][J+1], x.get_mesh().Dvc[2]/vS[I][J]) +
3017 outerProduct(x[I+1][J+1], x.get_mesh().Dvc[3]/vS[I][J]);
3021template <
class T,
class MFLOAT >
3026 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
3029 Index I = domain[0];
3030 Index J = domain[1];
3031 Index K = domain[2];
3033 outerProduct(x[I ][J ][K ], x.get_mesh().Dvc[0]/vS[I][J][K]) +
3034 outerProduct(x[I+1][J ][K ], x.get_mesh().Dvc[1]/vS[I][J][K]) +
3035 outerProduct(x[I ][J+1][K ], x.get_mesh().Dvc[2]/vS[I][J][K]) +
3036 outerProduct(x[I+1][J+1][K ], x.get_mesh().Dvc[3]/vS[I][J][K]) +
3037 outerProduct(x[I ][J ][K+1], x.get_mesh().Dvc[4]/vS[I][J][K]) +
3038 outerProduct(x[I+1][J ][K+1], x.get_mesh().Dvc[5]/vS[I][J][K]) +
3039 outerProduct(x[I ][J+1][K+1], x.get_mesh().Dvc[6]/vS[I][J][K]) +
3040 outerProduct(x[I+1][J+1][K+1], x.get_mesh().Dvc[7]/vS[I][J][K]);
3048template <
class T,
class MFLOAT >
3053 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
3056 Index I = domain[0];
3058 outerProduct(x[I-1], x.get_mesh().Dvc[0]/cellSpacings[I-1]) +
3059 outerProduct(x[I ], x.get_mesh().Dvc[1]/cellSpacings[I-1]);
3063template <
class T,
class MFLOAT >
3068 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
3071 Index I = domain[0];
3072 Index J = domain[1];
3074 outerProduct(x[I-1][J-1], x.get_mesh().Dvc[0]/cS[I-1][J-1]) +
3075 outerProduct(x[I ][J-1], x.get_mesh().Dvc[1]/cS[I-1][J-1]) +
3076 outerProduct(x[I-1][J ], x.get_mesh().Dvc[2]/cS[I-1][J-1]) +
3077 outerProduct(x[I ][J ], x.get_mesh().Dvc[3]/cS[I-1][J-1]);
3081template <
class T,
class MFLOAT >
3086 PAssert_EQ(x.get_mesh().hasSpacingFields,
true);
3089 Index I = domain[0];
3090 Index J = domain[1];
3091 Index K = domain[2];
3093 outerProduct(x[I-1][J-1][K-1], x.get_mesh().Dvc[0]/cS[I-1][J-1][K-1]) +
3094 outerProduct(x[I ][J-1][K-1], x.get_mesh().Dvc[1]/cS[I-1][J-1][K-1]) +
3095 outerProduct(x[I-1][J ][K-1], x.get_mesh().Dvc[2]/cS[I-1][J-1][K-1]) +
3096 outerProduct(x[I ][J ][K-1], x.get_mesh().Dvc[3]/cS[I-1][J-1][K-1]) +
3097 outerProduct(x[I-1][J-1][K ], x.get_mesh().Dvc[4]/cS[I-1][J-1][K-1]) +
3098 outerProduct(x[I ][J-1][K ], x.get_mesh().Dvc[5]/cS[I-1][J-1][K-1]) +
3099 outerProduct(x[I-1][J ][K ], x.get_mesh().Dvc[6]/cS[I-1][J-1][K-1]) +
3100 outerProduct(x[I ][J ][K ], x.get_mesh().Dvc[7]/cS[I-1][J-1][K-1]);
3111template <
class T1,
class T2,
class MFLOAT >
3118 Index I = domain[0];
3119 r[I] = (x[I-1]*w[I-1] + x[I ]*w[I ])/(w[I-1] + w[I ]);
3123template <
class T1,
class T2,
class MFLOAT >
3130 Index I = domain[0];
3131 Index J = domain[1];
3133 r[I][J] = (x[I-1][J-1] * w[I-1][J-1] +
3134 x[I ][J-1] * w[I ][J-1] +
3135 x[I-1][J ] * w[I-1][J ] +
3136 x[I ][J ] * w[I ][J ])/
3144template <
class T1,
class T2,
class MFLOAT >
3151 Index I = domain[0];
3152 Index J = domain[1];
3153 Index K = domain[2];
3155 r[I][J][K] = (x[I-1][J-1][K-1] * w[I-1][J-1][K-1] +
3156 x[I ][J-1][K-1] * w[I ][J-1][K-1] +
3157 x[I-1][J ][K-1] * w[I-1][J ][K-1] +
3158 x[I ][J ][K-1] * w[I ][J ][K-1] +
3159 x[I-1][J-1][K ] * w[I-1][J-1][K ] +
3160 x[I ][J-1][K ] * w[I ][J-1][K ] +
3161 x[I-1][J ][K ] * w[I-1][J ][K ] +
3162 x[I ][J ][K ] * w[I ][J ][K ] )/
3177template <
class T1,
class T2,
class MFLOAT >
3184 Index I = domain[0];
3185 r[I] = (x[I+1]*w[I+1] + x[I ]*w[I ])/(w[I+1] + w[I ]);
3189template <
class T1,
class T2,
class MFLOAT >
3196 Index I = domain[0];
3197 Index J = domain[1];
3199 r[I][J] = (x[I+1][J+1] * w[I+1][J+1] +
3200 x[I ][J+1] * w[I ][J+1] +
3201 x[I+1][J ] * w[I+1][J ] +
3202 x[I ][J ] * w[I ][J ])/
3210template <
class T1,
class T2,
class MFLOAT >
3217 Index I = domain[0];
3218 Index J = domain[1];
3219 Index K = domain[2];
3221 r[I][J][K] = (x[I+1][J+1][K+1] * w[I+1][J+1][K+1] +
3222 x[I ][J+1][K+1] * w[I ][J+1][K+1] +
3223 x[I+1][J ][K+1] * w[I+1][J ][K+1] +
3224 x[I ][J ][K+1] * w[I ][J ][K+1] +
3225 x[I+1][J+1][K ] * w[I+1][J+1][K ] +
3226 x[I ][J+1][K ] * w[I ][J+1][K ] +
3227 x[I+1][J ][K ] * w[I+1][J ][K ] +
3228 x[I ][J ][K ] * w[I ][J ][K ])/
3243template <
class T1,
class MFLOAT >
3249 Index I = domain[0];
3250 r[I] = 0.5*(x[I-1] + x[I ]);
3254template <
class T1,
class MFLOAT >
3260 Index I = domain[0];
3261 Index J = domain[1];
3262 r[I][J] = 0.25*(x[I-1][J-1] + x[I ][J-1] + x[I-1][J ] + x[I ][J ]);
3266template <
class T1,
class MFLOAT >
3272 Index I = domain[0];
3273 Index J = domain[1];
3274 Index K = domain[2];
3275 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] +
3276 x[I ][J ][K-1] + x[I-1][J-1][K ] + x[I ][J-1][K ] +
3277 x[I-1][J ][K ] + x[I ][J ][K ]);
3284template <
class T1,
class MFLOAT >
3290 Index I = domain[0];
3291 r[I] = 0.5*(x[I+1] + x[I ]);
3295template <
class T1,
class MFLOAT >
3301 Index I = domain[0];
3302 Index J = domain[1];
3303 r[I][J] = 0.25*(x[I+1][J+1] + x[I ][J+1] + x[I+1][J ] + x[I ][J ]);
3307template <
class T1,
class MFLOAT >
3313 Index I = domain[0];
3314 Index J = domain[1];
3315 Index K = domain[2];
3316 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] +
3317 x[I ][J ][K+1] + x[I+1][J+1][K ] + x[I ][J+1][K ] +
3318 x[I+1][J ][K ] + x[I ][J ][K ]);
double dot(const Vector3D &lhs, const Vector3D &rhs)
Vector dot product.
PartBunchBase< T, Dim >::ConstIterator begin(PartBunchBase< T, Dim > const &bunch)
void assign(const BareField< T, Dim > &a, RHS b, OP op, ExprTag< true >)
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)
NDIndex< Dim > AddGuardCells(const NDIndex< Dim > &idx, const GuardCellSizes< Dim > &g)
Field< T, 1U, Cartesian< 1U, MFLOAT >, Cell > & Div(Field< Vektor< T, 1U >, 1U, Cartesian< 1U, MFLOAT >, Vert > &x, Field< T, 1U, Cartesian< 1U, MFLOAT >, Cell > &r)
void PETE_apply(OpMeshPeriodic< T >, T &a, T b)
Field< Vektor< T, 1U >, 1U, Cartesian< 1U, MFLOAT >, Cell > & Grad(Field< T, 1U, Cartesian< 1U, MFLOAT >, Vert > &x, Field< Vektor< T, 1U >, 1U, Cartesian< 1U, MFLOAT >, Cell > &r)
PETE_TUTree< FnAbs, typename T::PETE_Expr_t > abs(const PETE_Expr< T > &l)
Tenzor< typename PETEBinaryReturn< T1, T2, OpMultipply >::type, D > outerProduct(const Vektor< T1, D > &v1, const Vektor< T2, D > &v2)
Inform & endl(Inform &inf)
const T * find(const T table[], const std::string &name)
Look up name.
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)
bool touches(const NDIndex< Dim > &) const
NDIndex< Dim > plugBase(const NDIndex< D > &i) const
NDIndex< Dim > intersect(const NDIndex< Dim > &) const
unsigned rightGuard(unsigned d) const
ac_id_larray::iterator iterator_if
virtual void fillGuardCells(bool reallyFill=true) const
const GuardCellSizes< Dim > & getGuardCellSizes() const
unsigned leftGuard(unsigned d) const
const NDIndex< Dim > & getOwned() const
const NDIndex< Dim > & getAllocated() const
const iterator & begin() const
unsigned int length() const
Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > & getDeltaVertexField(Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > &) const
void get_meshSpacing(unsigned d, MFLOAT *spacings) const
MFLOAT getCellRangeVolume(const NDIndex< Dim > &) const
Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Vert > & getVertexPositionField(Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Vert > &) const
NDIndex< Dim > getVertexBelow(const Vektor< MFLOAT, Dim > &) const
Vektor< MFLOAT, Dim > getSurfaceNormal(const NDIndex< Dim > &, unsigned) const
void set_meshSpacing(MFLOAT **const del)
void getSurfaceNormalFields(Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > **) const
Field< MFLOAT, Dim, Cartesian< Dim, MFLOAT >, Cell > & getCellVolumeField(Field< MFLOAT, Dim, Cartesian< Dim, MFLOAT >, Cell > &) const
Vektor< MFLOAT, Dim > getDeltaCell(const NDIndex< Dim > &) const
Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > & getCellPositionField(Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > &) const
MFLOAT getCellVolume(const NDIndex< Dim > &) const
Vektor< MFLOAT, Dim > getVertexPosition(const NDIndex< Dim > &) const
Vektor< MFLOAT, Dim > getCellPosition(const NDIndex< Dim > &) const
void storeSpacingFields()
void set_MeshBC(unsigned face, MeshBC_E meshBCType)
void set_origin(const Vektor< MFLOAT, Dim > &o)
MeshBC_E * get_MeshBC() const
NDIndex< Dim > getNearestVertex(const Vektor< MFLOAT, Dim > &) const
Vektor< MFLOAT, Dim > * getSurfaceNormals(const NDIndex< Dim > &) const
Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Vert > & getDeltaCellField(Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Vert > &) const
Vektor< MFLOAT, Dim > getDeltaVertex(const NDIndex< Dim > &) const
Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > & getSurfaceNormalField(Field< Vektor< MFLOAT, Dim >, Dim, Cartesian< Dim, MFLOAT >, Cell > &, unsigned) const
void updateMeshSpacingGuards(int face)
void print(std::ostream &)
Vektor< MFLOAT, Dim > get_origin() const
void initialize(const NDIndex< Dim > &ndi)
MFLOAT getVertRangeVolume(const NDIndex< Dim > &) const
OpMeshExtrapolate(T &o, T &s)