1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
|
if (nVar >= Num_variables - nSprayVariables)
{
return Z_UNDEF;
}
IOobject fieldObjectPtr
(
fieldNames[var2field[nVar]],
runTime.timeName(),
mesh,
IOobject::NO_READ
);
if (!fieldObjectPtr.headerOk())
{
return Z_UNDEF;
}
IOobject fieldObject
(
fieldNames[var2field[nVar]],
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::NO_WRITE
);
volTensorField tf
(
fieldObject,
mesh
);
const cellShapeList& cellShapes = meshPtr->cellShapes();
// hexa's
if (which_type == Z_HEX08)
{
const cellModel& hex = *(cellModeller::lookup("hex"));
//const cellModel& wedge = *(cellModeller::lookup("wedge"));
label counter = 1;
for (label n=0; n<nCells; n++)
{
const cellShape& cellShape = cellShapes[n];
const cellModel& cellModel = cellShape.model();
if (cellModel == hex) // || (cellModel == wedge))
{
#include "tensorConversion.H"
}
}
}
// penta's
if (which_type == Z_PEN06)
{
const cellModel& prism = *(cellModeller::lookup("prism"));
label counter = 1;
for (label n=0; n<nCells; n++)
{
const cellShape& cellShape = cellShapes[n];
const cellModel& cellModel = cellShape.model();
if (cellModel == prism)
{
#include "tensorConversion.H"
}
}
}
// pyramids's
if (which_type == Z_PYR05)
{
const cellModel& pyr = *(cellModeller::lookup("pyr"));
label counter = 1;
for (label n=0; n<nCells; n++)
{
const cellShape& cellShape = cellShapes[n];
const cellModel& cellModel = cellShape.model();
if (cellModel == pyr)
{
#include "tensorConversion.H"
}
}
}
// penta's
if (which_type == Z_TET04)
{
const cellModel& tet = *(cellModeller::lookup("tet"));
label counter = 1;
for (label n=0; n<nCells; n++)
{
const cellShape& cellShape = cellShapes[n];
const cellModel& cellModel = cellShape.model();
if (cellModel == tet)
{
#include "tensorConversion.H"
}
}
}
if (which_type == Z_NFACED)
{
const cellList& cells = meshPtr->cells();
label counter = 1;
for (label n=0; n<nCells; n++)
{
const labelList& points = cellShapes[n];
label nFacesInCell = cells[n].size();
if ((nFacesInCell == 6) && (points.size() == 8))
{}
else if ((nFacesInCell == 4) && (points.size() == 4))
{}
else if (nFacesInCell == 5)
{
if (points.size() == 6)
{}
else if (points.size() == 5)
{}
else
{
#include "tensorConversion.H"
}
}
else
{
#include "tensorConversion.H"
}
}
}
|