Commit 89bcfe04 authored by mattijs's avatar mattijs
Browse files

BUG: ptScotchDecomp: handle zero-sized domains

parent cb30c838
......@@ -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-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -58,7 +58,7 @@ void Foam::ptscotchDecomp::check(const int retVal, const char* str)
{}
Foam::label Foam::ptscotchDecomp::decomposeZeroDomains
Foam::label Foam::ptscotchDecomp::decompose
(
const fileName& meshPath,
const List<int>& initxadj,
......@@ -72,6 +72,7 @@ Foam::label Foam::ptscotchDecomp::decomposeZeroDomains
(
"label ptscotchDecomp::decompose"
"("
"onst fileName&,"
"const List<int>&, "
"const List<int>&, "
"const scalarField&, "
......@@ -84,8 +85,10 @@ Foam::label Foam::ptscotchDecomp::decomposeZeroDomains
Foam::label Foam::ptscotchDecomp::decompose
(
const fileName& meshPath,
const List<int>& adjncy,
const List<int>& xadj,
const int adjncySize,
const int adjncy[],
const int xadjSize,
const int xadj[],
const scalarField& cWeights,
List<int>& finalDecomp
) const
......@@ -94,9 +97,12 @@ Foam::label Foam::ptscotchDecomp::decompose
(
"label ptscotchDecomp::decompose"
"("
"const List<int>&, "
"const List<int>&, "
"const scalarField&, "
"const fileName&,"
"const int,"
"const int,"
"const int,"
"const int,"
"const scalarField&,"
"List<int>&"
")"
) << notImplementedMessage << exit(FatalError);
......
......@@ -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-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
......@@ -60,22 +60,24 @@ class ptscotchDecomp
//- Check and print error message
static void check(const int, const char*);
//- Decompose with optionally zero sized domains
label decomposeZeroDomains
//- Decompose. Handles size 0 arrays
label decompose
(
const fileName& meshPath,
const List<int>& initadjncy,
const List<int>& initxadj,
const scalarField& initcWeights,
const List<int>& adjncy,
const List<int>& xadj,
const scalarField& cWeights,
List<int>& finalDecomp
) const;
//- Decompose
//- Low level decompose
label decompose
(
const fileName& meshPath,
const List<int>& adjncy,
const List<int>& xadj,
const int adjncySize,
const int adjncy[],
const int xadjSize,
const int xadj[],
const scalarField& cWeights,
List<int>& finalDecomp
) const;
......
Supports Markdown
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