Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
commit
52c6642a4c
@ -6,6 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -62,13 +63,13 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
||||
/ time().caseName() + ".msh"
|
||||
);
|
||||
|
||||
Info<< "Writing Header" << endl;
|
||||
Info<< "Writing Fluent Mesh" << endl;
|
||||
|
||||
fluentMeshFile
|
||||
<< "(0 \"FOAM to Fluent Mesh File\")" << std::endl << std::endl
|
||||
<< "(0 \"Dimension:\")" << std::endl
|
||||
<< "(2 3)" << std::endl << std::endl
|
||||
<< "(0 \"Grid dimensions:\")" << std::endl;
|
||||
<< "(0 \"OpenFOAM to Fluent Mesh File\")" << nl << nl
|
||||
<< "(0 \"Dimension:\")" << nl
|
||||
<< "(2 3)" << nl << nl
|
||||
<< "(0 \"Grid dimensions:\")" << nl;
|
||||
|
||||
// Writing number of points
|
||||
fluentMeshFile
|
||||
@ -217,8 +218,8 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
||||
|
||||
// Writing cells
|
||||
fluentMeshFile
|
||||
<< "(12 (1 1 "
|
||||
<< nCells() << " 1 0)(" << std::endl;
|
||||
<< "(12 (1 1 " << nCells() << " 1 0)" << nl
|
||||
<< '(';
|
||||
|
||||
const cellModel& hex = cellModel::ref(cellModel::HEX);
|
||||
const cellModel& prism = cellModel::ref(cellModel::PRISM);
|
||||
@ -227,44 +228,59 @@ void Foam::fluentFvMesh::writeFluentMesh() const
|
||||
|
||||
const cellShapeList& cells = cellShapes();
|
||||
|
||||
bool hasWarned = false;
|
||||
label nPolys = 0;
|
||||
|
||||
int nElemPerLine = 25; // Start with linebreak and indent
|
||||
|
||||
forAll(cells, celli)
|
||||
{
|
||||
if (nElemPerLine == 25)
|
||||
{
|
||||
// 25 elements per line with initial indent (readability)
|
||||
fluentMeshFile << "\n ";
|
||||
nElemPerLine = 0;
|
||||
}
|
||||
else if (!(nElemPerLine % 5))
|
||||
{
|
||||
// Format in blocks of 5 (readability)
|
||||
fluentMeshFile << token::SPACE;
|
||||
}
|
||||
fluentMeshFile << token::SPACE;
|
||||
++nElemPerLine;
|
||||
|
||||
|
||||
if (cells[celli].model() == tet)
|
||||
{
|
||||
fluentMeshFile << " " << 2;
|
||||
fluentMeshFile << 2;
|
||||
}
|
||||
else if (cells[celli].model() == hex)
|
||||
{
|
||||
fluentMeshFile << " " << 4;
|
||||
fluentMeshFile << 4;
|
||||
}
|
||||
else if (cells[celli].model() == pyr)
|
||||
{
|
||||
fluentMeshFile << " " << 5;
|
||||
fluentMeshFile << 5;
|
||||
}
|
||||
else if (cells[celli].model() == prism)
|
||||
{
|
||||
fluentMeshFile << " " << 6;
|
||||
fluentMeshFile << 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!hasWarned)
|
||||
{
|
||||
hasWarned = true;
|
||||
|
||||
WarningInFunction
|
||||
<< "foamMeshToFluent: cell shape for cell "
|
||||
<< celli << " only supported by Fluent polyhedral meshes."
|
||||
<< nl
|
||||
<< " Suppressing any further messages for polyhedral"
|
||||
<< " cells." << endl;
|
||||
}
|
||||
fluentMeshFile << " " << 7;
|
||||
fluentMeshFile << 7;
|
||||
++nPolys;
|
||||
}
|
||||
}
|
||||
|
||||
fluentMeshFile << ")())" << std::endl;
|
||||
fluentMeshFile
|
||||
<< nl << "))" << nl;
|
||||
|
||||
|
||||
if (nPolys)
|
||||
{
|
||||
Info<< "Mesh had " << nPolys << " polyhedrals." << endl;
|
||||
}
|
||||
|
||||
|
||||
// Return to dec
|
||||
fluentMeshFile.setf(ios::dec, ios::basefield);
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2015 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -49,7 +49,7 @@ Foam::autoPtr<Foam::ODESolver> Foam::ODESolver::New
|
||||
"ODESolver",
|
||||
solverType,
|
||||
*dictionaryConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return autoPtr<ODESolver>(cstrIter()(odes, dict));
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2016 OpenFOAM Foundation
|
||||
Copyright (C) 2019 OpenCFD Ltd.
|
||||
Copyright (C) 2019-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -68,7 +68,7 @@ Foam::surfaceInterpolationScheme<Type>::New
|
||||
"discretisation",
|
||||
schemeName,
|
||||
*MeshConstructorTablePtr_
|
||||
) << exit(FatalError);
|
||||
) << exit(FatalIOError);
|
||||
}
|
||||
|
||||
return cstrIter()(mesh, schemeData);
|
||||
|
@ -453,12 +453,13 @@ Foam::label Foam::meshRefinement::markSurfaceGapRefinement
|
||||
|
||||
forAll(surf1, i)
|
||||
{
|
||||
// Combine selfProx of shell and surfaces. Ignore regions for
|
||||
// now
|
||||
// Combine selfProx of shell and surfaces.
|
||||
// Ignore regions for now
|
||||
const label cellI = cellMap[i];
|
||||
|
||||
const label shelli =
|
||||
(
|
||||
cellToCompact[cellI] != -1
|
||||
(cellI != -1 && cellToCompact[cellI] != -1)
|
||||
? gapShell[cellToCompact[cellI]]
|
||||
: -1
|
||||
);
|
||||
@ -482,8 +483,6 @@ Foam::label Foam::meshRefinement::markSurfaceGapRefinement
|
||||
)
|
||||
{
|
||||
// Found intersection with surface. Check opposite normal.
|
||||
label cellI = cellMap[i];
|
||||
|
||||
if
|
||||
(
|
||||
cellI != -1
|
||||
|
@ -78,7 +78,7 @@ void Foam::regionToFace::markZone
|
||||
const indirectPrimitivePatch& patch,
|
||||
const label proci,
|
||||
const label facei,
|
||||
const label zoneI,
|
||||
const label zonei,
|
||||
labelList& faceZone
|
||||
) const
|
||||
{
|
||||
@ -100,7 +100,7 @@ void Foam::regionToFace::markZone
|
||||
edgeTopoDistanceData<label>
|
||||
(
|
||||
0, // distance
|
||||
zoneI
|
||||
zonei
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -124,9 +124,13 @@ void Foam::regionToFace::markZone
|
||||
|
||||
forAll(allFaceInfo, facei)
|
||||
{
|
||||
if (allFaceInfo[facei].data() == zoneI)
|
||||
if
|
||||
(
|
||||
allFaceInfo[facei].valid(calc.data())
|
||||
&& allFaceInfo[facei].data() == zonei
|
||||
)
|
||||
{
|
||||
faceZone[facei] = zoneI;
|
||||
faceZone[facei] = zonei;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -157,7 +157,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
mapSrcToTgt(field, cop, result.primitiveFieldRef());
|
||||
mapTgtToSrc(field, cop, result.primitiveFieldRef());
|
||||
}
|
||||
|
||||
|
||||
@ -170,7 +170,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
mapSrcToTgt(field, cop, result.primitiveFieldRef());
|
||||
mapTgtToSrc(field, cop, result.primitiveFieldRef());
|
||||
}
|
||||
|
||||
|
||||
@ -183,7 +183,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
mapSrcToTgt(field, cop, result.primitiveFieldRef());
|
||||
mapTgtToSrc(field, cop, result.primitiveFieldRef());
|
||||
}
|
||||
|
||||
|
||||
@ -196,7 +196,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
mapSrcToTgt(field, cop, result.primitiveFieldRef());
|
||||
mapTgtToSrc(field, cop, result.primitiveFieldRef());
|
||||
}
|
||||
|
||||
|
||||
@ -209,7 +209,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
mapSrcToTgt(field, cop, result.primitiveFieldRef());
|
||||
mapTgtToSrc(field, cop, result.primitiveFieldRef());
|
||||
}
|
||||
|
||||
|
||||
@ -222,7 +222,7 @@ void Foam::meshToMesh::mapInternalTgtToSrc
|
||||
const bool secondOrder
|
||||
) const
|
||||
{
|
||||
mapSrcToTgt(field, cop, result.primitiveFieldRef());
|
||||
mapTgtToSrc(field, cop, result.primitiveFieldRef());
|
||||
}
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||
Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||
Copyright (C) 2018-2020 OpenCFD Ltd.
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
This file is part of OpenFOAM.
|
||||
@ -77,7 +77,7 @@ void Foam::solidProperties::readIfPresent(const dictionary& dict)
|
||||
dict.readIfPresent("rho", rho_);
|
||||
dict.readIfPresent("Cp", Cp_);
|
||||
dict.readIfPresentCompat("kappa", {{"K", 1612}}, kappa_);
|
||||
dict.readIfPresent("Hf_", Hf_);
|
||||
dict.readIfPresent("Hf", Hf_);
|
||||
dict.readIfPresent("emissivity", emissivity_);
|
||||
dict.readIfPresent("W", W_);
|
||||
}
|
||||
|
@ -37,6 +37,50 @@
|
||||
# PTSCOTCH_INC_DIR
|
||||
# PTSCOTCH_LIB_DIR
|
||||
#
|
||||
#
|
||||
# System files can be hiding in a large variety of locations.
|
||||
# For x86_64 system:
|
||||
#
|
||||
# ArchLinux
|
||||
# ---------
|
||||
# scotch include: /usr/include/scotch
|
||||
# scotch library: /usr/lib64
|
||||
#
|
||||
# ptscotch include: /usr/include/ptscotch
|
||||
# ptscotch library: /usr/lib64
|
||||
#
|
||||
#
|
||||
# Debian/Ubuntu
|
||||
# -------------
|
||||
# scotch include: /usr/include/scotch-int32
|
||||
# scotch library: /usr/lib/x86_64-linux-gnu
|
||||
#
|
||||
# ptscotch include: /usr/include/scotch-int32
|
||||
# ptscotch library: /usr/lib/x86_64-linux-gnu
|
||||
#
|
||||
#
|
||||
# RedHat
|
||||
# ------
|
||||
# scotch include: /usr/include
|
||||
# scotch library: /usr/lib64
|
||||
#
|
||||
# ptscotch include: /usr/include/openmpi-x86_64
|
||||
# ptscotch library: /usr/lib64/openmpi/lib
|
||||
#
|
||||
# when MPI_ARCH_PATH=/usr/lib64/openmpi
|
||||
# and mpicc --showme:compile -> -I/usr/include/openmpi-x86_64
|
||||
#
|
||||
#
|
||||
# openSUSE
|
||||
# --------
|
||||
# scotch include: /usr/include
|
||||
# scotch library: /usr/lib64
|
||||
#
|
||||
# ptscotch include: /usr/lib64/mpi/gcc/openmpi2/include
|
||||
# ptscotch library: /usr/lib64/mpi/gcc/openmpi2/lib64
|
||||
#
|
||||
# when MPI_ARCH_PATH=/usr/lib64/mpi/gcc/openmpi2
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/sysFunctions # General system functions
|
||||
|
||||
@ -192,6 +236,9 @@ search_ptscotch()
|
||||
local prefix="${1:-system}"
|
||||
local header library
|
||||
|
||||
local mpiPrefix="$MPI_ARCH_PATH"
|
||||
local mpiName="${MPI_ARCH_PATH##*/}"
|
||||
|
||||
# ----------------------------------
|
||||
if isNone "$prefix"
|
||||
then
|
||||
@ -204,7 +251,10 @@ search_ptscotch()
|
||||
"$prefix/include/$localDir/$incName" \
|
||||
"$prefix/include/ptscotch/$incName" \
|
||||
"$prefix/include/scotch/$incName" \
|
||||
"$prefix/include/$incName"
|
||||
"$prefix/include/$incName" \
|
||||
"$mpiPrefix/include/$incName" \
|
||||
"$prefix/include/$mpiName/$incName" \
|
||||
"$prefix/include/${mpiName}-$(uname -m)/$incName" \
|
||||
)
|
||||
library="$(findExtLib $FOAM_MPI/$libName $libName)"
|
||||
elif isSystem "$prefix"
|
||||
@ -218,6 +268,9 @@ search_ptscotch()
|
||||
"/usr/include/ptscotch/$incName" \
|
||||
"/usr/include/scotch/$incName" \
|
||||
"/usr/include/$incName" \
|
||||
"$mpiPrefix/include/$incName" \
|
||||
"/usr/include/$mpiName/$incName" \
|
||||
"$prefix/include/${mpiName}-$(uname -m)/$incName" \
|
||||
)
|
||||
prefix=$(sysPrefix "$header")
|
||||
else
|
||||
@ -235,6 +288,7 @@ search_ptscotch()
|
||||
# Library
|
||||
[ -n "$library" ] \
|
||||
|| library=$(findLibrary -prefix="$prefix" -name="$libName" -local="$localDir") \
|
||||
|| library=$(findLibrary -prefix="$mpiPrefix" -name="$libName" -local="$localDir") \
|
||||
|| {
|
||||
[ -n "$warn" ] && echo "$warn (no library)"
|
||||
return 2
|
||||
|
Loading…
Reference in New Issue
Block a user