ENH: renumberMethods: addressing in losort form

This commit is contained in:
mattijs
2013-07-16 21:28:42 +01:00
parent 3540cda2f9
commit 0cf8430802
4 changed files with 64 additions and 4 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -86,6 +86,24 @@ Foam::labelList Foam::CuthillMcKeeRenumber::renumber
}
Foam::labelList Foam::CuthillMcKeeRenumber::renumber
(
const labelList& cellCells,
const labelList& offsets,
const pointField& cc
) const
{
labelList orderedToOld = bandCompression(cellCells, offsets);
if (reverse_)
{
reverse(orderedToOld);
}
return orderedToOld;
}
Foam::labelList Foam::CuthillMcKeeRenumber::renumber
(
const labelListList& cellCells,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -98,6 +98,17 @@ public:
const pointField& cc
) const;
//- Return the order in which cells need to be visited, i.e.
// from ordered back to original cell label.
// Connectivity in losort addressing (= neighbour + offsets into
// neighbour)
virtual labelList renumber
(
const labelList& cellCells,
const labelList& offsets,
const pointField& cc
) const;
//- Return the order in which cells need to be visited, i.e.
// from ordered back to original cell label.
// The connectivity is equal to mesh.cellCells() except

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -89,6 +89,26 @@ Foam::labelList Foam::renumberMethod::renumber
}
Foam::labelList Foam::renumberMethod::renumber
(
const labelList& cellCells,
const labelList& offsets,
const pointField& cc
) const
{
notImplemented
(
"renumberMethod::renumber\n"
"(\n"
" const labelList&,\n"
" const labelList&,\n"
" const pointField&\n"
") const"
);
return labelList();
}
Foam::labelList Foam::renumberMethod::renumber
(
const polyMesh& mesh,

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -126,6 +126,17 @@ public:
// Use the mesh connectivity (if needed)
virtual labelList renumber(const polyMesh&, const pointField&) const;
//- Return the order in which cells need to be visited, i.e.
// from ordered back to original cell label.
// Addresing in losort addressing (= neighbour + offsets into
// neighbour)
virtual labelList renumber
(
const labelList& cellCells,
const labelList& offsets,
const pointField&
) const;
//- Return the order in which cells need to be visited, i.e.
// from ordered back to original cell label.
// Gets passed agglomeration map (from fine to coarse cells) and coarse