BUGFIX: Compile WM_LABEL_SIZE=64 (final). Author: Henrik Rusche.
This commit is contained in:
commit
396997c0ae
312 changed files with 1112 additions and 870 deletions
38
ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch_64Bit
vendored
Normal file
38
ThirdParty/rpmBuild/SOURCES/ParMGridGen-1.0.patch_64Bit
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
--- orig/ParMGridGen-1.0/mgridgen.h 2019-01-15 13:32:54.247812378 +0100
|
||||
+++ ParMGridGen-1.0/mgridgen.h 2019-01-15 13:35:03.972952464 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-typedef int idxtype;
|
||||
+typedef long int idxtype;
|
||||
typedef double realtype;
|
||||
|
||||
|
||||
--- orig/ParMGridGen-1.0/parmgridgen.h 2019-01-15 13:32:54.251812414 +0100
|
||||
+++ ParMGridGen-1.0/parmgridgen.h 2019-01-15 13:42:14.344335223 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-typedef int idxtype;
|
||||
+typedef long int idxtype;
|
||||
typedef double realtype;
|
||||
|
||||
void ParMGridGen(idxtype *, idxtype *, realtype *, realtype *, idxtype *,
|
||||
--- orig/ParMGridGen-1.0/ParMGridGen/IMParMetis-2.0/ParMETISLib/struct.h 2019-01-15 13:32:54.247812378 +0100
|
||||
+++ ParMGridGen-1.0/ParMGridGen/IMParMetis-2.0/ParMETISLib/struct.h 2019-01-15 13:44:17.605231500 +0100
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
/* Indexes are as long as integers for now */
|
||||
#ifdef IDXTYPE_INT
|
||||
-typedef int idxtype;
|
||||
+typedef long int idxtype;
|
||||
#define IDX_DATATYPE MPI_INT
|
||||
#else
|
||||
typedef short idxtype;
|
||||
--- orig/ParMGridGen-1.0/MGridGen/IMlib/IMlib.h 2019-01-15 13:32:54.251812414 +0100
|
||||
+++ ParMGridGen-1.0/MGridGen/IMlib/IMlib.h 2019-01-15 13:52:11.504522970 +0100
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
/* Indexes are as long as integers for now */
|
||||
#ifdef IDXTYPE_INT
|
||||
-typedef int idxtype;
|
||||
+typedef long int idxtype;
|
||||
#else
|
||||
typedef short idxtype;
|
||||
#endif
|
11
ThirdParty/rpmBuild/SOURCES/ParMetis-3.1.1.patch_64Bit
vendored
Normal file
11
ThirdParty/rpmBuild/SOURCES/ParMetis-3.1.1.patch_64Bit
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- orig/parmetis-4.0.3/metis/include/metis.h 2019-01-15 12:40:31.050842343 +0100
|
||||
+++ parmetis-4.0.3/metis/include/metis.h 2019-01-15 12:43:01.883662756 +0100
|
||||
@@ -30,7 +30,7 @@
|
||||
GCC does provides these definitions in stdint.h, but it may require some
|
||||
modifications on other architectures.
|
||||
--------------------------------------------------------------------------*/
|
||||
-#define IDXTYPEWIDTH 32
|
||||
+#define IDXTYPEWIDTH 64
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------
|
11
ThirdParty/rpmBuild/SOURCES/metis-5.1.0_patch_64Bit
vendored
Normal file
11
ThirdParty/rpmBuild/SOURCES/metis-5.1.0_patch_64Bit
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- orig/metis-5.1.0/include/metis.h 2019-01-15 12:40:31.050842343 +0100
|
||||
+++ metis-5.1.0/include/metis.h 2019-01-15 12:43:01.883662756 +0100
|
||||
@@ -30,7 +30,7 @@
|
||||
GCC does provides these definitions in stdint.h, but it may require some
|
||||
modifications on other architectures.
|
||||
--------------------------------------------------------------------------*/
|
||||
-#define IDXTYPEWIDTH 32
|
||||
+#define IDXTYPEWIDTH 64
|
||||
|
||||
|
||||
/*--------------------------------------------------------------------------
|
|
@ -27,14 +27,15 @@ diff -ruN scotch_6.0.4_orig/src/Make.inc/Makefile.inc.i686_mac_darwin10.shlib sc
|
|||
diff -ruN scotch_6.0.4_orig/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib scotch_6.0.4/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib
|
||||
--- scotch_6.0.4_orig/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib 2014-08-05 08:56:17.000000000 -0400
|
||||
+++ scotch_6.0.4/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib 2015-06-21 00:26:43.072992194 -0400
|
||||
@@ -8,10 +8,10 @@
|
||||
@@ -8,10 +8,11 @@
|
||||
CAT = cat
|
||||
CCS = gcc
|
||||
CCP = mpicc
|
||||
-CCD = gcc
|
||||
-CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict
|
||||
+CCD = mpicc -I$(MPI_HOME)/include
|
||||
+CFLAGS = -O3 -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -Xlinker --no-as-needed
|
||||
+INTSIZE =
|
||||
+CFLAGS = -O3 $(INTSIZE) -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -Xlinker --no-as-needed
|
||||
CLIBFLAGS = -shared -fPIC
|
||||
-LDFLAGS = -lz -lm -pthread
|
||||
+LDFLAGS = -lz -lm -pthread -lrt
|
||||
|
|
12
ThirdParty/rpmBuild/SOURCES/scotch-6.0.4_patch_64Bit
vendored
Normal file
12
ThirdParty/rpmBuild/SOURCES/scotch-6.0.4_patch_64Bit
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -ruN scotch_6.0.4_orig/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib scotch_6.0.4/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib
|
||||
--- orig/scotch_6.0.4/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib 2019-01-15 11:26:39.142915259 +0100
|
||||
+++ scotch_6.0.4/src/Make.inc/Makefile.inc.i686_pc_linux2.shlib 2019-01-15 11:26:58.871041175 +0100
|
||||
@@ -9,7 +9,7 @@
|
||||
CCS = gcc
|
||||
CCP = mpicc
|
||||
CCD = mpicc -I$(MPI_HOME)/include
|
||||
-INTSIZE =
|
||||
+INTSIZE = -DINTSIZE64
|
||||
CFLAGS = -O3 $(INTSIZE) -DCOMMON_FILE_COMPRESS_GZ -DCOMMON_PTHREAD -DCOMMON_RANDOM_FIXED_SEED -DSCOTCH_RENAME -DSCOTCH_PTHREAD -Drestrict=__restrict -Xlinker --no-as-needed
|
||||
CLIBFLAGS = -shared -fPIC
|
||||
LDFLAGS = -lz -lm -pthread -lrt
|
|
@ -78,6 +78,7 @@ Prefix: %{_prefix}
|
|||
Group: Development/Tools
|
||||
Patch0: ParMGridGen-1.0.patch_darwin
|
||||
Patch1: ParMGridGen-1.0.patch
|
||||
Patch2: ParMGridGen-1.0.patch_64Bit
|
||||
|
||||
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
||||
|
||||
|
@ -93,6 +94,10 @@ Patch1: ParMGridGen-1.0.patch
|
|||
%patch1 -p1
|
||||
%endif
|
||||
|
||||
if [ "$WM_LABEL_SIZE" = "64" ]; then
|
||||
%patch2 -p1
|
||||
fi
|
||||
|
||||
%build
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
|
|
5
ThirdParty/rpmBuild/SPECS/metis-5.1.0.spec
vendored
5
ThirdParty/rpmBuild/SPECS/metis-5.1.0.spec
vendored
|
@ -77,6 +77,7 @@ Source: %url/%{name}-%{version}.tar.gz
|
|||
Prefix: %{_prefix}
|
||||
Group: Development/Tools
|
||||
Patch0: metis-5.1.0_patch_gcc
|
||||
Patch1: metis-5.1.0_patch_64Bit
|
||||
|
||||
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
||||
|
||||
|
@ -90,6 +91,10 @@ Patch0: metis-5.1.0_patch_gcc
|
|||
%patch0 -p1
|
||||
%endif
|
||||
|
||||
if [ "$WM_LABEL_SIZE" = "64" ]; then
|
||||
%patch1 -p1
|
||||
fi
|
||||
|
||||
%build
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
|
|
|
@ -78,6 +78,7 @@ Prefix: %{_prefix}
|
|||
Group: Development/Tools
|
||||
Patch0: ParMetis-3.1.1.patch_darwin
|
||||
Patch1: ParMetis-3.1.1.patch
|
||||
Patch2: ParMetis-3.1.1.patch_64Bit
|
||||
|
||||
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
||||
|
||||
|
@ -93,6 +94,10 @@ Patch1: ParMetis-3.1.1.patch
|
|||
#patch1 -p1
|
||||
%endif
|
||||
|
||||
if [ "$WM_LABEL_SIZE" = "64" ]; then
|
||||
%patch2 -p1
|
||||
fi
|
||||
|
||||
%build
|
||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
[ -n "$WM_CXX" ] && export CXX="$WM_CXX"
|
||||
|
|
5
ThirdParty/rpmBuild/SPECS/scotch-6.0.4.spec
vendored
5
ThirdParty/rpmBuild/SPECS/scotch-6.0.4.spec
vendored
|
@ -77,6 +77,7 @@ Prefix: %{_prefix}
|
|||
Group: Development/Tools
|
||||
Patch0: scotch-6.0.4_patch_0
|
||||
Patch1: scotch-6.0.4_patch_darwin
|
||||
Patch2: scotch-6.0.4_patch_64Bit
|
||||
|
||||
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
||||
|
||||
|
@ -92,6 +93,10 @@ Patch1: scotch-6.0.4_patch_darwin
|
|||
%patch0 -p1
|
||||
%endif
|
||||
|
||||
if [ "$WM_LABEL_SIZE" = "64" ]; then
|
||||
%patch2 -p1
|
||||
fi
|
||||
|
||||
%build
|
||||
# export WM settings in a form that GNU configure recognizes
|
||||
# [ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size());
|
||||
PtrList<volScalarField> DpDtFluid(fluidRegions.size());
|
||||
|
||||
List<scalar> initialMassFluid(fluidRegions.size());
|
||||
scalarList initialMassFluid(fluidRegions.size());
|
||||
|
||||
// Populate fluid field pointer lists
|
||||
forAll(fluidRegions, i)
|
||||
|
|
|
@ -54,10 +54,10 @@ class regionProperties
|
|||
// Private data
|
||||
|
||||
//- List of the fluid region names
|
||||
List<word> fluidRegionNames_;
|
||||
wordList fluidRegionNames_;
|
||||
|
||||
//- List of the solid region names
|
||||
List<word> solidRegionNames_;
|
||||
wordList solidRegionNames_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
@ -87,10 +87,10 @@ public:
|
|||
// Access
|
||||
|
||||
//- Return const reference to the list of fluid region names
|
||||
const List<word>& fluidRegionNames() const;
|
||||
const wordList& fluidRegionNames() const;
|
||||
|
||||
//- Return const reference to the list of solid region names
|
||||
const List<word>& solidRegionNames() const;
|
||||
const wordList& solidRegionNames() const;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -8,9 +8,9 @@
|
|||
PtrList<compressible::turbulenceModel> turbulence(fluidRegions.size());
|
||||
PtrList<volScalarField> DpDtf(fluidRegions.size());
|
||||
|
||||
List<scalar> initialMassFluid(fluidRegions.size());
|
||||
List<label> pRefCellFluid(fluidRegions.size(),0);
|
||||
List<scalar> pRefValueFluid(fluidRegions.size(),0.0);
|
||||
scalarList initialMassFluid(fluidRegions.size());
|
||||
labelList pRefCellFluid(fluidRegions.size(),0);
|
||||
scalarList pRefValueFluid(fluidRegions.size(),0.0);
|
||||
|
||||
|
||||
// Populate fluid field pointer lists
|
||||
|
|
|
@ -60,7 +60,7 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
|
||||
labelList facesToBreak(facesToBreakList);
|
||||
List<scalar> facesToBreakEffTractionFraction
|
||||
scalarList facesToBreakEffTractionFraction
|
||||
(
|
||||
facesToBreakEffTractionFractionList
|
||||
);
|
||||
|
@ -192,7 +192,7 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
|
||||
labelList coupledFacesToBreak(coupledFacesToBreakList);
|
||||
List<scalar> coupledFacesToBreakEffTractionFraction
|
||||
scalarList coupledFacesToBreakEffTractionFraction
|
||||
(
|
||||
coupledFacesToBreakEffTractionFractionList
|
||||
);
|
||||
|
|
|
@ -62,7 +62,7 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
|
||||
labelList facesToBreak(facesToBreakList);
|
||||
List<scalar> facesToBreakEffTractionFraction
|
||||
scalarList facesToBreakEffTractionFraction
|
||||
(
|
||||
facesToBreakEffTractionFractionList
|
||||
);
|
||||
|
@ -197,7 +197,7 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
|
||||
labelList coupledFacesToBreak(coupledFacesToBreakList);
|
||||
List<scalar> coupledFacesToBreakEffTractionFraction
|
||||
scalarList coupledFacesToBreakEffTractionFraction
|
||||
(
|
||||
coupledFacesToBreakEffTractionFractionList
|
||||
);
|
||||
|
|
|
@ -60,7 +60,7 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
|
||||
labelList facesToBreak(facesToBreakList);
|
||||
List<scalar> facesToBreakEffTractionFraction
|
||||
scalarList facesToBreakEffTractionFraction
|
||||
(
|
||||
facesToBreakEffTractionFractionList
|
||||
);
|
||||
|
@ -192,7 +192,7 @@ nCoupledFacesToBreak = 0;
|
|||
}
|
||||
|
||||
labelList coupledFacesToBreak(coupledFacesToBreakList);
|
||||
List<scalar> coupledFacesToBreakEffTractionFraction
|
||||
scalarList coupledFacesToBreakEffTractionFraction
|
||||
(
|
||||
coupledFacesToBreakEffTractionFractionList
|
||||
);
|
||||
|
|
|
@ -212,7 +212,7 @@ int main(int argc, char *argv[])
|
|||
{
|
||||
label curMeshEdge = meshEdges[edgeI];
|
||||
|
||||
labelList curEdgePatchIDs(2, -1);
|
||||
labelList curEdgePatchIDs(2, label(-1));
|
||||
|
||||
label patchI = -1;
|
||||
|
||||
|
|
|
@ -143,7 +143,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
// Mark cut edges.
|
||||
|
||||
DynamicList<label> allCutEdges(pp.nEdges());
|
||||
dynamicLabelList allCutEdges(pp.nEdges());
|
||||
|
||||
DynamicList<scalar> allCutEdgeWeights(pp.nEdges());
|
||||
|
||||
|
|
|
@ -117,14 +117,14 @@ int main(int argc, char *argv[])
|
|||
SortableList<scalar> sortedVols(vols);
|
||||
|
||||
// All cell labels, sorted per bin.
|
||||
DynamicList<DynamicList<label> > bins;
|
||||
DynamicList<dynamicLabelList > bins;
|
||||
|
||||
// Lower/upper limits
|
||||
DynamicList<scalar> lowerLimits;
|
||||
DynamicList<scalar> upperLimits;
|
||||
|
||||
// Create bin0. Have upperlimit as factor times lowerlimit.
|
||||
bins.append(DynamicList<label>());
|
||||
bins.append(dynamicLabelList());
|
||||
lowerLimits.append(sortedVols[0]);
|
||||
upperLimits.append(1.1*lowerLimits[lowerLimits.size()-1]);
|
||||
|
||||
|
@ -135,7 +135,7 @@ int main(int argc, char *argv[])
|
|||
// New value outside of current bin
|
||||
|
||||
// Shrink old bin.
|
||||
DynamicList<label>& bin = bins[bins.size()-1];
|
||||
dynamicLabelList& bin = bins[bins.size()-1];
|
||||
|
||||
bin.shrink();
|
||||
|
||||
|
@ -144,7 +144,7 @@ int main(int argc, char *argv[])
|
|||
<< upperLimits[upperLimits.size()-1] << endl;
|
||||
|
||||
// Create new bin.
|
||||
bins.append(DynamicList<label>());
|
||||
bins.append(dynamicLabelList());
|
||||
lowerLimits.append(sortedVols[i]);
|
||||
upperLimits.append(1.1*lowerLimits[lowerLimits.size()-1]);
|
||||
|
||||
|
@ -154,7 +154,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
// Append to current bin.
|
||||
DynamicList<label>& bin = bins[bins.size()-1];
|
||||
dynamicLabelList& bin = bins[bins.size()-1];
|
||||
|
||||
bin.append(sortedVols.indices()[i]);
|
||||
}
|
||||
|
@ -173,7 +173,7 @@ int main(int argc, char *argv[])
|
|||
Info<< "Volume bins:" << nl;
|
||||
forAll(bins, binI)
|
||||
{
|
||||
const DynamicList<label>& bin = bins[binI];
|
||||
const dynamicLabelList& bin = bins[binI];
|
||||
|
||||
cellSet cells(mesh, "vol" + name(binI), bin.size());
|
||||
|
||||
|
@ -280,7 +280,7 @@ int main(int argc, char *argv[])
|
|||
// Set cell values
|
||||
forAll(bins, binI)
|
||||
{
|
||||
const DynamicList<label>& bin = bins[binI];
|
||||
const dynamicLabelList& bin = bins[binI];
|
||||
|
||||
forAll(bin, i)
|
||||
{
|
||||
|
|
|
@ -256,7 +256,7 @@ label selectOutsideCells
|
|||
|
||||
// Outside faces
|
||||
labelHashSet outsideFacesMap(outsidePts.size() * 6 * 2);
|
||||
DynamicList<label> outsideFaces(outsideFacesMap.size());
|
||||
dynamicLabelList outsideFaces(outsideFacesMap.size());
|
||||
// CellInfo on outside faces
|
||||
DynamicList<cellInfo> outsideFacesInfo(outsideFacesMap.size());
|
||||
|
||||
|
|
|
@ -190,7 +190,7 @@ bool splitHex
|
|||
const label cellI,
|
||||
const label edgeI,
|
||||
|
||||
DynamicList<label>& cutCells,
|
||||
dynamicLabelList& cutCells,
|
||||
DynamicList<labelList>& cellLoops,
|
||||
DynamicList<scalarField>& cellEdgeWeights
|
||||
)
|
||||
|
@ -306,7 +306,7 @@ bool splitCell
|
|||
const boolList& edgeIsCut,
|
||||
const scalarField& edgeWeight,
|
||||
|
||||
DynamicList<label>& cutCells,
|
||||
dynamicLabelList& cutCells,
|
||||
DynamicList<labelList>& cellLoops,
|
||||
DynamicList<scalarField>& cellEdgeWeights
|
||||
)
|
||||
|
@ -369,7 +369,7 @@ void collectCuts
|
|||
const scalar minSin,
|
||||
const cellSet& cellsToCut,
|
||||
|
||||
DynamicList<label>& cutCells,
|
||||
dynamicLabelList& cutCells,
|
||||
DynamicList<labelList>& cellLoops,
|
||||
DynamicList<scalarField>& cellEdgeWeights
|
||||
)
|
||||
|
@ -600,7 +600,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
|
||||
// Cut information per cut cell
|
||||
DynamicList<label> cutCells(mesh.nCells()/10 + 10);
|
||||
dynamicLabelList cutCells(mesh.nCells()/10 + 10);
|
||||
DynamicList<labelList> cellLoops(mesh.nCells()/10 + 10);
|
||||
DynamicList<scalarField> cellEdgeWeights(mesh.nCells()/10 + 10);
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ void storeCellInZone
|
|||
const label cellI,
|
||||
const label cellType,
|
||||
Map<label>& typeToZone,
|
||||
List<DynamicList<label> >& zoneCells
|
||||
List<dynamicLabelList >& zoneCells
|
||||
)
|
||||
{
|
||||
if (cellType >= 0)
|
||||
|
@ -389,8 +389,8 @@ void ReadCells
|
|||
labelList& foamCellMap,
|
||||
labelList& foamCellType,
|
||||
Map<label>& prostarToFoamPatch,
|
||||
DynamicList<label>& foamPatchSizes,
|
||||
DynamicList<label>& foamPatchStarts,
|
||||
dynamicLabelList& foamPatchSizes,
|
||||
dynamicLabelList& foamPatchStarts,
|
||||
labelList& foamFaceMap,
|
||||
labelList& foamOwner,
|
||||
labelList& foamNeighbour,
|
||||
|
@ -599,8 +599,8 @@ int main(int argc, char *argv[])
|
|||
|
||||
// Patching info
|
||||
Map<label> prostarToFoamPatch;
|
||||
DynamicList<label> foamPatchSizes;
|
||||
DynamicList<label> foamPatchStarts;
|
||||
dynamicLabelList foamPatchSizes;
|
||||
dynamicLabelList foamPatchStarts;
|
||||
// Face connectivity
|
||||
labelList foamFaceMap;
|
||||
labelList foamOwner;
|
||||
|
@ -1008,7 +1008,7 @@ int main(int argc, char *argv[])
|
|||
// From foamCellType physical region to Foam cellZone
|
||||
Map<label> typeToZone;
|
||||
// Storage for cell zones.
|
||||
List<DynamicList<label> > zoneCells(0);
|
||||
List<dynamicLabelList > zoneCells(0);
|
||||
|
||||
forAll(foamCellType, cellI)
|
||||
{
|
||||
|
|
|
@ -28,6 +28,7 @@ Description
|
|||
|
||||
#include "cellShapeRecognition.H"
|
||||
#include "labelList.H"
|
||||
#include "boolList.H"
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
@ -143,7 +144,7 @@ cellShape create3DCellShape
|
|||
labelList pointLabels(curModel.nPoints(), -1);
|
||||
|
||||
// Follow the used mesh faces
|
||||
List<bool> meshFaceUsed(localFaces.size(), false);
|
||||
boolList meshFaceUsed(localFaces.size(), false);
|
||||
|
||||
// Get the raw model faces
|
||||
const faceList& modelFaces = curModel.modelFaces();
|
||||
|
|
|
@ -99,7 +99,11 @@ int main(int argc, char *argv[])
|
|||
const labelList faceOwner = mesh.faceOwner();
|
||||
const vectorField faceNormals = mesh.Sf()/mesh.magSf();
|
||||
|
||||
labelListList abaqusCellPoints(cellPoints.size(), List<label>(8, 1));
|
||||
labelListList abaqusCellPoints
|
||||
(
|
||||
cellPoints.size(),
|
||||
labelList(8, label(1))
|
||||
);
|
||||
|
||||
forAll(cells, celli)
|
||||
{
|
||||
|
@ -338,7 +342,11 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
}
|
||||
|
||||
labelListList materialsOrdered(numberOfMaterials, List<label>(0,0));
|
||||
labelListList materialsOrdered
|
||||
(
|
||||
numberOfMaterials,
|
||||
labelList(0, label(0))
|
||||
);
|
||||
forAll(materialsOrdered, matOrderi)
|
||||
{
|
||||
materialsOrdered[matOrderi].setSize(cellsOfEachMaterial[matOrderi], 0);
|
||||
|
@ -401,7 +409,7 @@ int main(int argc, char *argv[])
|
|||
//- face 5 is nodes 3 7 8 4
|
||||
//- face 6 is nodes 4 8 5 1
|
||||
//- So i will compare points on the face and
|
||||
labelListList abaqusFaceConvention(6, List<label>(4,-1));
|
||||
labelListList abaqusFaceConvention(6, labelList(4, label(-1)));
|
||||
abaqusFaceConvention[0][0] = 1;
|
||||
abaqusFaceConvention[0][1] = 2;
|
||||
abaqusFaceConvention[0][2] = 3;
|
||||
|
@ -438,7 +446,7 @@ int main(int argc, char *argv[])
|
|||
//- face it is
|
||||
const labelList& facePoints = mesh.boundaryMesh()[patchi][facei];
|
||||
const labelList& thisCellAbaqusPoints = abaqusCellPoints[globalCelli];
|
||||
labelList thisFaceAbaqusPoints(4,-1);
|
||||
labelList thisFaceAbaqusPoints(4, label(-1));
|
||||
label pointsFound = 0;
|
||||
forAll(thisCellAbaqusPoints, pointi)
|
||||
{
|
||||
|
|
|
@ -206,7 +206,7 @@ void storeCellInZone
|
|||
Map<label>& physToZone,
|
||||
|
||||
labelList& zoneToPhys,
|
||||
List<DynamicList<label> >& zoneCells
|
||||
List<dynamicLabelList >& zoneCells
|
||||
)
|
||||
{
|
||||
Map<label>::const_iterator zoneFnd = physToZone.find(regPhys);
|
||||
|
@ -373,7 +373,7 @@ void readCells
|
|||
List<DynamicList<face> >& patchFaces,
|
||||
|
||||
labelList& zoneToPhys,
|
||||
List<DynamicList<label> >& zoneCells
|
||||
List<dynamicLabelList >& zoneCells
|
||||
)
|
||||
{
|
||||
Info<< "Starting to read cells at line " << inFile.lineNumber() << endl;
|
||||
|
@ -786,7 +786,7 @@ int main(int argc, char *argv[])
|
|||
// Map from cellZone to gmsh physical region
|
||||
labelList zoneToPhys;
|
||||
// Storage for cell zones.
|
||||
List<DynamicList<label> > zoneCells(0);
|
||||
List<dynamicLabelList > zoneCells(0);
|
||||
|
||||
// Name per physical region
|
||||
Map<word> physicalNames;
|
||||
|
@ -933,7 +933,7 @@ int main(int argc, char *argv[])
|
|||
const polyPatch& pp = mesh.boundaryMesh()[mesh.boundaryMesh().size()-1];
|
||||
|
||||
// Storage for faceZones.
|
||||
List<DynamicList<label> > zoneFaces(patchFaces.size());
|
||||
List<dynamicLabelList > zoneFaces(patchFaces.size());
|
||||
|
||||
|
||||
// Go through all the patchFaces and find corresponding face in pp.
|
||||
|
|
|
@ -185,7 +185,7 @@ void readPoints
|
|||
(
|
||||
IFstream& is,
|
||||
DynamicList<point>& points, // coordinates
|
||||
DynamicList<label>& unvPointID // unv index
|
||||
dynamicLabelList& unvPointID // unv index
|
||||
)
|
||||
{
|
||||
Sout<< "Starting reading points at line " << is.lineNumber() << '.' << endl;
|
||||
|
@ -210,7 +210,7 @@ void readPoints
|
|||
IOWarningIn
|
||||
(
|
||||
"readPoints(IFstream&, label&, DynamicList<point>"
|
||||
", DynamicList<label>&)",
|
||||
", dynamicLabelList&)",
|
||||
is
|
||||
) << "Points not in order starting at point " << pointI
|
||||
//<< " at line " << is.lineNumber()
|
||||
|
@ -242,8 +242,8 @@ void readCells
|
|||
(
|
||||
IFstream& is,
|
||||
DynamicList<cellShape>& cellVerts,
|
||||
DynamicList<label>& cellMaterial,
|
||||
DynamicList<label>& boundaryFaceIndices,
|
||||
dynamicLabelList& cellMaterial,
|
||||
dynamicLabelList& boundaryFaceIndices,
|
||||
DynamicList<face>& boundaryFaces
|
||||
)
|
||||
{
|
||||
|
@ -514,7 +514,7 @@ void readDOFS
|
|||
<< " trying to read vertex indices."
|
||||
<< endl;
|
||||
|
||||
DynamicList<label> vertices;
|
||||
dynamicLabelList vertices;
|
||||
while (true)
|
||||
{
|
||||
string line;
|
||||
|
@ -604,14 +604,14 @@ int main(int argc, char *argv[])
|
|||
// Points
|
||||
DynamicList<point> points;
|
||||
// Original unv point label
|
||||
DynamicList<label> unvPointID;
|
||||
dynamicLabelList unvPointID;
|
||||
|
||||
// Cells
|
||||
DynamicList<cellShape> cellVerts;
|
||||
DynamicList<label> cellMat;
|
||||
dynamicLabelList cellMat;
|
||||
|
||||
// Boundary faces
|
||||
DynamicList<label> boundaryFaceIndices;
|
||||
dynamicLabelList boundaryFaceIndices;
|
||||
DynamicList<face> boundaryFaces;
|
||||
|
||||
// Patch names and patchFace indices.
|
||||
|
|
|
@ -212,7 +212,7 @@ Foam::label Foam::meshDualiser::addInternalFace
|
|||
const bool edgeOrder,
|
||||
const label dualCell0,
|
||||
const label dualCell1,
|
||||
const DynamicList<label>& verts,
|
||||
const dynamicLabelList& verts,
|
||||
directTopoChange& meshMod
|
||||
) const
|
||||
{
|
||||
|
@ -330,7 +330,7 @@ Foam::label Foam::meshDualiser::addBoundaryFace
|
|||
|
||||
const label dualCellI,
|
||||
const label patchI,
|
||||
const DynamicList<label>& verts,
|
||||
const dynamicLabelList& verts,
|
||||
directTopoChange& meshMod
|
||||
) const
|
||||
{
|
||||
|
@ -423,7 +423,7 @@ void Foam::meshDualiser::createFacesAroundEdge
|
|||
// << endl;
|
||||
|
||||
// Walk and collect face.
|
||||
DynamicList<label> verts(100);
|
||||
dynamicLabelList verts(100);
|
||||
|
||||
if (edgeToDualPoint_[edgeI] != -1)
|
||||
{
|
||||
|
@ -571,7 +571,7 @@ void Foam::meshDualiser::createFaceFromInternalFace
|
|||
|
||||
|
||||
// Walk and collect face.
|
||||
DynamicList<label> verts(100);
|
||||
dynamicLabelList verts(100);
|
||||
|
||||
verts.append(faceToDualPoint_[faceI]);
|
||||
verts.append(edgeToDualPoint_[fEdges[fp]]);
|
||||
|
@ -672,7 +672,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
|
|||
// Starting face
|
||||
label faceI = startFaceI;
|
||||
|
||||
DynamicList<label> verts(4);
|
||||
dynamicLabelList verts(4);
|
||||
|
||||
while (true)
|
||||
{
|
||||
|
@ -770,7 +770,7 @@ void Foam::meshDualiser::createFacesAroundBoundaryPoint
|
|||
label faceI = startFaceI;
|
||||
|
||||
// Storage for face
|
||||
DynamicList<label> verts(mesh_.faces()[faceI].size());
|
||||
dynamicLabelList verts(mesh_.faces()[faceI].size());
|
||||
|
||||
// Starting point.
|
||||
verts.append(pointToDualPoint_[pointI]);
|
||||
|
|
|
@ -47,7 +47,7 @@ SourceFiles
|
|||
#ifndef meshDualiser_H
|
||||
#define meshDualiser_H
|
||||
|
||||
#include "DynamicList.H"
|
||||
#include "dynamicLabelList.H"
|
||||
#include "PackedBoolList.H"
|
||||
#include "boolList.H"
|
||||
#include "typeInfo.H"
|
||||
|
@ -122,7 +122,7 @@ class meshDualiser
|
|||
const bool edgeOrder,
|
||||
const label dualCell0,
|
||||
const label dualCell1,
|
||||
const DynamicList<label>& verts,
|
||||
const dynamicLabelList& verts,
|
||||
directTopoChange& meshMod
|
||||
) const;
|
||||
|
||||
|
@ -135,7 +135,7 @@ class meshDualiser
|
|||
|
||||
const label dualCellI,
|
||||
const label patchI,
|
||||
const DynamicList<label>& verts,
|
||||
const dynamicLabelList& verts,
|
||||
directTopoChange& meshMod
|
||||
) const;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ void sammMesh::readBoundary()
|
|||
labelList pointLabels(4);
|
||||
labelList pointLabelsTri(3);
|
||||
|
||||
labelList patchLabels(1000, -1);
|
||||
labelList patchLabels(1000, label(-1));
|
||||
|
||||
word patchType;
|
||||
patchTypes_.setSize(1000);
|
||||
|
|
|
@ -230,7 +230,7 @@ void sammMesh::readCells()
|
|||
{
|
||||
IFstream cellsFile(cellsFileName);
|
||||
|
||||
labelList labels(24, -1);
|
||||
labelList labels(24, label(-1));
|
||||
label lineLabel, sammLabel, regionLabel, typeFlag;
|
||||
|
||||
for (label cellI = 0; cellI < nCells; cellI++)
|
||||
|
|
|
@ -290,7 +290,7 @@ void writeCells(const polyMesh& mesh, const fileName& timeName)
|
|||
const labelList & cFaces = cells[cellId];
|
||||
|
||||
// create (beg,end) indices
|
||||
List<label> indices(cFaces.size() + 1);
|
||||
labelList indices(cFaces.size() + 1);
|
||||
indices[0] = indices.size();
|
||||
|
||||
label count = indices.size();
|
||||
|
|
|
@ -47,7 +47,7 @@ void starMesh::readBoundary()
|
|||
labelList pointLabels(4);
|
||||
labelList pointLabelsTri(3);
|
||||
|
||||
labelList patchLabels(1000, -1);
|
||||
labelList patchLabels(1000, label(-1));
|
||||
|
||||
word patchType;
|
||||
patchTypes_.setSize(1000);
|
||||
|
|
|
@ -275,7 +275,7 @@ void starMesh::readCells()
|
|||
{
|
||||
IFstream cellsFile(cellsFileName);
|
||||
|
||||
labelList labels(24, -1);
|
||||
labelList labels(24, label(-1));
|
||||
label lineLabel, starLabel, regionLabel, typeFlag;
|
||||
|
||||
for (label cellI = 0; cellI < nCells; cellI++)
|
||||
|
|
|
@ -249,7 +249,7 @@ int main(int argc, char *argv[])
|
|||
HashTable<label> zoneMap(nZones);
|
||||
|
||||
// Cells per zone.
|
||||
List<DynamicList<label> > zoneCells(nZones);
|
||||
List<dynamicLabelList > zoneCells(nZones);
|
||||
|
||||
// Running cell counter
|
||||
label cellI = 0;
|
||||
|
|
|
@ -173,7 +173,7 @@
|
|||
HashTable<label> zoneMap(nZones);
|
||||
|
||||
// Cells per zone.
|
||||
List<DynamicList<label> > zoneCells(nZones);
|
||||
List<dynamicLabelList > zoneCells(nZones);
|
||||
|
||||
// Running cell counter
|
||||
label cellI = 0;
|
||||
|
|
|
@ -397,7 +397,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
// Write patches
|
||||
// Create patch addressing
|
||||
List<DynamicList<label> > patchAddr(patches.size());
|
||||
List<dynamicLabelList > patchAddr(patches.size());
|
||||
|
||||
forAll(facets, faceI)
|
||||
{
|
||||
|
|
|
@ -48,7 +48,7 @@ void getPatchIds
|
|||
(
|
||||
const triSurf& origSurf,
|
||||
const wordList& patchNames,
|
||||
DynamicList<label>& patchIds
|
||||
dynamicLabelList& patchIds
|
||||
)
|
||||
{
|
||||
const geometricSurfacePatchList& origPatches = origSurf.patches();
|
||||
|
@ -189,7 +189,7 @@ autoPtr<triSurf> mergeSurfacePatches
|
|||
word newPatchType = origPatches[patchIds[0]].geometricType();
|
||||
|
||||
// Create patch addressing
|
||||
List<DynamicList<label> > patchAddr(origPatches.size()+1);
|
||||
List<dynamicLabelList > patchAddr(origPatches.size()+1);
|
||||
|
||||
forAll(origFacets, faceI)
|
||||
{
|
||||
|
@ -331,7 +331,7 @@ int main(int argc, char *argv[])
|
|||
triSurf origSurf(inFileName);
|
||||
|
||||
// Get patch ids
|
||||
DynamicList<label> patchIds;
|
||||
dynamicLabelList patchIds;
|
||||
|
||||
if (args.options().found("patchNames"))
|
||||
{
|
||||
|
|
|
@ -163,7 +163,7 @@ int main(int argc, char *argv[])
|
|||
fZone.checkParallelSync(true);
|
||||
|
||||
// Patches to put baffles into
|
||||
DynamicList<label> newPatches(1);
|
||||
dynamicLabelList newPatches(1);
|
||||
|
||||
word patchName(args.additionalArgs()[1]);
|
||||
newPatches.append(findPatchID(mesh, patchName));
|
||||
|
|
|
@ -481,7 +481,7 @@ void Foam::mergePolyMesh::merge()
|
|||
{
|
||||
Info << "Updating point zones" << endl;
|
||||
|
||||
List<DynamicList<label> > pzPoints(pointZoneNames_.size());
|
||||
List<dynamicLabelList > pzPoints(pointZoneNames_.size());
|
||||
forAll(pointZones_, pointI)
|
||||
{
|
||||
label zoneID = pointZones_[pointI];
|
||||
|
@ -506,7 +506,7 @@ void Foam::mergePolyMesh::merge()
|
|||
{
|
||||
Info << "Updating face zones" << endl;
|
||||
|
||||
List<DynamicList<label> > fzFaces(faceZoneNames_.size());
|
||||
List<dynamicLabelList > fzFaces(faceZoneNames_.size());
|
||||
List<DynamicList<bool> > fzFlips(faceZoneNames_.size());
|
||||
|
||||
forAll(faceZones_, faceI)
|
||||
|
@ -540,7 +540,7 @@ void Foam::mergePolyMesh::merge()
|
|||
{
|
||||
Info << "Updating cell zones" << endl;
|
||||
|
||||
List<DynamicList<label> > czCells(cellZoneNames_.size());
|
||||
List<dynamicLabelList > czCells(cellZoneNames_.size());
|
||||
forAll(cellZones_, cellI)
|
||||
{
|
||||
label zoneID = cellZones_[cellI];
|
||||
|
|
|
@ -74,16 +74,16 @@ class mergePolyMesh
|
|||
DynamicList<word> cellZoneNames_;
|
||||
|
||||
//- Point zones
|
||||
DynamicList<label> pointZones_;
|
||||
dynamicLabelList pointZones_;
|
||||
|
||||
//- Face zones
|
||||
DynamicList<label> faceZones_;
|
||||
dynamicLabelList faceZones_;
|
||||
|
||||
//- Face zone Flips
|
||||
DynamicList<bool> faceZoneFlips_;
|
||||
|
||||
//- Cell zones
|
||||
DynamicList<label> cellZones_;
|
||||
dynamicLabelList cellZones_;
|
||||
|
||||
|
||||
// Private Member Functions
|
||||
|
|
|
@ -56,7 +56,7 @@ string getLine(std::ifstream& is)
|
|||
// Read space-separated vertices (with optional '/' arguments)
|
||||
labelList parseVertices(const string& line)
|
||||
{
|
||||
DynamicList<label> verts;
|
||||
dynamicLabelList verts;
|
||||
|
||||
// Assume 'l' is followed by space.
|
||||
string::size_type endNum = 1;
|
||||
|
|
|
@ -30,6 +30,15 @@ License
|
|||
#include <sys/endian.h>
|
||||
#endif
|
||||
|
||||
// MacOSX
|
||||
#ifdef __DARWIN_BYTE_ORDER
|
||||
#if __DARWIN_BYTE_ORDER==__DARWIN_BIG_ENDIAN
|
||||
#undef LITTLE_ENDIAN
|
||||
#else
|
||||
#undef BIG_ENDIAN
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(LITTLE_ENDIAN) \
|
||||
|| defined(_LITTLE_ENDIAN) \
|
||||
|| defined(__LITTLE_ENDIAN)
|
||||
|
@ -43,7 +52,7 @@ License
|
|||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::writeFuns::swapWord(label& word32)
|
||||
void Foam::writeFuns::swapWord(int32_t& word32)
|
||||
{
|
||||
char* mem = reinterpret_cast<char*>(&word32);
|
||||
|
||||
|
@ -57,7 +66,7 @@ void Foam::writeFuns::swapWord(label& word32)
|
|||
}
|
||||
|
||||
|
||||
void Foam::writeFuns::swapWords(const label nWords, label* words32)
|
||||
void Foam::writeFuns::swapWords(const label nWords, int32_t* words32)
|
||||
{
|
||||
for (label i = 0; i < nWords; i++)
|
||||
{
|
||||
|
@ -76,7 +85,7 @@ void Foam::writeFuns::write
|
|||
if (binary)
|
||||
{
|
||||
#ifdef LITTLEENDIAN
|
||||
swapWords(fField.size(), reinterpret_cast<label*>(fField.begin()));
|
||||
swapWords(fField.size(), reinterpret_cast<int32_t*>(fField.begin()));
|
||||
#endif
|
||||
|
||||
os.write
|
||||
|
@ -126,7 +135,11 @@ void Foam::writeFuns::write
|
|||
if (binary)
|
||||
{
|
||||
#ifdef LITTLEENDIAN
|
||||
swapWords(elems.size(), reinterpret_cast<label*>(elems.begin()));
|
||||
swapWords
|
||||
(
|
||||
(sizeof(label)/4)*elems.size(),
|
||||
reinterpret_cast<int32_t*>(elems.begin())
|
||||
);
|
||||
#endif
|
||||
os.write
|
||||
(
|
||||
|
@ -156,7 +169,7 @@ void Foam::writeFuns::write
|
|||
(
|
||||
std::ostream& os,
|
||||
const bool binary,
|
||||
DynamicList<label>& elems
|
||||
dynamicLabelList& elems
|
||||
)
|
||||
{
|
||||
labelList& fld = elems.shrink();
|
||||
|
@ -175,7 +188,7 @@ void Foam::writeFuns::insert(const point& pt, DynamicList<floatScalar>& dest)
|
|||
|
||||
|
||||
// Store labelList in dest.
|
||||
void Foam::writeFuns::insert(const labelList& source, DynamicList<label>& dest)
|
||||
void Foam::writeFuns::insert(const labelList& source, dynamicLabelList& dest)
|
||||
{
|
||||
forAll(source, i)
|
||||
{
|
||||
|
@ -187,7 +200,7 @@ void Foam::writeFuns::insert(const labelList& source, DynamicList<label>& dest)
|
|||
// Store scalarField in dest
|
||||
void Foam::writeFuns::insert
|
||||
(
|
||||
const List<scalar>& source,
|
||||
const scalarList& source,
|
||||
DynamicList<floatScalar>& dest
|
||||
)
|
||||
{
|
||||
|
@ -202,7 +215,7 @@ void Foam::writeFuns::insert
|
|||
void Foam::writeFuns::insert
|
||||
(
|
||||
const labelList& map,
|
||||
const List<scalar>& source,
|
||||
const scalarList& source,
|
||||
DynamicList<floatScalar>& dest
|
||||
)
|
||||
{
|
||||
|
|
|
@ -36,9 +36,10 @@ SourceFiles
|
|||
#define writeFunctions_H
|
||||
|
||||
#include "labelList.H"
|
||||
#include "scalarList.H"
|
||||
#include "floatScalar.H"
|
||||
#include "OFstream.H"
|
||||
#include "DynamicList.H"
|
||||
#include "dynamicLabelList.H"
|
||||
#include "point.H"
|
||||
|
||||
using namespace Foam;
|
||||
|
@ -55,15 +56,20 @@ namespace Foam
|
|||
|
||||
class writeFuns
|
||||
{
|
||||
//- Swap halves of word.
|
||||
static void swapWord(label& word32);
|
||||
static void swapWords(const label nWords, label* words32);
|
||||
// Private member functions
|
||||
|
||||
//- Swap halves of word
|
||||
static void swapWord(int32_t& word32);
|
||||
|
||||
//- Swap halves of word
|
||||
static void swapWords(const label nWords, int32_t* words32);
|
||||
|
||||
|
||||
public:
|
||||
|
||||
//- Write ascii or binary. If binary optionally in-place swaps argument
|
||||
static void write(std::ostream&, const bool, DynamicList<floatScalar>&);
|
||||
static void write(std::ostream&, const bool, DynamicList<label>&);
|
||||
static void write(std::ostream&, const bool, dynamicLabelList&);
|
||||
|
||||
//- Write ascii or binary. If binary optionally in-place swaps argument
|
||||
static void write(std::ostream&, const bool, List<floatScalar>&);
|
||||
|
@ -73,15 +79,15 @@ public:
|
|||
static void insert(const point&, DynamicList<floatScalar>& dest);
|
||||
|
||||
//- Append elements of labelList to DynamicList
|
||||
static void insert(const labelList&, DynamicList<label>&);
|
||||
static void insert(const labelList&, dynamicLabelList&);
|
||||
//- Append elements of scalarList to DynamicList
|
||||
static void insert(const List<scalar>&, DynamicList<floatScalar>&);
|
||||
static void insert(const scalarList&, DynamicList<floatScalar>&);
|
||||
|
||||
//- Append elements of scalarList to DynamicList using map
|
||||
static void insert
|
||||
(
|
||||
const labelList& map,
|
||||
const List<scalar>& source,
|
||||
const scalarList& source,
|
||||
DynamicList<floatScalar>&
|
||||
);
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ void writePatch
|
|||
<< std::endl;
|
||||
|
||||
|
||||
DynamicList<label> vertLabels(nFaceVerts);
|
||||
dynamicLabelList vertLabels(nFaceVerts);
|
||||
|
||||
forAll(fp.localFaces(), faceI)
|
||||
{
|
||||
|
|
|
@ -155,7 +155,7 @@ int main(int argc, char *argv[])
|
|||
faceSet set(*iter());
|
||||
SortableList<label> faceLabels(set.toc());
|
||||
|
||||
DynamicList<label> addressing(set.size());
|
||||
dynamicLabelList addressing(set.size());
|
||||
DynamicList<bool> flipMap(set.size());
|
||||
|
||||
if (!noFlipMap)
|
||||
|
|
|
@ -486,7 +486,7 @@ void subsetSurfaceFields
|
|||
// Select all cells not in the region
|
||||
labelList getNonRegionCells(const labelList& cellRegion, const label regionI)
|
||||
{
|
||||
DynamicList<label> nonRegionCells(cellRegion.size());
|
||||
dynamicLabelList nonRegionCells(cellRegion.size());
|
||||
forAll (cellRegion, cellI)
|
||||
{
|
||||
if (cellRegion[cellI] != regionI)
|
||||
|
|
|
@ -180,10 +180,10 @@ if (fieldTimesUsed.size())
|
|||
|
||||
// TODO: allow similar/different time-steps for each cloud
|
||||
cloudNo = 0;
|
||||
forAllConstIter(HashTable<DynamicList<label> >, cloudTimesUsed, cloudIter)
|
||||
forAllConstIter(HashTable<dynamicLabelList >, cloudTimesUsed, cloudIter)
|
||||
{
|
||||
// const word& cloudName = cloudIter.key();
|
||||
const DynamicList<label>& timesUsed = cloudIter();
|
||||
const dynamicLabelList& timesUsed = cloudIter();
|
||||
|
||||
if (timesUsed.size() && cloudNo == 0)
|
||||
{
|
||||
|
|
|
@ -175,15 +175,15 @@ int main(int argc, char *argv[])
|
|||
Map<scalar> timeIndices;
|
||||
|
||||
// Track the time indices used by the volume fields
|
||||
DynamicList<label> fieldTimesUsed;
|
||||
dynamicLabelList fieldTimesUsed;
|
||||
|
||||
// Track the time indices used by each cloud
|
||||
HashTable<DynamicList<label> > cloudTimesUsed;
|
||||
HashTable<dynamicLabelList > cloudTimesUsed;
|
||||
|
||||
// Create a new DynamicList for each cloud
|
||||
forAllConstIter(HashTable<HashTable<word> >, cloudFields, cloudIter)
|
||||
{
|
||||
cloudTimesUsed.insert(cloudIter.key(), DynamicList<label>());
|
||||
cloudTimesUsed.insert(cloudIter.key(), dynamicLabelList());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -151,7 +151,7 @@ Foam::fieldviewTopology::fieldviewTopology
|
|||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
|
||||
// Pre calculate headers for cells not on walls
|
||||
labelList notWallFlags(6, NOT_A_WALL);
|
||||
List<int> notWallFlags(6, NOT_A_WALL);
|
||||
label tetNotWall = fv_encode_elem_header
|
||||
(
|
||||
FV_TET_ELEM_ID, notWallFlags.begin()
|
||||
|
@ -181,7 +181,7 @@ Foam::fieldviewTopology::fieldviewTopology
|
|||
|
||||
const faceList& allFaces = mesh.faces();
|
||||
|
||||
labelList wallFlags(6);
|
||||
List<int> wallFlags(6);
|
||||
forAll(cellShapes, celli)
|
||||
{
|
||||
const cellShape& cellShape = cellShapes[celli];
|
||||
|
|
|
@ -125,7 +125,7 @@ labelList getSelectedPatches
|
|||
const List<wordRe>& excludePatches //HashSet<word>& excludePatches
|
||||
)
|
||||
{
|
||||
DynamicList<label> patchIDs(patches.size());
|
||||
dynamicLabelList patchIDs(patches.size());
|
||||
|
||||
Info<< "Combining patches:" << endl;
|
||||
|
||||
|
|
|
@ -395,7 +395,8 @@ void Foam::tecplotWriter::writeConnectivity
|
|||
INTEGER4 NumFaceNodes = 2*pp.nEdges();
|
||||
|
||||
// All faces (=edges) have 2 nodes
|
||||
List<INTEGER4> FaceNodeCounts(NumFaces, 2);
|
||||
List<INTEGER4> FaceNodeCounts(NumFaces);
|
||||
FaceNodeCounts = 2;
|
||||
|
||||
List<INTEGER4> FaceNodes(NumFaceNodes);
|
||||
label nodeI = 0;
|
||||
|
|
|
@ -64,8 +64,8 @@ Foam::faMeshWriter::faMeshWriter
|
|||
os_ << "CELLS " << aMesh.nFaces() << ' ' << nFaceVerts
|
||||
<< std::endl;
|
||||
|
||||
DynamicList<label> vertLabels(nFaceVerts);
|
||||
DynamicList<label> faceTypes(nFaceVerts);
|
||||
dynamicLabelList vertLabels(nFaceVerts);
|
||||
dynamicLabelList faceTypes(nFaceVerts);
|
||||
|
||||
forAll(pp, faceI)
|
||||
{
|
||||
|
|
|
@ -176,7 +176,7 @@ labelList getSelectedPatches
|
|||
const HashSet<word>& excludePatches
|
||||
)
|
||||
{
|
||||
DynamicList<label> patchIDs(patches.size());
|
||||
dynamicLabelList patchIDs(patches.size());
|
||||
|
||||
Info<< "Combining patches:" << endl;
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ Foam::internalWriter::internalWriter
|
|||
<< std::endl;
|
||||
|
||||
|
||||
DynamicList<label> vertLabels(nFaceVerts);
|
||||
dynamicLabelList vertLabels(nFaceVerts);
|
||||
|
||||
forAll(vtkVertLabels, cellI)
|
||||
{
|
||||
|
@ -110,7 +110,7 @@ Foam::internalWriter::internalWriter
|
|||
os_ << "CELL_TYPES " << vtkCellTypes.size() << std::endl;
|
||||
|
||||
// Make copy since writing might swap stuff.
|
||||
DynamicList<label> cellTypes(vtkCellTypes.size());
|
||||
dynamicLabelList cellTypes(vtkCellTypes.size());
|
||||
|
||||
writeFuns::insert(vtkCellTypes, cellTypes);
|
||||
|
||||
|
|
|
@ -94,8 +94,8 @@ Foam::patchWriter::patchWriter
|
|||
os_ << "CELLS " << nFaces_ << ' ' << nFaceVerts
|
||||
<< std::endl;
|
||||
|
||||
DynamicList<label> vertLabels(nFaceVerts);
|
||||
DynamicList<label> faceTypes(nFaceVerts);
|
||||
dynamicLabelList vertLabels(nFaceVerts);
|
||||
dynamicLabelList faceTypes(nFaceVerts);
|
||||
|
||||
label offset = 0;
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ void writeFaceSet
|
|||
pStream << "POLYGONS " << fp.size() << ' ' << nFaceVerts
|
||||
<< std::endl;
|
||||
|
||||
DynamicList<label> vertLabels(nFaceVerts);
|
||||
dynamicLabelList vertLabels(nFaceVerts);
|
||||
|
||||
forAll(lf, faceI)
|
||||
{
|
||||
|
|
|
@ -53,7 +53,7 @@ License
|
|||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::writeFuns::swapWord(label& word32)
|
||||
void Foam::writeFuns::swapWord(int32_t& word32)
|
||||
{
|
||||
char* mem = reinterpret_cast<char*>(&word32);
|
||||
|
||||
|
@ -67,7 +67,7 @@ void Foam::writeFuns::swapWord(label& word32)
|
|||
}
|
||||
|
||||
|
||||
void Foam::writeFuns::swapWords(const label nWords, label* words32)
|
||||
void Foam::writeFuns::swapWords(const label nWords, int32_t* words32)
|
||||
{
|
||||
for (label i = 0; i < nWords; i++)
|
||||
{
|
||||
|
@ -86,8 +86,9 @@ void Foam::writeFuns::write
|
|||
if (binary)
|
||||
{
|
||||
#ifdef LITTLEENDIAN
|
||||
swapWords(fField.size(), reinterpret_cast<label*>(fField.begin()));
|
||||
swapWords(fField.size(), reinterpret_cast<int32_t*>(fField.begin()));
|
||||
#endif
|
||||
|
||||
os.write
|
||||
(
|
||||
reinterpret_cast<char*>(fField.begin()),
|
||||
|
@ -135,7 +136,11 @@ void Foam::writeFuns::write
|
|||
if (binary)
|
||||
{
|
||||
#ifdef LITTLEENDIAN
|
||||
swapWords(elems.size(), reinterpret_cast<label*>(elems.begin()));
|
||||
swapWords
|
||||
(
|
||||
(sizeof(label)/4)*elems.size(),
|
||||
reinterpret_cast<int32_t*>(elems.begin())
|
||||
);
|
||||
#endif
|
||||
os.write
|
||||
(
|
||||
|
@ -165,7 +170,7 @@ void Foam::writeFuns::write
|
|||
(
|
||||
std::ostream& os,
|
||||
const bool binary,
|
||||
DynamicList<label>& elems
|
||||
dynamicLabelList& elems
|
||||
)
|
||||
{
|
||||
labelList& fld = elems.shrink();
|
||||
|
@ -269,7 +274,7 @@ void Foam::writeFuns::insert(const tensor& pt, DynamicList<floatScalar>& dest)
|
|||
}
|
||||
|
||||
|
||||
void Foam::writeFuns::insert(const labelList& source, DynamicList<label>& dest)
|
||||
void Foam::writeFuns::insert(const labelList& source, dynamicLabelList& dest)
|
||||
{
|
||||
forAll(source, i)
|
||||
{
|
||||
|
|
|
@ -55,10 +55,11 @@ class writeFuns
|
|||
{
|
||||
// Private member functions
|
||||
|
||||
// Swap halves of word.
|
||||
//- Swap halves of word
|
||||
static void swapWord(int32_t& word32);
|
||||
|
||||
static void swapWord(label& word32);
|
||||
static void swapWords(const label nWords, label* words32);
|
||||
//- Swap halves of word
|
||||
static void swapWords(const label nWords, int32_t* words32);
|
||||
|
||||
|
||||
public:
|
||||
|
@ -68,7 +69,7 @@ public:
|
|||
static void write(std::ostream&, const bool, List<floatScalar>&);
|
||||
static void write(std::ostream&, const bool, DynamicList<floatScalar>&);
|
||||
static void write(std::ostream&, const bool, labelList&);
|
||||
static void write(std::ostream&, const bool, DynamicList<label>&);
|
||||
static void write(std::ostream&, const bool, dynamicLabelList&);
|
||||
|
||||
|
||||
// Write header
|
||||
|
@ -105,7 +106,7 @@ public:
|
|||
|
||||
|
||||
//- Append elements to DynamicList
|
||||
static void insert(const labelList&, DynamicList<label>&);
|
||||
static void insert(const labelList&, dynamicLabelList&);
|
||||
template<class Type>
|
||||
static void insert(const List<Type>&, DynamicList<floatScalar>&);
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ void writePatchGeom
|
|||
<< std::endl;
|
||||
|
||||
|
||||
DynamicList<label> vertLabels(nFaceVerts);
|
||||
dynamicLabelList vertLabels(nFaceVerts);
|
||||
|
||||
forAll(faces, faceI)
|
||||
{
|
||||
|
|
|
@ -43,9 +43,9 @@ static fileName caseDir;
|
|||
|
||||
static instantList timeDirs;
|
||||
|
||||
static List<word> fieldNames;
|
||||
static List<word> lagrangianScalarNames;
|
||||
static List<word> lagrangianVectorNames;
|
||||
static wordList fieldNames;
|
||||
static wordList lagrangianScalarNames;
|
||||
static wordList lagrangianVectorNames;
|
||||
static label var2field[maxNames];
|
||||
|
||||
static Time *runTimePtr = 0;
|
||||
|
|
|
@ -50,7 +50,7 @@ void Foam::readerDatabase::getPolyHedra()
|
|||
const cellModel& tetWedge = *(cellModeller::lookup("tetWedge"));
|
||||
const cellModel& hex = *(cellModeller::lookup("hex"));
|
||||
|
||||
DynamicList<label> polys(mesh().nCells()/100 + 1);
|
||||
dynamicLabelList polys(mesh().nCells()/100 + 1);
|
||||
|
||||
const cellShapeList& cellShapes = mesh().cellShapes();
|
||||
|
||||
|
|
|
@ -44,9 +44,9 @@ static fileName caseDir;
|
|||
|
||||
static instantList TimeList;
|
||||
|
||||
static List<word> fieldNames;
|
||||
static List<word> lagrangianScalarNames;
|
||||
static List<word> lagrangianVectorNames;
|
||||
static wordList fieldNames;
|
||||
static wordList lagrangianScalarNames;
|
||||
static wordList lagrangianVectorNames;
|
||||
static label var2field[maxNames];
|
||||
|
||||
static Time *runTimePtr = 0;
|
||||
|
@ -57,7 +57,7 @@ static Cloud<passiveParticle> *sprayPtr = 0;
|
|||
static fvMesh* secondMeshPtr = 0;
|
||||
static int nSecondMeshPatches = 0;
|
||||
static char secondMeshName[] = "cells_2";
|
||||
static List<word> secondMeshFieldNames;
|
||||
static wordList secondMeshFieldNames;
|
||||
static label secondMeshVar2field[maxNames];
|
||||
static bool secondMeshIsScalar[maxNames];
|
||||
static bool secondMeshIsVector[maxNames];
|
||||
|
@ -71,7 +71,7 @@ static word faScalarName = "areaScalarField";
|
|||
static word faVectorName = "areaVectorField";
|
||||
static word faTensorName = "areaTensorField";
|
||||
static char faMeshName[] = "faCells";
|
||||
static List<word> faMeshFieldNames;
|
||||
static wordList faMeshFieldNames;
|
||||
static label faMeshVar2field[maxNames];
|
||||
static bool faMeshIsScalar[maxNames];
|
||||
static bool faMeshIsVector[maxNames];
|
||||
|
|
|
@ -111,7 +111,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
|
||||
// calc starting ids for particles on each processor
|
||||
List<label> startIds(numIds.size(), 0);
|
||||
labelList startIds(numIds.size(), 0);
|
||||
for (label i = 0; i < numIds.size()-1; i++)
|
||||
{
|
||||
startIds[i+1] += startIds[i] + numIds[i];
|
||||
|
|
|
@ -59,7 +59,7 @@ void Foam::channelIndex::walkOppositeFaces
|
|||
const faceList& faces = mesh.faces();
|
||||
label nBnd = mesh.nFaces() - mesh.nInternalFaces();
|
||||
|
||||
DynamicList<label> frontFaces(startFaces);
|
||||
dynamicLabelList frontFaces(startFaces);
|
||||
forAll(frontFaces, i)
|
||||
{
|
||||
label faceI = frontFaces[i];
|
||||
|
@ -93,7 +93,7 @@ void Foam::channelIndex::walkOppositeFaces
|
|||
}
|
||||
|
||||
// Transfer across cells
|
||||
DynamicList<label> newFrontFaces(frontFaces.size());
|
||||
dynamicLabelList newFrontFaces(frontFaces.size());
|
||||
|
||||
forAll(frontFaces, i)
|
||||
{
|
||||
|
|
|
@ -427,7 +427,7 @@ int main(int argc, char *argv[])
|
|||
);
|
||||
|
||||
List<boundBox> bbsTarget(nProcsTarget);
|
||||
List<bool> bbsTargetSet(nProcsTarget, false);
|
||||
boolList bbsTargetSet(nProcsTarget, false);
|
||||
|
||||
for (int procISource=0; procISource<nProcsSource; procISource++)
|
||||
{
|
||||
|
|
|
@ -135,7 +135,7 @@ void mapLagrangian(const meshToMesh& meshToMeshInterp)
|
|||
label sourceParticleI = 0;
|
||||
|
||||
// Indices of source particles that get added to targetParcels
|
||||
DynamicList<label> addParticles(sourceParcels.size());
|
||||
dynamicLabelList addParticles(sourceParcels.size());
|
||||
|
||||
// Unmapped particles
|
||||
labelHashSet unmappedSource(sourceParcels.size());
|
||||
|
|
|
@ -11,8 +11,8 @@ for (label procI = 0; procI < Pstream::nProcs(); procI++)
|
|||
|
||||
DynamicField<point> start(coarseMesh.nFaces());
|
||||
DynamicField<point> end(start.size());
|
||||
DynamicList<label> startIndex(start.size());
|
||||
DynamicList<label> endIndex(start.size());
|
||||
dynamicLabelList startIndex(start.size());
|
||||
dynamicLabelList endIndex(start.size());
|
||||
|
||||
const pointField& myFc = remoteCoarseCf[Pstream::myProcNo()];
|
||||
const vectorField& myArea = remoteCoarseSf[Pstream::myProcNo()];
|
||||
|
|
|
@ -400,9 +400,9 @@ int main(int argc, char *argv[])
|
|||
|
||||
// Determine rays between coarse face centres
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
DynamicList<label> rayStartFace(nCoarseFaces + 0.01*nCoarseFaces);
|
||||
dynamicLabelList rayStartFace(nCoarseFaces + 0.01*nCoarseFaces);
|
||||
|
||||
DynamicList<label> rayEndFace(rayStartFace.size());
|
||||
dynamicLabelList rayEndFace(rayStartFace.size());
|
||||
|
||||
globalIndex globalNumbering(nCoarseFaces);
|
||||
|
||||
|
@ -483,7 +483,7 @@ int main(int argc, char *argv[])
|
|||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
List<label>(1, map.constructSize())
|
||||
labelList(1, map.constructSize())
|
||||
);
|
||||
consMapDim.write();
|
||||
|
||||
|
@ -510,7 +510,7 @@ int main(int argc, char *argv[])
|
|||
List<List<point> > compactFineSf(map.constructSize());
|
||||
List<List<point> > compactFineCf(map.constructSize());
|
||||
|
||||
DynamicList<label> compactPatchId(map.constructSize());
|
||||
dynamicLabelList compactPatchId(map.constructSize());
|
||||
|
||||
// Insert my coarse local values
|
||||
SubList<point>(compactCoarseSf, nCoarseFaces).assign(localCoarseSf);
|
||||
|
|
|
@ -236,7 +236,7 @@ int main(int argc, char *argv[])
|
|||
// ~~~~~~~~~~~~~~~
|
||||
|
||||
{
|
||||
DynamicList<label> illegalFaces(surf.size()/100 + 1);
|
||||
dynamicLabelList illegalFaces(surf.size()/100 + 1);
|
||||
|
||||
forAll(surf, faceI)
|
||||
{
|
||||
|
@ -350,7 +350,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
// Dump for subsetting
|
||||
{
|
||||
DynamicList<label> problemFaces(surf.size()/100+1);
|
||||
dynamicLabelList problemFaces(surf.size()/100+1);
|
||||
|
||||
forAll(triQ, faceI)
|
||||
{
|
||||
|
@ -481,7 +481,7 @@ int main(int argc, char *argv[])
|
|||
// Check manifold
|
||||
// ~~~~~~~~~~~~~~
|
||||
|
||||
DynamicList<label> problemFaces(surf.size()/100 + 1);
|
||||
dynamicLabelList problemFaces(surf.size()/100 + 1);
|
||||
|
||||
const labelListList& eFaces = surf.edgeFaces();
|
||||
|
||||
|
|
|
@ -61,11 +61,11 @@ void readNASEdges
|
|||
// coordinates of point
|
||||
DynamicList<point> points;
|
||||
// Nastran index of point
|
||||
DynamicList<label> pointIndices;
|
||||
dynamicLabelList pointIndices;
|
||||
|
||||
// beams
|
||||
DynamicList<edge> edges;
|
||||
DynamicList<label> edgeIndices;
|
||||
dynamicLabelList edgeIndices;
|
||||
|
||||
|
||||
while (is.good())
|
||||
|
|
|
@ -193,7 +193,7 @@ void Foam::boundaryMesh::markEdges
|
|||
const label edgeI,
|
||||
const label distance,
|
||||
labelList& minDistance,
|
||||
DynamicList<label>& visited
|
||||
dynamicLabelList& visited
|
||||
) const
|
||||
{
|
||||
if (distance < maxDistance)
|
||||
|
@ -865,8 +865,8 @@ Foam::labelList Foam::boundaryMesh::getNearest
|
|||
// Divide faces into two bins acc. to normal
|
||||
// - left of splitNormal
|
||||
// - right ,,
|
||||
DynamicList<label> leftFaces(mesh().size()/2);
|
||||
DynamicList<label> rightFaces(mesh().size()/2);
|
||||
dynamicLabelList leftFaces(mesh().size()/2);
|
||||
dynamicLabelList rightFaces(mesh().size()/2);
|
||||
|
||||
forAll(mesh(), bFaceI)
|
||||
{
|
||||
|
@ -1253,7 +1253,7 @@ void Foam::boundaryMesh::patchify
|
|||
|
||||
if (newPatchPtrList.size())
|
||||
{
|
||||
List<DynamicList<label> > patchFaces(nNewPatches);
|
||||
List<dynamicLabelList > patchFaces(nNewPatches);
|
||||
|
||||
// Give reasonable estimate for size of patches
|
||||
label nAvgFaces =
|
||||
|
@ -1516,7 +1516,7 @@ void Foam::boundaryMesh::setExtraEdges(const label edgeI)
|
|||
labelList minDistance(mesh().nEdges(), -1);
|
||||
|
||||
// All edge labels encountered
|
||||
DynamicList<label> visitedEdges;
|
||||
dynamicLabelList visitedEdges;
|
||||
|
||||
// Floodfill from edgeI starting from distance 0. Stop at distance.
|
||||
markEdges(8, edgeI, 0, minDistance, visitedEdges);
|
||||
|
|
|
@ -132,7 +132,7 @@ class boundaryMesh
|
|||
const label edgeI,
|
||||
const label distance,
|
||||
labelList& minDistance,
|
||||
DynamicList<label>& visited
|
||||
dynamicLabelList& visited
|
||||
) const;
|
||||
|
||||
//- Get index of polypatch by name
|
||||
|
|
|
@ -173,11 +173,11 @@ int main(int argc, char *argv[])
|
|||
// Create Look Up Table
|
||||
interpolationLookUpTable<scalar> LookUpTable(control);
|
||||
|
||||
const List<label>& dim = LookUpTable.dim();
|
||||
const labelList& dim = LookUpTable.dim();
|
||||
|
||||
const List<scalar>& min = LookUpTable.min();
|
||||
const scalarList& min = LookUpTable.min();
|
||||
|
||||
const List<scalar>& delta = LookUpTable.delta();
|
||||
const scalarList& delta = LookUpTable.delta();
|
||||
|
||||
label count = 0;
|
||||
|
||||
|
|
|
@ -41,7 +41,8 @@ setenv FOAM_JOB_DIR $WM_PROJECT_INST_DIR/jobControl
|
|||
# wmake configuration
|
||||
setenv WM_DIR $WM_PROJECT_DIR/wmake
|
||||
setenv WM_LINK_LANGUAGE c++
|
||||
setenv WM_OPTIONS $WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
||||
setenv WM_LABEL_OPTION "Int$WM_LABEL_SIZE"
|
||||
setenv WM_OPTIONS "$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION$WM_COMPILE_OPTION"
|
||||
set path=($WM_DIR $path)
|
||||
|
||||
# base configuration
|
||||
|
|
|
@ -79,7 +79,8 @@ export FOAM_JOB_DIR=$HOME/$WM_PROJECT/jobControl
|
|||
# wmake configuration
|
||||
export WM_DIR=$WM_PROJECT_DIR/wmake
|
||||
export WM_LINK_LANGUAGE=c++
|
||||
export WM_OPTIONS=$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_COMPILE_OPTION
|
||||
export WM_LABEL_OPTION="Int$WM_LABEL_SIZE"
|
||||
export WM_OPTIONS="$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION$WM_COMPILE_OPTION"
|
||||
export PATH=$WM_DIR:$PATH
|
||||
|
||||
# base configuration
|
||||
|
|
|
@ -40,7 +40,7 @@ Foam::List<Foam::word> Foam::ensightPart::elemTypes_(0);
|
|||
|
||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||
|
||||
bool Foam::ensightPart::isFieldDefined(const List<scalar>& field) const
|
||||
bool Foam::ensightPart::isFieldDefined(const scalarList& field) const
|
||||
{
|
||||
forAll(elemLists_, elemI)
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@ class ensightPart
|
|||
// Private data
|
||||
|
||||
// Static data members
|
||||
static List<word> elemTypes_;
|
||||
static wordList elemTypes_;
|
||||
|
||||
|
||||
protected:
|
||||
|
@ -126,7 +126,7 @@ protected:
|
|||
void reconstruct(Istream&);
|
||||
|
||||
//- check for fully defined fields
|
||||
bool isFieldDefined(const List<scalar>&) const;
|
||||
bool isFieldDefined(const scalarList&) const;
|
||||
|
||||
//- write the part header
|
||||
void writeHeader(ensightFile&, bool withDescription=false) const;
|
||||
|
@ -135,7 +135,7 @@ protected:
|
|||
void writeFieldList
|
||||
(
|
||||
ensightFile& os,
|
||||
const List<scalar>& field,
|
||||
const scalarList& field,
|
||||
const labelList& idList
|
||||
) const;
|
||||
|
||||
|
@ -212,7 +212,7 @@ public:
|
|||
|
||||
// Static members
|
||||
|
||||
virtual List<word> const& elementTypes() const
|
||||
virtual wordList const& elementTypes() const
|
||||
{
|
||||
return elemTypes_;
|
||||
}
|
||||
|
@ -292,16 +292,16 @@ public:
|
|||
void writeScalarField
|
||||
(
|
||||
ensightFile&,
|
||||
const List<scalar>& field
|
||||
const scalarList& field
|
||||
) const;
|
||||
|
||||
//- write vector field components
|
||||
void writeVectorField
|
||||
(
|
||||
ensightFile&,
|
||||
const List<scalar>& field0,
|
||||
const List<scalar>& field1,
|
||||
const List<scalar>& field2
|
||||
const scalarList& field0,
|
||||
const scalarList& field1,
|
||||
const scalarList& field2
|
||||
) const;
|
||||
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ protected:
|
|||
};
|
||||
|
||||
// Static data members
|
||||
static List<word> elemTypes_;
|
||||
static wordList elemTypes_;
|
||||
|
||||
|
||||
public:
|
||||
|
@ -140,7 +140,7 @@ public:
|
|||
// Member Functions
|
||||
|
||||
//- static listing of the element types
|
||||
virtual List<word> const& elementTypes() const
|
||||
virtual wordList const& elementTypes() const
|
||||
{
|
||||
return elemTypes_;
|
||||
}
|
||||
|
|
|
@ -79,7 +79,7 @@ protected:
|
|||
};
|
||||
|
||||
// Static data members
|
||||
static List<word> elemTypes_;
|
||||
static wordList elemTypes_;
|
||||
|
||||
|
||||
public:
|
||||
|
@ -120,7 +120,7 @@ public:
|
|||
// Member Functions
|
||||
|
||||
//- static listing of the element types
|
||||
virtual List<word> const& elementTypes() const
|
||||
virtual wordList const& elementTypes() const
|
||||
{
|
||||
return elemTypes_;
|
||||
}
|
||||
|
|
|
@ -55,8 +55,8 @@ void Foam::ensightPart::writeHeader
|
|||
void Foam::ensightPart::writeFieldList
|
||||
(
|
||||
ensightFile& os,
|
||||
const List<scalar>& field,
|
||||
const List<label>& idList
|
||||
const scalarList& field,
|
||||
const labelList& idList
|
||||
) const
|
||||
{
|
||||
forAll(idList, i)
|
||||
|
@ -172,7 +172,7 @@ void Foam::ensightPart::writeGeometry(ensightGeoFile& os) const
|
|||
void Foam::ensightPart::writeScalarField
|
||||
(
|
||||
ensightFile& os,
|
||||
const List<scalar>& field
|
||||
const scalarList& field
|
||||
) const
|
||||
{
|
||||
if (size() && field.size() && (os.allowUndef() || isFieldDefined(field)))
|
||||
|
@ -196,9 +196,9 @@ void Foam::ensightPart::writeScalarField
|
|||
void Foam::ensightPart::writeVectorField
|
||||
(
|
||||
ensightFile& os,
|
||||
const List<scalar>& field0,
|
||||
const List<scalar>& field1,
|
||||
const List<scalar>& field2
|
||||
const scalarList& field0,
|
||||
const scalarList& field1,
|
||||
const scalarList& field2
|
||||
) const
|
||||
{
|
||||
if (size() && field0.size() && (os.allowUndef() || isFieldDefined(field0)))
|
||||
|
|
|
@ -248,7 +248,7 @@ void Foam::ensightParts::writeData(Ostream& os) const
|
|||
void Foam::ensightParts::writeScalarField
|
||||
(
|
||||
ensightFile& os,
|
||||
const List<scalar>& field,
|
||||
const scalarList& field,
|
||||
bool useFaceData
|
||||
) const
|
||||
{
|
||||
|
@ -270,9 +270,9 @@ void Foam::ensightParts::writeScalarField
|
|||
void Foam::ensightParts::writeVectorField
|
||||
(
|
||||
ensightFile& os,
|
||||
const List<scalar>& field0,
|
||||
const List<scalar>& field1,
|
||||
const List<scalar>& field2,
|
||||
const scalarList& field0,
|
||||
const scalarList& field1,
|
||||
const scalarList& field2,
|
||||
bool useFaceData
|
||||
) const
|
||||
{
|
||||
|
|
|
@ -112,7 +112,7 @@ public:
|
|||
void writeScalarField
|
||||
(
|
||||
ensightFile&,
|
||||
const List<scalar>& field,
|
||||
const scalarList& field,
|
||||
bool useFaceData = false
|
||||
) const;
|
||||
|
||||
|
@ -120,9 +120,9 @@ public:
|
|||
void writeVectorField
|
||||
(
|
||||
ensightFile&,
|
||||
const List<scalar>& field0,
|
||||
const List<scalar>& field1,
|
||||
const List<scalar>& field2,
|
||||
const scalarList& field0,
|
||||
const scalarList& field1,
|
||||
const scalarList& field2,
|
||||
bool useFaceData = false
|
||||
) const;
|
||||
|
||||
|
|
|
@ -189,7 +189,7 @@ void Foam::meshReader::createPolyBoundary()
|
|||
else if (patchPhysicalTypes_[patchI] == "monitoring")
|
||||
{
|
||||
// translate the "monitoring" pseudo-boundaries to face sets
|
||||
List<label> monitoring(idList.size());
|
||||
labelList monitoring(idList.size());
|
||||
|
||||
label monitorI = 0;
|
||||
forAll(idList, bndI)
|
||||
|
|
|
@ -103,7 +103,7 @@ void Foam::meshReader::addFaceZones(polyMesh& mesh) const
|
|||
(
|
||||
iter.key(),
|
||||
iter(),
|
||||
List<bool>(iter().size(), false),
|
||||
boolList(iter().size(), false),
|
||||
nZone,
|
||||
mesh.faceZones()
|
||||
)
|
||||
|
|
|
@ -220,7 +220,7 @@ private:
|
|||
|
||||
void writeInterfaces(const objectRegistry&) const;
|
||||
|
||||
//- Write List<label> in constant/polyMesh
|
||||
//- Write labelList in constant/polyMesh
|
||||
void writeMeshLabelList
|
||||
(
|
||||
const objectRegistry& registry,
|
||||
|
|
|
@ -149,7 +149,7 @@ void Foam::meshReader::writeAux(const objectRegistry& registry) const
|
|||
cellTable_.writeDict(registry);
|
||||
writeInterfaces(registry);
|
||||
|
||||
// write origCellId as List<label>
|
||||
// write origCellId as labelList
|
||||
writeMeshLabelList
|
||||
(
|
||||
registry,
|
||||
|
@ -158,7 +158,7 @@ void Foam::meshReader::writeAux(const objectRegistry& registry) const
|
|||
IOstream::BINARY
|
||||
);
|
||||
|
||||
// write cellTableId as List<label>
|
||||
// write cellTableId as labelList
|
||||
// this is crucial for later conversion back to ccm/starcd
|
||||
writeMeshLabelList
|
||||
(
|
||||
|
|
|
@ -640,9 +640,9 @@ void Foam::meshReaders::STARCD::readBoundary(const fileName& inputName)
|
|||
label lineLabel, starCellId, cellFaceId, starRegion, configNumber;
|
||||
word patchType;
|
||||
|
||||
labelList mapToFoamPatchId(1000, -1);
|
||||
labelList nPatchFaces(1000, 0);
|
||||
labelList origRegion(1000, 0);
|
||||
labelList mapToFoamPatchId(1000, label(-1));
|
||||
labelList nPatchFaces(1000, label(0));
|
||||
labelList origRegion(1000, label(0));
|
||||
patchTypes_.setSize(1000);
|
||||
|
||||
// this is what we seem to need
|
||||
|
|
|
@ -90,7 +90,7 @@ class cellTable
|
|||
Map<label> zoneMap() const;
|
||||
|
||||
//- A contiguous list of cellTable names
|
||||
List<word> namesList() const;
|
||||
wordList namesList() const;
|
||||
|
||||
//- Add required entries - MaterialType
|
||||
void addDefaults();
|
||||
|
|
|
@ -293,7 +293,7 @@ void Foam::meshWriters::STARCD::writeCells(const fileName& prefix) const
|
|||
const labelList& cFaces = cells[cellId];
|
||||
|
||||
// create (beg,end) indices
|
||||
List<label> indices(cFaces.size() + 1);
|
||||
labelList indices(cFaces.size() + 1);
|
||||
indices[0] = indices.size();
|
||||
|
||||
label count = indices.size();
|
||||
|
|
|
@ -154,7 +154,7 @@ void Foam::mgMeshLevel::makeChild() const
|
|||
);
|
||||
|
||||
// MGridGen agglomeration options.
|
||||
List<int> options(4, 0);
|
||||
List<int> options(4);
|
||||
options[0] = 4; // globular agglom
|
||||
options[1] = 6; // objective F3 and F2
|
||||
options[2] = 128; // debugging output level
|
||||
|
|
|
@ -46,8 +46,8 @@ namespace Foam
|
|||
void Foam::decompositionMethod::calcCSR
|
||||
(
|
||||
const labelListList& cellCells,
|
||||
List<int>& adjncy,
|
||||
List<int>& xadj
|
||||
labelList& adjncy,
|
||||
labelList& xadj
|
||||
)
|
||||
{
|
||||
// Count number of internal faces
|
||||
|
@ -88,8 +88,8 @@ void Foam::decompositionMethod::calcCSR
|
|||
void Foam::decompositionMethod::calcCSR
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
List<int>& adjncy,
|
||||
List<int>& xadj
|
||||
labelList& adjncy,
|
||||
labelList& xadj
|
||||
)
|
||||
{
|
||||
// Make Metis CSR (Compressed Storage Format) storage
|
||||
|
@ -185,8 +185,8 @@ void Foam::decompositionMethod::calcCSR
|
|||
void Foam::decompositionMethod::calcDistributedCSR
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
List<int>& adjncy,
|
||||
List<int>& xadj
|
||||
labelList& adjncy,
|
||||
labelList& xadj
|
||||
)
|
||||
{
|
||||
// Create global cell numbers
|
||||
|
@ -210,7 +210,7 @@ void Foam::decompositionMethod::calcDistributedCSR
|
|||
// Get renumbered owner on other side of coupled faces
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
List<int> globalNeighbour(mesh.nFaces()-mesh.nInternalFaces());
|
||||
labelList globalNeighbour(mesh.nFaces()-mesh.nInternalFaces());
|
||||
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
|
@ -239,7 +239,7 @@ void Foam::decompositionMethod::calcDistributedCSR
|
|||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Number of faces per cell
|
||||
List<int> nFacesPerCell(mesh.nCells(), 0);
|
||||
labelList nFacesPerCell(mesh.nCells(), 0);
|
||||
|
||||
// Number of coupled faces
|
||||
label nCoupledFaces = 0;
|
||||
|
@ -272,7 +272,7 @@ void Foam::decompositionMethod::calcDistributedCSR
|
|||
|
||||
xadj.setSize(mesh.nCells() + 1);
|
||||
|
||||
int freeAdj = 0;
|
||||
label freeAdj = 0;
|
||||
|
||||
for (label cellI = 0; cellI < mesh.nCells(); cellI++)
|
||||
{
|
||||
|
|
|
@ -63,8 +63,8 @@ protected:
|
|||
static void calcCSR
|
||||
(
|
||||
const labelListList& globalCellCells,
|
||||
List<int>& adjncy,
|
||||
List<int>& xadj
|
||||
labelList& adjncy,
|
||||
labelList& xadj
|
||||
);
|
||||
|
||||
//- Helper: convert local connectivity from the mesh
|
||||
|
@ -73,8 +73,8 @@ protected:
|
|||
static void calcCSR
|
||||
(
|
||||
const polyMesh& mesh,
|
||||
List<int>& adjncy,
|
||||
List<int>& xadj
|
||||
labelList& adjncy,
|
||||
labelList& xadj
|
||||
);
|
||||
|
||||
//- Helper: convert mesh connectivity into distributed CSR
|
||||
|
@ -82,8 +82,8 @@ protected:
|
|||
static void calcDistributedCSR
|
||||
(
|
||||
const polyMesh&,
|
||||
List<int>& adjncy,
|
||||
List<int>& xadj
|
||||
labelList& adjncy,
|
||||
labelList& xadj
|
||||
);
|
||||
|
||||
//- Helper: determine (non-parallel) cellCells from mesh
|
||||
|
|
|
@ -97,7 +97,7 @@ void Foam::hierarchGeomDecomp::setDecompOrder()
|
|||
|
||||
Foam::label Foam::hierarchGeomDecomp::findLower
|
||||
(
|
||||
const List<scalar>& l,
|
||||
const scalarList& l,
|
||||
const scalar t,
|
||||
const label initLow,
|
||||
const label initHigh
|
||||
|
@ -179,7 +179,7 @@ void Foam::hierarchGeomDecomp::calculateSortedWeightedSizes
|
|||
void Foam::hierarchGeomDecomp::findBinary
|
||||
(
|
||||
const label sizeTol,
|
||||
const List<scalar>& values,
|
||||
const scalarList& values,
|
||||
const label minIndex, // index of previous value
|
||||
const scalar minValue, // value at minIndex
|
||||
const scalar maxValue, // global max of values
|
||||
|
@ -253,8 +253,8 @@ void Foam::hierarchGeomDecomp::findBinary
|
|||
void Foam::hierarchGeomDecomp::findBinary
|
||||
(
|
||||
const label sizeTol,
|
||||
const List<scalar>& sortedWeightedSizes,
|
||||
const List<scalar>& values,
|
||||
const scalarList& sortedWeightedSizes,
|
||||
const scalarList& values,
|
||||
const label minIndex, // index of previous value
|
||||
const scalar minValue, // value at minIndex
|
||||
const scalar maxValue, // global max of values
|
||||
|
|
|
@ -100,7 +100,7 @@ class hierarchGeomDecomp
|
|||
//- Find index of t in list inbetween indices left and right
|
||||
static label findLower
|
||||
(
|
||||
const List<scalar>&,
|
||||
const scalarList&,
|
||||
const scalar t,
|
||||
const label left,
|
||||
const label right
|
||||
|
@ -112,7 +112,7 @@ class hierarchGeomDecomp
|
|||
static void findBinary
|
||||
(
|
||||
const label sizeTol, // Acceptable size difference
|
||||
const List<scalar>&,
|
||||
const scalarList&,
|
||||
const label leftIndex, // index of previous value
|
||||
const scalar leftValue, // value at leftIndex
|
||||
const scalar maxValue, // global max of values
|
||||
|
@ -127,8 +127,8 @@ class hierarchGeomDecomp
|
|||
static void findBinary
|
||||
(
|
||||
const label sizeTol, // Acceptable size difference
|
||||
const List<scalar>& sortedWeightedSizes,
|
||||
const List<scalar>&,
|
||||
const scalarList& sortedWeightedSizes,
|
||||
const scalarList&,
|
||||
const label leftIndex, // index of previous value
|
||||
const scalar leftValue, // value at leftIndex
|
||||
const scalar maxValue, // global max of values
|
||||
|
|
|
@ -54,10 +54,10 @@ namespace Foam
|
|||
|
||||
Foam::label Foam::metisDecomp::decompose
|
||||
(
|
||||
const List<int>& adjncy,
|
||||
const List<int>& xadj,
|
||||
const labelList& adjncy,
|
||||
const labelList& xadj,
|
||||
const scalarField& cWeights,
|
||||
List<int>& finalDecomp
|
||||
labelList& finalDecomp
|
||||
)
|
||||
{
|
||||
// Method of decomposition
|
||||
|
@ -65,7 +65,7 @@ Foam::label Foam::metisDecomp::decompose
|
|||
// k-way: multi-level k-way
|
||||
word method("k-way");
|
||||
|
||||
int numCells = xadj.size()-1;
|
||||
label numCells = xadj.size()-1;
|
||||
|
||||
// decomposition options. 0 = use defaults
|
||||
idx_t options[METIS_NOPTIONS];
|
||||
|
@ -76,10 +76,10 @@ Foam::label Foam::metisDecomp::decompose
|
|||
Field<real_t> processorWeights;
|
||||
|
||||
// cell weights (so on the vertices of the dual)
|
||||
List<int> cellWeights;
|
||||
labelList cellWeights;
|
||||
|
||||
// face weights (so on the edges of the dual)
|
||||
List<int> faceWeights;
|
||||
labelList faceWeights;
|
||||
|
||||
|
||||
// Check for externally provided cellweights and if so initialise weights
|
||||
|
@ -177,7 +177,7 @@ Foam::label Foam::metisDecomp::decompose
|
|||
{
|
||||
Info<< "metisDecomp : Using cell-based weights." << endl;
|
||||
|
||||
IOList<int> cellIOWeights
|
||||
IOList<label> cellIOWeights
|
||||
(
|
||||
IOobject
|
||||
(
|
||||
|
@ -200,17 +200,17 @@ Foam::label Foam::metisDecomp::decompose
|
|||
}
|
||||
}
|
||||
|
||||
int nProcs = nProcessors_;
|
||||
label nProcs = nProcessors_;
|
||||
|
||||
// output: cell -> processor addressing
|
||||
finalDecomp.setSize(numCells);
|
||||
|
||||
// output: number of cut edges
|
||||
int edgeCut = 0;
|
||||
label edgeCut = 0;
|
||||
|
||||
// Vertex weight info
|
||||
int* vwgtPtr = nullptr;
|
||||
int* adjwgtPtr = nullptr;
|
||||
label* vwgtPtr = nullptr;
|
||||
label* adjwgtPtr = nullptr;
|
||||
|
||||
if (cellWeights.size())
|
||||
{
|
||||
|
@ -221,7 +221,7 @@ Foam::label Foam::metisDecomp::decompose
|
|||
adjwgtPtr = faceWeights.begin();
|
||||
}
|
||||
|
||||
int one = 1;
|
||||
label one = 1;
|
||||
|
||||
if (method == "recursive")
|
||||
{
|
||||
|
@ -229,8 +229,8 @@ Foam::label Foam::metisDecomp::decompose
|
|||
(
|
||||
&numCells, // num vertices in graph
|
||||
&one,
|
||||
const_cast<List<int>&>(xadj).begin(), // indexing into adjncy
|
||||
const_cast<List<int>&>(adjncy).begin(), // neighbour info
|
||||
const_cast<List<label>&>(xadj).begin(), // indexing into adjncy
|
||||
const_cast<List<label>&>(adjncy).begin(), // neighbour info
|
||||
vwgtPtr, // vertexweights
|
||||
nullptr,
|
||||
adjwgtPtr, // no edgeweights
|
||||
|
@ -248,8 +248,8 @@ Foam::label Foam::metisDecomp::decompose
|
|||
(
|
||||
&numCells, // num vertices in graph
|
||||
&one,
|
||||
const_cast<List<int>&>(xadj).begin(), // indexing into adjncy
|
||||
const_cast<List<int>&>(adjncy).begin(), // neighbour info
|
||||
const_cast<List<label>&>(xadj).begin(), // indexing into adjncy
|
||||
const_cast<List<label>&>(adjncy).begin(), // neighbour info
|
||||
vwgtPtr, // vertexweights
|
||||
nullptr,
|
||||
adjwgtPtr, // no edgeweights
|
||||
|
@ -300,8 +300,8 @@ Foam::labelList Foam::metisDecomp::decompose
|
|||
<< exit(FatalError);
|
||||
}
|
||||
|
||||
List<int> adjncy;
|
||||
List<int> xadj;
|
||||
labelList adjncy;
|
||||
labelList xadj;
|
||||
calcCSR
|
||||
(
|
||||
mesh_,
|
||||
|
@ -310,7 +310,7 @@ Foam::labelList Foam::metisDecomp::decompose
|
|||
);
|
||||
|
||||
// Decompose using default weights
|
||||
List<int> finalDecomp;
|
||||
labelList finalDecomp;
|
||||
decompose(adjncy, xadj, pointWeights, finalDecomp);
|
||||
|
||||
// Copy back to labelList
|
||||
|
@ -348,8 +348,8 @@ Foam::labelList Foam::metisDecomp::decompose
|
|||
// Make Metis CSR (Compressed Storage Format) storage
|
||||
// adjncy : contains neighbours (= edges in graph)
|
||||
// xadj(celli) : start of information in adjncy for celli
|
||||
List<int> adjncy;
|
||||
List<int> xadj;
|
||||
labelList adjncy;
|
||||
labelList xadj;
|
||||
{
|
||||
// Get cellCells on coarse mesh.
|
||||
labelListList cellCells;
|
||||
|
@ -365,7 +365,7 @@ Foam::labelList Foam::metisDecomp::decompose
|
|||
}
|
||||
|
||||
// Decompose using default weights
|
||||
List<int> finalDecomp;
|
||||
labelList finalDecomp;
|
||||
decompose(adjncy, xadj, coarseWeights, finalDecomp);
|
||||
|
||||
|
||||
|
@ -406,12 +406,12 @@ Foam::labelList Foam::metisDecomp::decompose
|
|||
// adjncy : contains neighbours (= edges in graph)
|
||||
// xadj(celli) : start of information in adjncy for celli
|
||||
|
||||
List<int> adjncy;
|
||||
List<int> xadj;
|
||||
labelList adjncy;
|
||||
labelList xadj;
|
||||
calcCSR(globalCellCells, adjncy, xadj);
|
||||
|
||||
// Decompose using default weights
|
||||
List<int> finalDecomp;
|
||||
labelList finalDecomp;
|
||||
decompose(adjncy, xadj, cWeights, finalDecomp);
|
||||
|
||||
// Copy back to labelList
|
||||
|
|
|
@ -63,10 +63,10 @@ class metisDecomp
|
|||
|
||||
label decompose
|
||||
(
|
||||
const List<int>& adjncy,
|
||||
const List<int>& xadj,
|
||||
const labelList& adjncy,
|
||||
const labelList& xadj,
|
||||
const scalarField& cellWeights,
|
||||
List<int>& finalDecomp
|
||||
labelList& finalDecomp
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -59,20 +59,20 @@ namespace Foam
|
|||
//- Does prevention of 0 cell domains and calls parmetis.
|
||||
Foam::label Foam::parMetisDecomp::decompose
|
||||
(
|
||||
Field<int>& xadj,
|
||||
Field<int>& adjncy,
|
||||
Field<label>& xadj,
|
||||
Field<label>& adjncy,
|
||||
const pointField& cellCentres,
|
||||
Field<int>& cellWeights,
|
||||
Field<int>& faceWeights,
|
||||
const List<int>& options,
|
||||
List<int>& finalDecomp
|
||||
Field<label>& cellWeights,
|
||||
Field<label>& faceWeights,
|
||||
const labelList& options,
|
||||
labelList& finalDecomp
|
||||
)
|
||||
{
|
||||
// C style numbering
|
||||
int numFlag = 0;
|
||||
label numFlag = 0;
|
||||
|
||||
// Number of dimensions
|
||||
int nDims = 3;
|
||||
label nDims = 3;
|
||||
|
||||
|
||||
if (cellCentres.size() != xadj.size()-1)
|
||||
|
@ -85,14 +85,14 @@ Foam::label Foam::parMetisDecomp::decompose
|
|||
|
||||
|
||||
// Get number of cells on all processors
|
||||
List<int> nLocalCells(Pstream::nProcs());
|
||||
labelList nLocalCells(Pstream::nProcs());
|
||||
nLocalCells[Pstream::myProcNo()] = xadj.size()-1;
|
||||
Pstream::gatherList(nLocalCells);
|
||||
Pstream::scatterList(nLocalCells);
|
||||
|
||||
// Get cell offsets.
|
||||
List<int> cellOffsets(Pstream::nProcs()+1);
|
||||
int nGlobalCells = 0;
|
||||
labelList cellOffsets(Pstream::nProcs()+1);
|
||||
label nGlobalCells = 0;
|
||||
forAll(nLocalCells, procI)
|
||||
{
|
||||
cellOffsets[procI] = nGlobalCells;
|
||||
|
@ -102,7 +102,7 @@ Foam::label Foam::parMetisDecomp::decompose
|
|||
|
||||
// Convert pointField into the data type parMetis expects (float or double)
|
||||
Field<real_t> xyz(3*cellCentres.size());
|
||||
int compI = 0;
|
||||
label compI = 0;
|
||||
forAll(cellCentres, cellI)
|
||||
{
|
||||
const point& cc = cellCentres[cellI];
|
||||
|
@ -120,7 +120,7 @@ Foam::label Foam::parMetisDecomp::decompose
|
|||
|
||||
// Number of cells to send to the next processor
|
||||
// (is same as number of cells next processor has to receive)
|
||||
List<int> nSendCells(Pstream::nProcs(), 0);
|
||||
labelList nSendCells(Pstream::nProcs(), 0);
|
||||
|
||||
for (label procI = nLocalCells.size()-1; procI >=1; procI--)
|
||||
{
|
||||
|
@ -137,11 +137,11 @@ Foam::label Foam::parMetisDecomp::decompose
|
|||
// Receive cells from previous processor
|
||||
IPstream fromPrevProc(Pstream::blocking, Pstream::myProcNo()-1);
|
||||
|
||||
Field<int> prevXadj(fromPrevProc);
|
||||
Field<int> prevAdjncy(fromPrevProc);
|
||||
Field<label> prevXadj(fromPrevProc);
|
||||
Field<label> prevAdjncy(fromPrevProc);
|
||||
Field<real_t> prevXyz(fromPrevProc);
|
||||
Field<int> prevCellWeights(fromPrevProc);
|
||||
Field<int> prevFaceWeights(fromPrevProc);
|
||||
Field<label> prevCellWeights(fromPrevProc);
|
||||
Field<label> prevFaceWeights(fromPrevProc);
|
||||
|
||||
if (prevXadj.size() != nSendCells[Pstream::myProcNo()-1])
|
||||
{
|
||||
|
@ -172,34 +172,34 @@ Foam::label Foam::parMetisDecomp::decompose
|
|||
// Send cells to next processor
|
||||
OPstream toNextProc(Pstream::blocking, Pstream::myProcNo()+1);
|
||||
|
||||
int nCells = nSendCells[Pstream::myProcNo()];
|
||||
int startCell = xadj.size()-1 - nCells;
|
||||
int startFace = xadj[startCell];
|
||||
int nFaces = adjncy.size()-startFace;
|
||||
label nCells = nSendCells[Pstream::myProcNo()];
|
||||
label startCell = xadj.size()-1 - nCells;
|
||||
label startFace = xadj[startCell];
|
||||
label nFaces = adjncy.size()-startFace;
|
||||
|
||||
// Send for all cell data: last nCells elements
|
||||
// Send for all face data: last nFaces elements
|
||||
toNextProc
|
||||
<< Field<int>::subField(xadj, nCells, startCell)-startFace
|
||||
<< Field<int>::subField(adjncy, nFaces, startFace)
|
||||
<< Field<label>::subField(xadj, nCells, startCell)-startFace
|
||||
<< Field<label>::subField(adjncy, nFaces, startFace)
|
||||
<< SubField<real_t>(xyz, nDims*nCells, nDims*startCell)
|
||||
<<
|
||||
(
|
||||
cellWeights.size()
|
||||
? static_cast<const Field<int>&>
|
||||
? static_cast<const Field<label>&>
|
||||
(
|
||||
Field<int>::subField(cellWeights, nCells, startCell)
|
||||
Field<label>::subField(cellWeights, nCells, startCell)
|
||||
)
|
||||
: Field<int>(0)
|
||||
: Field<label>(0)
|
||||
)
|
||||
<<
|
||||
(
|
||||
faceWeights.size()
|
||||
? static_cast<const Field<int>&>
|
||||
? static_cast<const Field<label>&>
|
||||
(
|
||||
Field<int>::subField(faceWeights, nFaces, startFace)
|
||||
Field<label>::subField(faceWeights, nFaces, startFace)
|
||||
)
|
||||
: Field<int>(0)
|
||||
: Field<label>(0)
|
||||
);
|
||||
|
||||
// Remove data that has been sent
|
||||
|
@ -248,9 +248,9 @@ Foam::label Foam::parMetisDecomp::decompose
|
|||
}
|
||||
|
||||
// Weight info
|
||||
int wgtFlag = 0;
|
||||
int* vwgtPtr = nullptr;
|
||||
int* adjwgtPtr = nullptr;
|
||||
label wgtFlag = 0;
|
||||
label* vwgtPtr = nullptr;
|
||||
label* adjwgtPtr = nullptr;
|
||||
|
||||
if (cellWeights.size())
|
||||
{
|
||||
|
@ -265,7 +265,7 @@ Foam::label Foam::parMetisDecomp::decompose
|
|||
|
||||
|
||||
// Number of weights or balance constraints
|
||||
int nCon = 1;
|
||||
label nCon = 1;
|
||||
// Per processor, per constraint the weight
|
||||
Field<real_t> tpwgts(nCon*nProcessors_, 1./nProcessors_);
|
||||
// Imbalance tolerance
|
||||
|
@ -282,8 +282,10 @@ Foam::label Foam::parMetisDecomp::decompose
|
|||
finalDecomp.setSize(nLocalCells[Pstream::myProcNo()]);
|
||||
|
||||
// output: number of cut edges
|
||||
int edgeCut = 0;
|
||||
label edgeCut = 0;
|
||||
|
||||
// Number of parts
|
||||
label nProcs = nProcessors_;
|
||||
|
||||
ParMETIS_V3_PartGeomKway
|
||||
(
|
||||
|
@ -297,10 +299,10 @@ Foam::label Foam::parMetisDecomp::decompose
|
|||
&nDims,
|
||||
xyz.begin(),
|
||||
&nCon,
|
||||
&nProcessors_, // nParts
|
||||
&nProcs, // nParts
|
||||
tpwgts.begin(),
|
||||
ubvec.begin(),
|
||||
const_cast<List<int>&>(options).begin(),
|
||||
const_cast<List<label>&>(options).begin(),
|
||||
&edgeCut,
|
||||
finalDecomp.begin(),
|
||||
&comm
|
||||
|
@ -315,7 +317,7 @@ Foam::label Foam::parMetisDecomp::decompose
|
|||
{
|
||||
IPstream fromNextProc(Pstream::blocking, Pstream::myProcNo()+1);
|
||||
|
||||
List<int> nextFinalDecomp(fromNextProc);
|
||||
labelList nextFinalDecomp(fromNextProc);
|
||||
|
||||
if (nextFinalDecomp.size() != nSendCells[Pstream::myProcNo()])
|
||||
{
|
||||
|
@ -334,10 +336,10 @@ Foam::label Foam::parMetisDecomp::decompose
|
|||
{
|
||||
OPstream toPrevProc(Pstream::blocking, Pstream::myProcNo()-1);
|
||||
|
||||
int nToPrevious = nSendCells[Pstream::myProcNo()-1];
|
||||
label nToPrevious = nSendCells[Pstream::myProcNo()-1];
|
||||
|
||||
toPrevProc <<
|
||||
SubList<int>
|
||||
SubList<label>
|
||||
(
|
||||
finalDecomp,
|
||||
nToPrevious,
|
||||
|
@ -399,9 +401,9 @@ Foam::labelList Foam::parMetisDecomp::decompose
|
|||
|
||||
|
||||
// Connections
|
||||
Field<int> adjncy;
|
||||
Field<label> adjncy;
|
||||
// Offsets into adjncy
|
||||
Field<int> xadj;
|
||||
Field<label> xadj;
|
||||
calcDistributedCSR
|
||||
(
|
||||
mesh_,
|
||||
|
@ -411,16 +413,16 @@ Foam::labelList Foam::parMetisDecomp::decompose
|
|||
|
||||
|
||||
// decomposition options. 0 = use defaults
|
||||
List<int> options(3, 0);
|
||||
labelList options(3, label(0));
|
||||
//options[0] = 1; // don't use defaults but use values below
|
||||
//options[1] = -1; // full debug info
|
||||
//options[2] = 15; // random number seed
|
||||
|
||||
// cell weights (so on the vertices of the dual)
|
||||
Field<int> cellWeights;
|
||||
Field<label> cellWeights;
|
||||
|
||||
// face weights (so on the edges of the dual)
|
||||
Field<int> faceWeights;
|
||||
Field<label> faceWeights;
|
||||
|
||||
|
||||
// Check for externally provided cellweights and if so initialise weights
|
||||
|
@ -527,7 +529,7 @@ Foam::labelList Foam::parMetisDecomp::decompose
|
|||
faceWeights.setSize(adjncy.size());
|
||||
|
||||
// Assume symmetric weights. Keep same ordering as adjncy.
|
||||
List<int> nFacesPerCell(mesh_.nCells(), 0);
|
||||
labelList nFacesPerCell(mesh_.nCells(), 0);
|
||||
|
||||
// Handle internal faces
|
||||
for (label faceI = 0; faceI < mesh_.nInternalFaces(); faceI++)
|
||||
|
@ -581,7 +583,7 @@ Foam::labelList Foam::parMetisDecomp::decompose
|
|||
|
||||
|
||||
// Do actual decomposition
|
||||
List<int> finalDecomp;
|
||||
labelList finalDecomp;
|
||||
decompose
|
||||
(
|
||||
xadj,
|
||||
|
@ -636,7 +638,7 @@ Foam::labelList Foam::parMetisDecomp::decompose
|
|||
// Get renumbered owner region on other side of coupled faces
|
||||
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
List<int> globalNeighbour(mesh_.nFaces()-mesh_.nInternalFaces());
|
||||
labelList globalNeighbour(mesh_.nFaces()-mesh_.nInternalFaces());
|
||||
|
||||
forAll(patches, patchI)
|
||||
{
|
||||
|
@ -781,24 +783,24 @@ Foam::labelList Foam::parMetisDecomp::decompose
|
|||
// Make Metis Distributed CSR (Compressed Storage Format) storage
|
||||
|
||||
// Connections
|
||||
Field<int> adjncy;
|
||||
Field<label> adjncy;
|
||||
|
||||
// Offsets into adjncy
|
||||
Field<int> xadj;
|
||||
Field<label> xadj;
|
||||
|
||||
calcCSR(globalCellCells, adjncy, xadj);
|
||||
|
||||
// decomposition options. 0 = use defaults
|
||||
List<int> options(3, 0);
|
||||
labelList options(3, label(0));
|
||||
//options[0] = 1; // don't use defaults but use values below
|
||||
//options[1] = -1; // full debug info
|
||||
//options[2] = 15; // random number seed
|
||||
|
||||
// cell weights (so on the vertices of the dual)
|
||||
Field<int> cellWeights;
|
||||
Field<label> cellWeights;
|
||||
|
||||
// face weights (so on the edges of the dual)
|
||||
Field<int> faceWeights;
|
||||
Field<label> faceWeights;
|
||||
|
||||
|
||||
// Check for externally provided cellweights and if so initialise weights
|
||||
|
@ -860,7 +862,7 @@ Foam::labelList Foam::parMetisDecomp::decompose
|
|||
|
||||
|
||||
// Do actual decomposition
|
||||
List<int> finalDecomp;
|
||||
labelList finalDecomp;
|
||||
decompose
|
||||
(
|
||||
xadj,
|
||||
|
|
|
@ -72,14 +72,14 @@ class parMetisDecomp
|
|||
|
||||
label decompose
|
||||
(
|
||||
Field<int>& xadj,
|
||||
Field<int>& adjncy,
|
||||
Field<label>& xadj,
|
||||
Field<label>& adjncy,
|
||||
const pointField& cellCentres,
|
||||
Field<int>& cellWeights,
|
||||
Field<int>& faceWeights,
|
||||
const List<int>& options,
|
||||
Field<label>& cellWeights,
|
||||
Field<label>& faceWeights,
|
||||
const labelList& options,
|
||||
|
||||
List<int>& finalDecomp
|
||||
labelList& finalDecomp
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -164,11 +164,11 @@ void Foam::scotchDecomp::check(const int retVal, const char* str)
|
|||
// Call scotch with options from dictionary.
|
||||
Foam::label Foam::scotchDecomp::decompose
|
||||
(
|
||||
const List<int>& adjncy,
|
||||
const List<int>& xadj,
|
||||
const labelList& adjncy,
|
||||
const labelList& xadj,
|
||||
const scalarField& cWeights,
|
||||
|
||||
List<int>& finalDecomp
|
||||
labelList& finalDecomp
|
||||
)
|
||||
{
|
||||
// Dump graph
|
||||
|
@ -247,7 +247,7 @@ Foam::label Foam::scotchDecomp::decompose
|
|||
// Graph
|
||||
// ~~~~~
|
||||
|
||||
List<int> velotab;
|
||||
labelList velotab;
|
||||
|
||||
|
||||
// Check for externally provided cellweights and if so initialise weights
|
||||
|
@ -314,7 +314,7 @@ Foam::label Foam::scotchDecomp::decompose
|
|||
SCOTCH_Arch archdat;
|
||||
check(SCOTCH_archInit(&archdat), "SCOTCH_archInit");
|
||||
|
||||
List<label> processorWeights;
|
||||
labelList processorWeights;
|
||||
if (decompositionDict_.found("scotchCoeffs"))
|
||||
{
|
||||
const dictionary& scotchCoeffs =
|
||||
|
@ -443,12 +443,12 @@ Foam::labelList Foam::scotchDecomp::decompose
|
|||
// Make Metis CSR (Compressed Storage Format) storage
|
||||
// adjncy : contains neighbours (= edges in graph)
|
||||
// xadj(celli) : start of information in adjncy for celli
|
||||
List<int> adjncy;
|
||||
List<int> xadj;
|
||||
labelList adjncy;
|
||||
labelList xadj;
|
||||
calcCSR(mesh_, adjncy, xadj);
|
||||
|
||||
// Decompose using default weights
|
||||
List<int> finalDecomp;
|
||||
labelList finalDecomp;
|
||||
decompose(adjncy, xadj, pointWeights, finalDecomp);
|
||||
|
||||
// Copy back to labelList
|
||||
|
@ -485,8 +485,8 @@ Foam::labelList Foam::scotchDecomp::decompose
|
|||
// Make Metis CSR (Compressed Storage Format) storage
|
||||
// adjncy : contains neighbours (= edges in graph)
|
||||
// xadj(celli) : start of information in adjncy for celli
|
||||
List<int> adjncy;
|
||||
List<int> xadj;
|
||||
labelList adjncy;
|
||||
labelList xadj;
|
||||
{
|
||||
// Get cellCells on coarse mesh.
|
||||
labelListList cellCells;
|
||||
|
@ -503,7 +503,7 @@ Foam::labelList Foam::scotchDecomp::decompose
|
|||
}
|
||||
|
||||
// Decompose using weights
|
||||
List<int> finalDecomp;
|
||||
labelList finalDecomp;
|
||||
decompose(adjncy, xadj, coarseWeights, finalDecomp);
|
||||
|
||||
// Rework back into decomposition for original mesh_
|
||||
|
@ -543,12 +543,12 @@ Foam::labelList Foam::scotchDecomp::decompose
|
|||
// adjncy : contains neighbours (= edges in graph)
|
||||
// xadj(celli) : start of information in adjncy for celli
|
||||
|
||||
List<int> adjncy;
|
||||
List<int> xadj;
|
||||
labelList adjncy;
|
||||
labelList xadj;
|
||||
calcCSR(globalCellCells, adjncy, xadj);
|
||||
|
||||
// Decompose using weights
|
||||
List<int> finalDecomp;
|
||||
labelList finalDecomp;
|
||||
decompose(adjncy, xadj, cWeights, finalDecomp);
|
||||
|
||||
// Copy back to labelList
|
||||
|
|
|
@ -68,10 +68,10 @@ class scotchDecomp
|
|||
|
||||
label decompose
|
||||
(
|
||||
const List<int>& adjncy,
|
||||
const List<int>& xadj,
|
||||
const labelList& adjncy,
|
||||
const labelList& xadj,
|
||||
const scalarField& cWeights,
|
||||
List<int>& finalDecomp
|
||||
labelList& finalDecomp
|
||||
);
|
||||
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ class CompactListList_dev
|
|||
label size_;
|
||||
|
||||
//- Offset table
|
||||
List<label> offsets_;
|
||||
labelList offsets_;
|
||||
|
||||
//- Packed matrix of data
|
||||
List<T> m_;
|
||||
|
@ -143,10 +143,10 @@ public:
|
|||
inline bool empty() const;
|
||||
|
||||
//- Return the offset table (= size()+1)
|
||||
inline const List<label>& offsets() const;
|
||||
inline const labelList& offsets() const;
|
||||
|
||||
//- Return non-const access to the offset table
|
||||
inline List<label>& offsets();
|
||||
inline labelList& offsets();
|
||||
|
||||
//- Return the packed matrix of data
|
||||
inline const List<T>& m() const;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue