mirror of
https://github.com/OpenFOAM/OpenFOAM-6.git
synced 2025-12-08 06:57:46 +00:00
Avoids the clutter and maintenance effort associated with providing the function signature string.
134 lines
3.5 KiB
C
134 lines
3.5 KiB
C
/*---------------------------------------------------------------------------*\
|
|
========= |
|
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
|
\\ / O peration |
|
|
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
|
|
\\/ M anipulation |
|
|
-------------------------------------------------------------------------------
|
|
License
|
|
This file is part of OpenFOAM.
|
|
|
|
OpenFOAM is free software: you can redistribute it and/or modify it
|
|
under the terms of the GNU General Public License as published by
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
(at your option) any later version.
|
|
|
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
for more details.
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
\*---------------------------------------------------------------------------*/
|
|
|
|
#include "scotchDecomp.H"
|
|
#include "addToRunTimeSelectionTable.H"
|
|
#include "Time.H"
|
|
|
|
static const char* notImplementedMessage =
|
|
"You are trying to use scotch but do not have the scotchDecomp library loaded."
|
|
"\nThis message is from the dummy scotchDecomp stub library instead.\n"
|
|
"\n"
|
|
"Please install scotch and make sure that libscotch.so is in your "
|
|
"LD_LIBRARY_PATH.\n"
|
|
"The scotchDecomp library can then be built in "
|
|
"$FOAM_SRC/parallel/decompose/decompositionMethods/scotchDecomp\n";
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
|
|
namespace Foam
|
|
{
|
|
defineTypeNameAndDebug(scotchDecomp, 0);
|
|
|
|
addToRunTimeSelectionTable
|
|
(
|
|
decompositionMethod,
|
|
scotchDecomp,
|
|
dictionary
|
|
);
|
|
}
|
|
|
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
|
|
|
void Foam::scotchDecomp::check(const int retVal, const char* str)
|
|
{}
|
|
|
|
|
|
Foam::label Foam::scotchDecomp::decompose
|
|
(
|
|
const fileName& meshPath,
|
|
const List<label>& adjncy,
|
|
const List<label>& xadj,
|
|
const scalarField& cWeights,
|
|
|
|
List<label>& finalDecomp
|
|
)
|
|
{
|
|
FatalErrorInFunction
|
|
<< notImplementedMessage << exit(FatalError);
|
|
|
|
return -1;
|
|
}
|
|
|
|
|
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
|
|
|
Foam::scotchDecomp::scotchDecomp
|
|
(
|
|
const dictionary& decompositionDict
|
|
)
|
|
:
|
|
decompositionMethod(decompositionDict)
|
|
{}
|
|
|
|
|
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
|
|
|
Foam::labelList Foam::scotchDecomp::decompose
|
|
(
|
|
const polyMesh& mesh,
|
|
const pointField& points,
|
|
const scalarField& pointWeights
|
|
)
|
|
{
|
|
FatalErrorInFunction
|
|
<< notImplementedMessage << exit(FatalError);
|
|
|
|
return labelList::null();
|
|
}
|
|
|
|
|
|
Foam::labelList Foam::scotchDecomp::decompose
|
|
(
|
|
const polyMesh& mesh,
|
|
const labelList& agglom,
|
|
const pointField& agglomPoints,
|
|
const scalarField& pointWeights
|
|
)
|
|
{
|
|
FatalErrorInFunction
|
|
<< notImplementedMessage << exit(FatalError);
|
|
|
|
return labelList::null();
|
|
}
|
|
|
|
|
|
Foam::labelList Foam::scotchDecomp::decompose
|
|
(
|
|
const labelListList& globalCellCells,
|
|
const pointField& cellCentres,
|
|
const scalarField& cWeights
|
|
)
|
|
{
|
|
FatalErrorInFunction
|
|
<< notImplementedMessage << exit(FatalError);
|
|
|
|
return labelList::null();
|
|
}
|
|
|
|
|
|
// ************************************************************************* //
|