mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: inverseDistance: output stencil per zone. See #1683.
Code provided by Nicolas Edh.
This commit is contained in:
@ -2257,18 +2257,25 @@ bool Foam::cellCellStencils::inverseDistance::update()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Dump stencil
|
// Dump stencil, one per zone
|
||||||
mkDir(mesh_.time().timePath());
|
mkDir(mesh_.time().timePath());
|
||||||
OBJstream str(mesh_.time().timePath()/"stencil.obj");
|
|
||||||
Pout<< type() << " : dumping to " << str.name() << endl;
|
|
||||||
pointField cc(mesh_.cellCentres());
|
pointField cc(mesh_.cellCentres());
|
||||||
cellInterpolationMap().distribute(cc);
|
cellInterpolationMap().distribute(cc);
|
||||||
|
forAll(meshParts, zonei)
|
||||||
|
{
|
||||||
|
OBJstream str
|
||||||
|
(
|
||||||
|
mesh_.time().timePath()
|
||||||
|
+ "/stencil_" + name(zonei) + ".obj"
|
||||||
|
);
|
||||||
|
Pout<< type() << " : dumping to " << str.name() << endl;
|
||||||
|
|
||||||
forAll(cellStencil_, celli)
|
const labelList& subMeshCellMap = meshParts[zonei].cellMap();
|
||||||
|
|
||||||
|
forAll(subMeshCellMap, subcelli)
|
||||||
{
|
{
|
||||||
|
const label celli = subMeshCellMap[subcelli];
|
||||||
const labelList& slots = cellStencil_[celli];
|
const labelList& slots = cellStencil_[celli];
|
||||||
if (slots.size())
|
|
||||||
{
|
|
||||||
const point& accCc = mesh_.cellCentres()[celli];
|
const point& accCc = mesh_.cellCentres()[celli];
|
||||||
forAll(slots, i)
|
forAll(slots, i)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user