mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: simplify calling of decomposition, support CompactListList
- combined most of the unweighted and weighted decomposition routines such that an empty weight field is treated as uniform weighting. This allows default parameters and cuts down on the number of decompose methods. - for topology-driven decomposition, it is now possible to pass in the owner/neighbour connectivity as a CompactListList directly instead of first creating a labelListList (which was internally repacked into a CompactListList in many cases). However, multiLevelDecomp still uses unpacking (to avoid a larger reworking of code). - support direct creation of some methods (eg, random, scotch etc) without a dictionary - fix incorrect neighbour face weighting (fixes #3019) ENH: relocate calcCellCells from decompositionMethod to globalMeshData - makes it more universally available
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2021 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2023 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -35,8 +35,8 @@ SourceFiles
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef structuredDecomp_H
|
||||
#define structuredDecomp_H
|
||||
#ifndef Foam_structuredDecomp_H
|
||||
#define Foam_structuredDecomp_H
|
||||
|
||||
#include "decompositionMethod.H"
|
||||
#include "wordRes.H"
|
||||
@ -61,7 +61,9 @@ class structuredDecomp
|
||||
autoPtr<decompositionMethod> method_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
public:
|
||||
|
||||
// Generated Methods
|
||||
|
||||
//- No copy construct
|
||||
structuredDecomp(const structuredDecomp&) = delete;
|
||||
@ -70,8 +72,6 @@ class structuredDecomp
|
||||
void operator=(const structuredDecomp&) = delete;
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Runtime type information
|
||||
TypeName("structured");
|
||||
|
||||
@ -102,16 +102,29 @@ public:
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
const pointField& points,
|
||||
const scalarField& pointWeights
|
||||
const scalarField& pointWeights = scalarField::null()
|
||||
) const;
|
||||
|
||||
//- Return for every coordinate the wanted processor number.
|
||||
// Explicitly provided connectivity - does not use mesh_.
|
||||
virtual labelList decompose
|
||||
(
|
||||
const CompactListList<label>& globalCellCells,
|
||||
const pointField& cc,
|
||||
const scalarField& cWeights = scalarField::null()
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
return labelList();
|
||||
}
|
||||
|
||||
//- Return for every coordinate the wanted processor number.
|
||||
// Explicitly provided connectivity - does not use mesh_.
|
||||
virtual labelList decompose
|
||||
(
|
||||
const labelListList& globalCellCells,
|
||||
const pointField& cc,
|
||||
const scalarField& cWeights
|
||||
const scalarField& cWeights = scalarField::null()
|
||||
) const
|
||||
{
|
||||
NotImplemented;
|
||||
|
||||
Reference in New Issue
Block a user