Skip to content
Snippets Groups Projects
Commit e8af5d62 authored by mattijs's avatar mattijs
Browse files

Filter out zero-sized patches; add generic capability

parent 352ef55b
No related merge requests found
......@@ -9,4 +9,5 @@ EXE_LIBS = \
-ltecio \
-llagrangian \
-lfiniteVolume \
-lgenericPatchFields \
-lmeshTools
......@@ -909,106 +909,115 @@ int main(int argc, char *argv[])
const polyPatch& pp = patches[patchID];
//INTEGER4 strandID = 1 + i;
Info<< " Writing patch " << patchID << "\t" << pp.name()
<< "\tstrand:" << strandID << nl << endl;
if (pp.size() > 0)
{
Info<< " Writing patch " << patchID << "\t" << pp.name()
<< "\tstrand:" << strandID << nl << endl;
const indirectPrimitivePatch ipp
(
IndirectList<face>(pp, identity(pp.size())),
pp.points()
);
const indirectPrimitivePatch ipp
(
IndirectList<face>(pp, identity(pp.size())),
pp.points()
);
writer.writePolygonalZone
(
pp.name(),
strandID++, //strandID,
ipp,
allVarLocation
);
writer.writePolygonalZone
(
pp.name(),
strandID++, //strandID,
ipp,
allVarLocation
);
// Write coordinates
writer.writeField(ipp.localPoints().component(0)());
writer.writeField(ipp.localPoints().component(1)());
writer.writeField(ipp.localPoints().component(2)());
// Write coordinates
writer.writeField(ipp.localPoints().component(0)());
writer.writeField(ipp.localPoints().component(1)());
writer.writeField(ipp.localPoints().component(2)());
// Write all fields
forAll(vsf, i)
{
writer.writeField
(
writer.getPatchField
// Write all fields
forAll(vsf, i)
{
writer.writeField
(
nearCellValue,
vsf[i],
patchID
)()
);
}
forAll(vvf, i)
{
writer.writeField
(
writer.getPatchField
writer.getPatchField
(
nearCellValue,
vsf[i],
patchID
)()
);
}
forAll(vvf, i)
{
writer.writeField
(
nearCellValue,
vvf[i],
patchID
)()
);
}
forAll(vSpheretf, i)
{
writer.writeField
(
writer.getPatchField
writer.getPatchField
(
nearCellValue,
vvf[i],
patchID
)()
);
}
forAll(vSpheretf, i)
{
writer.writeField
(
nearCellValue,
vSpheretf[i],
patchID
)()
);
}
forAll(vSymmtf, i)
{
writer.writeField
(
writer.getPatchField
writer.getPatchField
(
nearCellValue,
vSpheretf[i],
patchID
)()
);
}
forAll(vSymmtf, i)
{
writer.writeField
(
nearCellValue,
vSymmtf[i],
patchID
)()
);
}
forAll(vtf, i)
{
writer.writeField
(
writer.getPatchField
writer.getPatchField
(
nearCellValue,
vSymmtf[i],
patchID
)()
);
}
forAll(vtf, i)
{
writer.writeField
(
nearCellValue,
vtf[i],
patchID
)()
);
}
writer.getPatchField
(
nearCellValue,
vtf[i],
patchID
)()
);
}
forAll(psf, i)
{
writer.writeField
(
psf[i].boundaryField()[patchID].patchInternalField()()
);
forAll(psf, i)
{
writer.writeField
(
psf[i].boundaryField()[patchID].patchInternalField()()
);
}
forAll(pvf, i)
{
writer.writeField
(
pvf[i].boundaryField()[patchID].patchInternalField()()
);
}
writer.writeConnectivity(ipp);
}
forAll(pvf, i)
else
{
writer.writeField
(
pvf[i].boundaryField()[patchID].patchInternalField()()
);
Info<< " Skipping zero sized patch " << patchID
<< "\t" << pp.name()
<< nl << endl;
}
writer.writeConnectivity(ipp);
}
writer.writeEnd();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment