Merge branch 'master' of ssh://noisy/home/noisy3/OpenFOAM/OpenFOAM-dev

This commit is contained in:
henry
2010-04-19 12:05:40 +01:00
277 changed files with 1742 additions and 700 deletions

View File

@ -1,25 +1,25 @@
XiModels/XiModel/XiModel.C
XiModels/XiModel/newXiModel.C
XiModels/XiModel/XiModelNew.C
XiModels/fixed/fixed.C
XiModels/algebraic/algebraic.C
XiModels/transport/transport.C
XiModels/XiEqModels/XiEqModel/XiEqModel.C
XiModels/XiEqModels/XiEqModel/newXiEqModel.C
XiModels/XiEqModels/XiEqModel/XiEqModelNew.C
XiModels/XiEqModels/Gulder/Gulder.C
XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C
XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C
XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C
XiModels/XiGModels/XiGModel/XiGModel.C
XiModels/XiGModels/XiGModel/newXiGModel.C
XiModels/XiGModels/XiGModel/XiGModelNew.C
XiModels/XiGModels/KTS/KTS.C
XiModels/XiGModels/instabilityG/instabilityG.C
PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C
PDRModels/dragModels/PDRDragModel/PDRDragModel.C
PDRModels/dragModels/PDRDragModel/newPDRDragModel.C
PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C
PDRModels/dragModels/basic/basic.C
PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C

View File

@ -1,5 +1,5 @@
combustionModel/combustionModel.C
combustionModel/newCombustionModel.C
combustionModel/combustionModelNew.C
infinitelyFastChemistry/infinitelyFastChemistry.C

View File

@ -1,6 +1,6 @@
interPhaseChangeFoam.C
phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C
phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C
phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C
phaseChangeTwoPhaseMixtures/Kunz/Kunz.C
phaseChangeTwoPhaseMixtures/Merkle/Merkle.C
phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C

View File

@ -28,7 +28,7 @@ Description
SourceFiles
phaseChangeTwoPhaseMixture.C
newPhaseChangeModel.C
phaseChangeModelNew.C
\*---------------------------------------------------------------------------*/

View File

@ -1,5 +1,5 @@
dragModels/dragModel/dragModel.C
dragModels/dragModel/newDragModel.C
dragModels/dragModel/dragModelNew.C
dragModels/Ergun/Ergun.C
dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C
dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C

View File

@ -28,7 +28,7 @@ Description
SourceFiles
dragModel.C
newDragModel.C
dragModelNew.C
\*---------------------------------------------------------------------------*/

View File

@ -1,32 +1,32 @@
kineticTheoryModel/kineticTheoryModel.C
viscosityModel/viscosityModel/viscosityModel.C
viscosityModel/viscosityModel/newViscosityModel.C
viscosityModel/viscosityModel/viscosityModelNew.C
viscosityModel/Gidaspow/GidaspowViscosity.C
viscosityModel/Syamlal/SyamlalViscosity.C
viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C
viscosityModel/none/noneViscosity.C
conductivityModel/conductivityModel/conductivityModel.C
conductivityModel/conductivityModel/newConductivityModel.C
conductivityModel/conductivityModel/conductivityModelNew.C
conductivityModel/Gidaspow/GidaspowConductivity.C
conductivityModel/Syamlal/SyamlalConductivity.C
conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C
radialModel/radialModel/radialModel.C
radialModel/radialModel/newRadialModel.C
radialModel/radialModel/radialModelNew.C
radialModel/CarnahanStarling/CarnahanStarlingRadial.C
radialModel/Gidaspow/GidaspowRadial.C
radialModel/LunSavage/LunSavageRadial.C
radialModel/SinclairJackson/SinclairJacksonRadial.C
granularPressureModel/granularPressureModel/granularPressureModel.C
granularPressureModel/granularPressureModel/newGranularPressureModel.C
granularPressureModel/granularPressureModel/granularPressureModelNew.C
granularPressureModel/Lun/LunPressure.C
granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C
frictionalStressModel/frictionalStressModel/frictionalStressModel.C
frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C
frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C
frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C
frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C

View File

@ -176,8 +176,7 @@ int main(int argc, char *argv[])
forAll(patchField, patchFaceI)
{
label meshFaceI =
patchField.patch().patch().start() + patchFaceI;
const label meshFaceI = patchField.patch().start() + patchFaceI;
scalar dist = faceInfo[meshFaceI].distSqr();
if (faceInfo[meshFaceI].valid())

View File

@ -47,8 +47,7 @@ void writeObj(Ostream& os,const pointField& points)
{
const point& pt = points[pointI];
os << "v " << pt.x() << ' ' << pt.y()
<< ' ' << pt.z() << endl;
os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl;
}
}

View File

@ -1,5 +1,5 @@
extrudeModel/extrudeModel.C
extrudeModel/newExtrudeModel.C
extrudeModel/extrudeModelNew.C
linearNormal/linearNormal.C
linearDirection/linearDirection.C
linearRadial/linearRadial.C

View File

@ -88,7 +88,7 @@ void writeWallFlags(Ostream& os, label cellI, const labelList& wallFlags)
os << "cell " << cellI << " wallsFlags:";
forAll(wallFlags, wallFaceI)
{
os << wallFlags[wallFaceI] << " ";
os << wallFlags[wallFaceI] << ' ';
}
os << endl;
}

View File

@ -508,9 +508,8 @@ void vtkPV3FoamReader::PrintSelf(ostream& os, vtkIndent indent)
foamData_->PrintSelf(os, indent);
os << indent << "Time step range: "
<< this->TimeStepRange[0] << " - " << this->TimeStepRange[1]
<< "\n";
os<< indent << "Time step: " << this->GetTimeStep() << endl;
<< this->TimeStepRange[0] << " - " << this->TimeStepRange[1] << "\n"
<< indent << "Time step: " << this->GetTimeStep() << endl;
}

View File

@ -1,5 +1,5 @@
tabulatedWallFunction/tabulatedWallFunction.C
tabulatedWallFunction/newTabulatedWallFunction.C
tabulatedWallFunction/tabulatedWallFunctionNew.C
SpaldingsLaw/SpaldingsLaw.C
general/general.C

View File

@ -2,9 +2,8 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
chmod a+rX $WM_PROJECT_DIR
chmod a+rX $WM_PROJECT_DIR/doc
chmod -R a+rX Doxygen
# fix permissions (NB: '+X' and not '+x'!)
chmod a+rX $WM_PROJECT_DIR $WM_PROJECT_DIR/doc Doxygen
Doxygen/Allwmake

View File

@ -2,11 +2,21 @@
cd ${0%/*} || exit 1 # run from this directory
set -x
rm -rf latex man
# remove html directory in background
mv html html-stagedRemove$$ 2> /dev/null
rm -rf html-stagedRemove$$ >/dev/null 2>&1 &
# ensure that created files are readable by everyone
umask 22
rm -rf html latex man
doxygen
# fix permissions (NB: '+X' and not '+x'!)
chmod -R a+rX ./
chmod -R a+rX html latex man 2>/dev/null
echo
echo "Done doxygen"
echo
# ----------------------------------------------------------------- end-of-file

View File

@ -14,7 +14,9 @@
<body>
<a id="openfoam"> </a>
<!-- Top banner -->
<table style="border-width: 0px; width: 800px; background: #ddddff;" cellspacing=0 cellpadding=0>
<table
style="border-width: 0px; width: 800px; background: #ddddff;"
cellspacing="0" cellpadding="0">
<tr>
<td style="width: 9px; height:54px"></td>
<td style="width: 250px; height:54px; vertical-align:middle;
@ -38,23 +40,23 @@ horizontal-align: left; ">
<td valign="top">
<table width="801" border="0" cellspacing="1" cellpadding="0" bgcolor="#ffffff">
<tr>
<td class=leftmenu>&nbsp;
<td class="leftmenu">&nbsp;
<a href="http://foam.sourceforge.net/doc/Doxygen/html"
class="menuLefton">Source Guide</a>
</td>
<td class=topmenu>
<td class="topmenu">
<a href="http://www.openfoam.com/about/"
class="menuTopoff">OpenCFD</a>
</td>
<td class=topmenu>
<td class="topmenu">
<a href="http://www.openfoam.com/features/"
class="menuTopoff">Features</a>
</td>
<td class=topmenu>
<td class="topmenu">
<a href="http://www.openfoam.com/contact/"
class="menuTopoff">Contact</a>
</td>
<td class=topmenu>
<td class="topmenu">
<a href="http://www.openfoam.com/"
class="menuTopoff">OpenFOAM</a>
</td>
@ -64,6 +66,8 @@ horizontal-align: left; ">
</td>
</tr>
</table>
<table style="border-width: 0px; width: 800px; background: #ffffff;" cellspacing=5 cellpadding=0>
<table
style="border-width: 0px; width: 800px; background: #ffffff;"
cellspacing="5" cellpadding="0">
<tr>
<td>

View File

@ -1,6 +1,6 @@
/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
DIV.tabs
div.tabs
{
float : left;
width : 100%;
@ -8,7 +8,7 @@ DIV.tabs
padding-bottom : 6px;
}
DIV.tabs UL
div.tabs ul
{
margin : 0px;
padding-left : 0px;
@ -16,20 +16,20 @@ DIV.tabs UL
list-style : none;
}
DIV.tabs LI, DIV.tabs FORM
div.tabs li, div.tabs form
{
display : inline;
margin : 0px;
padding : 0px;
}
DIV.tabs FORM
div.tabs form
{
float : left;
padding : 0px 9px;
}
DIV.tabs A
div.tabs a
{
float : left;
font-size : 12px;
@ -38,18 +38,17 @@ DIV.tabs A
border-right : 1px solid #000000;
}
DIV.tabs A:hover
div.tabs a:hover
{
background-position: 100% -150px;
}
DIV.tabs A:link, DIV.tabs A:visited,
DIV.tabs A:active, DIV.tabs A:hover
div.tabs a:link, div.tabs a:visited, div.tabs a:active, div.tabs a:hover
{
color : #000000;
}
DIV.tabs SPAN
div.tabs span
{
float : left;
display : block;
@ -57,42 +56,42 @@ DIV.tabs SPAN
white-space : nowrap;
}
DIV.tabs INPUT
div.tabs input
{
float : right;
display : inline;
font-size : 12px;
}
DIV.tabs TD
div.tabs td
{
font-size : 12px;
font-weight : bold;
text-decoration : none;
}
/* Commented Backslash Hack hides rule from IE5-Mac \*/
DIV.tabs SPAN {float : none;}
/* Commented backslash hack hides rule from IE5-Mac \*/
div.tabs span { float : none; }
/* End IE5-Mac hack */
DIV.tabs A:hover SPAN
div.tabs a:hover span
{
background-position: 0% -150px;
}
DIV.tabs LI#current A
div.tabs li#current a
{
border-width : 0px;
border-right : 1px solid #000000;
color : #0000ff;
}
DIV.tabs LI#current SPAN
div.tabs li#current span
{
padding-bottom : 0px;
}
DIV.nav
div.nav
{
background : none;
border : none;

View File

@ -1,48 +0,0 @@
#!/usr/bin/perl -w
use strict;
use File::Find ();
# -----------------------------------------------------------------------------
#
# Script
# find-its
#
# Description
# Search for *.[CH] files with "it's"
# This contraction (== "it is") looks too much like "its" (possesive)
# and confuses non-native (and some native) English speakers.
#
# - print filename and lineNumber
#
# -----------------------------------------------------------------------------
my $re_filespec = qr{^.+\.[CH]$};
# for the convenience of &wanted calls, including -eval statements:
## use vars qw( *name *dir *prune );
## *name = *File::Find::name;
## *dir = *File::Find::dir;
## *prune = *File::Find::prune;
sub wanted {
unless ( lstat($_) and -f _ and -r _ and not -l _ and /$re_filespec/ ) {
return;
}
local @ARGV = $_;
while (<>) {
if (m{it\'s}) {
print "$File::Find::name line=$.\n";
}
}
close ARGV;
}
## Traverse desired filesystems
for my $dir (@ARGV) {
no warnings 'File::Find';
warn "(**) checking '$dir' ...\n";
File::Find::find( { wanted => \&wanted }, $dir );
}

17
doc/tools/find-its Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
# -----------------------------------------------------------------------------
# Script
# find-its
#
# Description
# Search for files with "it's"
# This contraction (== "it is") looks too much like "its" (possesive)
# and confuses non-native (and some native) English speakers.
#
# -----------------------------------------------------------------------------
set -x
cd $WM_PROJECT_DIR || exit 1
git grep -e "it's"
#------------------------------------------------------------------ end-of-file

View File

@ -75,7 +75,7 @@ _foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_LIBBI
# Compiler settings
# ~~~~~~~~~~~~~~~~~
unset gcc_version gmp_version mpfr_version
unset gcc_version gmp_version mpfr_version mpc_version
unsetenv MPFR_ARCH_PATH
@ -92,25 +92,22 @@ case OpenFOAM:
set gmp_version=gmp-5.0.1
set mpfr_version=mpfr-2.4.2
breaksw
case Gcc442:
set gcc_version=gcc-4.4.2
set gmp_version=gmp-4.2.4
set mpfr_version=mpfr-2.4.1
case Gcc45:
set gcc_version=gcc-4.5.0
set gmp_version=gmp-5.0.1
set mpfr_version=mpfr-2.4.2
set mpc_version=mpc-2.4.2
breaksw
case Gcc44:
set gcc_version=gcc-4.4.2
set gmp_version=gmp-4.2.4
set mpfr_version=mpfr-2.4.1
set gcc_version=gcc-4.4.3
set gmp_version=gmp-5.0.1
set mpfr_version=mpfr-2.4.2
breaksw
case Gcc43:
set gcc_version=gcc-4.3.3
set gmp_version=gmp-4.2.4
set mpfr_version=mpfr-2.4.1
breaksw
default:
echo
echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
@ -118,13 +115,13 @@ case OpenFOAM:
echo " Please check your settings"
echo
breaksw
endsw
if ( $?gcc_version ) then
set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
set gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
set mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
set mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
# Check that the compiler directory can be found
if ( ! -d "$gccDir" ) then
@ -138,17 +135,30 @@ case OpenFOAM:
_foamAddMan $gccDir/man
_foamAddPath $gccDir/bin
_foamAddLib $gccDir/lib${WM_COMPILER_LIB_ARCH}:$gccDir/lib
# 64-bit needs lib64, but 32-bit needs lib (not lib32)
if ( "$WM_ARCH_OPTION" = 64 ) then
then
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
else
_foamAddLib $gccDir/lib
endif
# add in gmp/mpfr libraries
_foamAddLib $gmpDir/lib
_foamAddLib $mpfrDir/lib
# add in mpc libraries (not need for older gcc)
if ( $?mpc_version ) then
then
_foamAddLib $mpcDir/lib
endif
# used by boost/CGAL:
setenv MPFR_ARCH_PATH $mpfrDir
endif
unset gcc_version gccDir gmp_version gmpDir mpfr_version mpfrDir
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
breaksw
endsw

View File

@ -99,7 +99,8 @@ _foamAddLib $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_LIBBIN/dummy
# Compiler settings
# ~~~~~~~~~~~~~~~~~
unset gcc_version gmp_version mpfr_version MPFR_ARCH_PATH
unset gcc_version gmp_version mpfr_version mpc_version
unset MPFR_ARCH_PATH
# Select compiler installation
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -114,15 +115,16 @@ OpenFOAM)
gmp_version=gmp-5.0.1
mpfr_version=mpfr-2.4.2
;;
Gcc442)
gcc_version=gcc-4.4.2
gmp_version=gmp-4.2.4
mpfr_version=mpfr-2.4.1
Gcc45)
gcc_version=gcc-4.5.0
gmp_version=gmp-5.0.1
mpfr_version=mpfr-2.4.2
mpc_version=mpc-0.8.1
;;
Gcc44)
gcc_version=gcc-4.4.2
gmp_version=gmp-4.2.4
mpfr_version=mpfr-2.4.1
gcc_version=gcc-4.4.3
gmp_version=gmp-5.0.1
mpfr_version=mpfr-2.4.2
;;
Gcc43)
gcc_version=gcc-4.3.3
@ -143,6 +145,7 @@ OpenFOAM)
gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version
gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version
mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version
mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version
# Check that the compiler directory can be found
[ -d "$gccDir" ] || {
@ -156,22 +159,30 @@ OpenFOAM)
_foamAddMan $gccDir/man
_foamAddPath $gccDir/bin
_foamAddLib $gccDir/lib
# 64-bit needs lib64, but 32-bit needs lib (not lib32)
if [ "$WM_ARCH_OPTION" = 64 ]
then
_foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH
else
_foamAddLib $gccDir/lib
fi
# add in gmp/mpfr libraries
_foamAddLib $gmpDir/lib
_foamAddLib $mpfrDir/lib
# add in mpc libraries (not need for older gcc)
if [ -n "$mpc_version" ]
then
_foamAddLib $mpcDir/lib
fi
# used by boost/CGAL:
export MPFR_ARCH_PATH=$mpfrDir
fi
unset gcc_version gccDir gmp_version gmpDir mpfr_version mpfrDir
unset gcc_version gccDir
unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir
;;
esac

View File

@ -6,7 +6,7 @@ ODESolversRK = ODESolvers/RK
ODESolversSIBS = ODESolvers/SIBS
$(ODESolversODESolver)/ODESolver.C
$(ODESolversODESolver)/newODESolver.C
$(ODESolversODESolver)/ODESolverNew.C
$(ODESolversRK)/RK.C

View File

@ -131,7 +131,6 @@ void printSourceFileAndLine
else
{
string cwdLine(line.replaceAll(cwd() + '/', ""));
string homeLine(cwdLine.replaceAll(home(), '~'));
os << " at " << homeLine.c_str();

View File

@ -258,13 +258,13 @@ $(GAMG)/GAMGSolverSolve.C
GAMGInterfaces = $(GAMG)/interfaces
$(GAMGInterfaces)/GAMGInterface/GAMGInterface.C
$(GAMGInterfaces)/GAMGInterface/newGAMGInterface.C
$(GAMGInterfaces)/GAMGInterface/GAMGInterfaceNew.C
$(GAMGInterfaces)/processorGAMGInterface/processorGAMGInterface.C
$(GAMGInterfaces)/cyclicGAMGInterface/cyclicGAMGInterface.C
GAMGInterfaceFields = $(GAMG)/interfaceFields
$(GAMGInterfaceFields)/GAMGInterfaceField/GAMGInterfaceField.C
$(GAMGInterfaceFields)/GAMGInterfaceField/newGAMGInterfaceField.C
$(GAMGInterfaceFields)/GAMGInterfaceField/GAMGInterfaceFieldNew.C
$(GAMGInterfaceFields)/processorGAMGInterfaceField/processorGAMGInterfaceField.C
$(GAMGInterfaceFields)/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.C
@ -328,7 +328,7 @@ polyMesh = meshes/polyMesh
polyPatches = $(polyMesh)/polyPatches
$(polyPatches)/polyPatch/polyPatch.C
$(polyPatches)/polyPatch/newPolyPatch.C
$(polyPatches)/polyPatch/polyPatchNew.C
basicPolyPatches = $(polyPatches)/basic
$(basicPolyPatches)/coupled/coupledPolyPatch.C
@ -362,15 +362,15 @@ $(zone)/zone.C
cellZone = $(polyMesh)/zones/cellZone
$(cellZone)/cellZone.C
$(cellZone)/newCellZone.C
$(cellZone)/cellZoneNew.C
faceZone = $(polyMesh)/zones/faceZone
$(faceZone)/faceZone.C
$(faceZone)/newFaceZone.C
$(faceZone)/faceZoneNew.C
pointZone = $(polyMesh)/zones/pointZone
$(pointZone)/pointZone.C
$(pointZone)/newPointZone.C
$(pointZone)/pointZoneNew.C
$(polyMesh)/polyMesh.C
$(polyMesh)/polyMeshFromShapeMesh.C
@ -438,7 +438,7 @@ $(pointMeshMapper)/pointPatchMapper.C
pointPatches = $(pointMesh)/pointPatches
$(pointPatches)/pointPatch/pointPatch.C
$(pointPatches)/facePointPatch/facePointPatch.C
$(pointPatches)/facePointPatch/newFacePointPatch.C
$(pointPatches)/facePointPatch/facePointPatchNew.C
basicPointPatches = $(pointPatches)/basic
$(basicPointPatches)/coupled/coupledPointPatch.C

View File

@ -61,9 +61,9 @@ Foam::IOstream::compressionType
Foam::IOstream::compressionEnum(const word& compression)
{
// get Switch (bool) value, but allow it to fail
Switch::switchType sw = Switch::asEnum(compression, true);
Switch sw(compression, true);
if (sw != Switch::INVALID)
if (sw.valid())
{
return sw ? IOstream::COMPRESSED : IOstream::UNCOMPRESSED;
}

View File

@ -346,6 +346,6 @@ Ostream& operator<<
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
#include "newPointPatchField.C"
#include "pointPatchFieldNew.C"
// ************************************************************************* //

View File

@ -41,7 +41,7 @@ License
OpenFOAM comes with full commercial support from OpenCFD, including
<a href="http://www.openfoam.com/support/software.php">software support</a>,
<a href="http://www.openfoam.com/support/development.php">contracted developments</a>
and a programme of <a href="http://www.openfoam.com/training">training courses</a>.
and a programme of <a href="http://www.openfoam.com/training/">training courses</a>.
These activities fund the development, maintenance and release of
OpenFOAM to make it an extremely viable commercial open source product.

View File

@ -577,6 +577,40 @@ Foam::polyMesh::polyMesh
<< "Found " << nFaces - defaultPatchStart
<< " undefined faces in mesh; adding to default patch." << endl;
// Check if there already exists a defaultFaces patch as last patch
// and reuse it.
label patchI = findIndex(boundaryPatchNames, defaultBoundaryPatchName);
if (patchI != -1)
{
if (patchI != boundaryFaces.size()-1 || boundary_[patchI].size())
{
FatalErrorIn("polyMesh::polyMesh(... construct from shapes...)")
<< "Default patch " << boundary_[patchI].name()
<< " already has faces in it or is not"
<< " last in list of patches." << exit(FatalError);
}
WarningIn("polyMesh::polyMesh(... construct from shapes...)")
<< "Reusing existing patch " << patchI
<< " for undefined faces." << endl;
boundary_.set
(
patchI,
polyPatch::New
(
boundaryPatchTypes[patchI],
boundaryPatchNames[patchI],
nFaces - defaultPatchStart,
defaultPatchStart,
patchI,
boundary_
)
);
}
else
{
boundary_.set
(
nAllPatches,
@ -593,6 +627,7 @@ Foam::polyMesh::polyMesh
nAllPatches++;
}
}
// Reset the size of the boundary
boundary_.setSize(nAllPatches);

View File

@ -32,7 +32,7 @@ Description
SourceFiles
polyPatch.C
newPolyPatch.C
polyPatchNew.C
\*---------------------------------------------------------------------------*/

View File

@ -34,7 +34,7 @@ Description
SourceFiles
cellZone.C
newCellZone.C
cellZoneNew.C
\*---------------------------------------------------------------------------*/

View File

@ -33,7 +33,7 @@ Description
SourceFiles
faceZone.C
newFaceZone.C
faceZoneNew.C
\*---------------------------------------------------------------------------*/

View File

@ -35,7 +35,7 @@ Description
SourceFiles
pointZone.C
newPointZone.C
pointZoneNew.C
\*---------------------------------------------------------------------------*/

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -44,23 +44,17 @@ const char* Foam::Switch::names[Foam::Switch::INVALID+1] =
// * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * //
Foam::Switch::switchType Foam::Switch::asEnum(const bool b)
{
return b ? Switch::TRUE : Switch::FALSE;
}
Foam::Switch::switchType Foam::Switch::asEnum
(
const std::string& str,
const bool allowInvalid
)
{
for (int sw = 0; sw < Switch::INVALID; sw++)
for (int sw = 0; sw < Switch::INVALID; ++sw)
{
if (str == names[sw])
{
// convert n/y to no/yes (perhaps should deprecate y/n)
// convert n/y to no/yes - perhaps should deprecate y/n
if (sw == Switch::NO_1 || sw == Switch::NONE)
{
return Switch::NO;
@ -78,57 +72,12 @@ Foam::Switch::switchType Foam::Switch::asEnum
if (!allowInvalid)
{
FatalErrorIn("Switch::asEnum(const std::string&)")
FatalErrorIn("Switch::asEnum(const std::string&, const bool)")
<< "unknown switch word " << str << nl
<< abort(FatalError);
}
return INVALID;
}
bool Foam::Switch::asBool(const switchType sw)
{
// relies on (INVALID & 0x1) evaluating to false
return (sw & 0x1);
}
bool Foam::Switch::asBool
(
const std::string& str,
const bool allowInvalid
)
{
// allow invalid values, but catch after for correct error message
switchType sw = asEnum(str, true);
if (sw == Switch::INVALID)
{
if (!allowInvalid)
{
FatalErrorIn("Switch::asBool(const std::string&)")
<< "unknown switch word " << str << nl
<< abort(FatalError);
}
return false;
}
return (sw & 0x1);
}
const char* Foam::Switch::asText(const bool b)
{
return b ? names[Switch::TRUE] : names[Switch::FALSE];
}
const char* Foam::Switch::asText(const switchType sw)
{
return names[sw];
return Switch::INVALID;
}
@ -145,6 +94,18 @@ Foam::Switch Foam::Switch::lookupOrAddToDict
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * //
bool Foam::Switch::valid() const
{
return switch_ <= Switch::NONE;
}
const char* Foam::Switch::asText() const
{
return names[switch_];
}
bool Foam::Switch::readIfPresent(const word& name, const dictionary& dict)
{
return dict.readIfPresent<Switch>(name, *this);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,11 +48,11 @@ namespace Foam
// Forward declaration of friend functions and operators
class Switch;
class dictionary;
Istream& operator>>(Istream&, Switch&);
Ostream& operator<<(Ostream&, const Switch&);
class dictionary;
/*---------------------------------------------------------------------------*\
Class Switch Declaration
@ -60,8 +60,6 @@ class dictionary;
class Switch
{
private:
// Private data
//- The logic and enumerated text representation stored as a single byte
@ -71,8 +69,7 @@ public:
// Public data types
//- The various text representations for a switch value.
// These also correspond to the entries in names.
// avoid issues with pre-processor defines
#undef FALSE
#undef TRUE
#undef OFF
@ -84,6 +81,9 @@ public:
#undef NONE
#undef PLACEHOLDER
#undef INVALID
//- The various text representations for a switch value.
// These also correspond to the entries in names.
enum switchType
{
FALSE = 0, TRUE = 1,
@ -94,7 +94,6 @@ public:
INVALID
};
// Static data members
//- The set of names corresponding to the switchType enumeration
@ -102,36 +101,15 @@ public:
static const char* names[INVALID+1];
private:
// Static Member Functions
//- Return a switchType representation of a bool
static switchType asEnum(const bool);
//- Return a switchType representation of a word
// Optionally allow bad words, and catch the error elsewhere
static switchType asEnum
(
const std::string&,
const bool allowInvalid=false
);
static switchType asEnum(const std::string&, const bool allowInvalid);
//- Return a bool representation of a switchType
static bool asBool(const switchType);
//- Return a bool representation of a word
// Optionally allow bad words, and catch the error elsewhere
static bool asBool
(
const std::string&,
const bool allowInvalid=false
);
//- Return a text representation of a bool value
static const char* asText(const bool);
//- Return a text representation of a switchType
static const char* asText(const switchType);
public:
// Constructors
@ -141,28 +119,36 @@ public:
switch_(Switch::FALSE)
{}
//- Construct from bool
Switch(const bool value)
//- Construct from enumerated value
Switch(const switchType sw)
:
switch_(asEnum(value))
switch_(sw)
{}
//- Construct from bool
Switch(const bool b)
:
switch_(b ? Switch::TRUE : Switch::FALSE)
{}
//- Construct from integer values (treats integer as bool value)
Switch(const int value)
Switch(const int i)
:
switch_(asEnum(bool(value)))
switch_(i ? Switch::TRUE : Switch::FALSE)
{}
//- Construct from std::string, string, word
Switch(const std::string& value)
// Optionally allow bad words, and catch the error elsewhere
Switch(const std::string& str, const bool allowInvalid=false)
:
switch_(asEnum(value))
switch_(asEnum(str, allowInvalid))
{}
//- Construct from character array
Switch(const char* value)
// Optionally allow bad words, and catch the error elsewhere
Switch(const char* str, const bool allowInvalid=false)
:
switch_(asEnum(std::string(value)))
switch_(asEnum(std::string(str), allowInvalid))
{}
//- Construct from Istream
@ -178,6 +164,18 @@ public:
);
// Member Functions
//- Return true if the Switch has a valid value
bool valid() const;
//- Return a text representation of the Switch
const char* asText() const;
//- Update the value of the Switch if it is found in the dictionary
bool readIfPresent(const word&, const dictionary&);
// Member Operators
//- Conversion to bool
@ -186,6 +184,13 @@ public:
return (switch_ & 0x1);
}
//- Assignment from enumerated value
const Switch& operator=(const switchType sw)
{
switch_ = sw;
return *this;
}
//- Assignment from bool
const Switch& operator=(const bool b)
{
@ -194,12 +199,6 @@ public:
}
// Member fuctions
//- Update the value of the Switch if it is found in the dictionary
bool readIfPresent(const word&, const dictionary&);
// IOstream Operators
friend Istream& operator>>(Istream&, Switch&);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -48,26 +48,26 @@ Foam::Istream& Foam::operator>>(Istream& is, Switch& s)
if (t.isLabel())
{
s.switch_ = Switch::asEnum(bool(t.labelToken()));
s = bool(t.labelToken());
}
else if (t.isWord())
{
// allow invalid values, but catch after for correct error message
Switch::switchType sw = Switch::asEnum(t.wordToken(), true);
Switch sw(t.wordToken(), true);
if (sw == Switch::INVALID)
if (sw.valid())
{
s = sw;
}
else
{
is.setBad();
FatalIOErrorIn("operator>>(Istream&, Switch&)", is)
FatalIOErrorIn("operator>>(Istream&, bool/Switch&)", is)
<< "expected 'true/false', 'on/off' ... found " << t.wordToken()
<< exit(FatalIOError);
return is;
}
else
{
s.switch_ = sw;
}
}
else
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,7 +50,7 @@ Foam::Istream& Foam::operator>>(Istream& is, bool& b)
Foam::Ostream& Foam::operator<<(Ostream& os, const bool b)
{
// we could also write as text string without any difficulty
// os << Switch::asText(b);
// os << (b ? "true" : "false");
os.write(label(b));
os.check("Ostream& operator<<(Ostream&, const bool)");
return os;
@ -59,10 +59,10 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const bool b)
bool Foam::readBool(Istream& is)
{
bool val;
is >> val;
bool b;
is >> b;
return val;
return b;
}

View File

@ -1,5 +1,5 @@
dynamicFvMesh/dynamicFvMesh.C
dynamicFvMesh/newDynamicFvMesh.C
dynamicFvMesh/dynamicFvMeshNew.C
staticFvMesh/staticFvMesh.C
dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C
dynamicInkJetFvMesh/dynamicInkJetFvMesh.C
@ -8,7 +8,7 @@ dynamicRefineFvMesh/dynamicRefineFvMesh.C
solidBodyMotionFvMesh/solidBodyMotionFvMesh.C
solidBodyMotionFunctions = solidBodyMotionFvMesh/solidBodyMotionFunctions
$(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunction.C
$(solidBodyMotionFunctions)/solidBodyMotionFunction/newSolidBodyMotionFunction.C
$(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunctionNew.C
$(solidBodyMotionFunctions)/SDA/SDA.C
$(solidBodyMotionFunctions)/tabulated6DoFMotion/tabulated6DoFMotion.C
$(solidBodyMotionFunctions)/linearMotion/linearMotion.C

View File

@ -29,7 +29,7 @@ Description
SourceFiles
dynamicFvMesh.C
newDynamicFvMesh.C
dynamicFvMeshNew.C
\*---------------------------------------------------------------------------*/

View File

@ -332,7 +332,7 @@ Foam::dynamicRefineFvMesh::refine
const fvsPatchScalarField& patchPhiU =
phiU.boundaryField()[patchI];
label faceI = patchPhi.patch().patch().start();
label faceI = patchPhi.patch().start();
forAll(patchPhi, i)
{

View File

@ -36,7 +36,7 @@ Description
SourceFiles
solidBodyMotionFunction.C
newDynamicFvMesh.C
dynamicFvMeshNew.C
\*---------------------------------------------------------------------------*/

View File

@ -19,7 +19,7 @@ $(enrichedPatch)/enrichedPatchMasterPoints.C
polyMeshModifier = polyTopoChange/polyMeshModifier
$(polyMeshModifier)/polyMeshModifier.C
$(polyMeshModifier)/newPolyMeshModifier.C
$(polyMeshModifier)/polyMeshModifierNew.C
polyTopoChange/polyTopoChange/topoAction/topoActions.C
polyTopoChange/polyTopoChanger/polyTopoChanger.C

View File

@ -186,7 +186,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields
forAll(bfld, patchI)
{
fvsPatchField<T>& patchFld = bfld[patchI];
label faceI = patchFld.patch().patch().start();
label faceI = patchFld.patch().start();
forAll(patchFld, i)
{

View File

@ -8,7 +8,7 @@ engineValve/engineValve.C
enginePiston/enginePiston.C
engineMesh/engineMesh/engineMesh.C
engineMesh/engineMesh/newEngineMesh.C
engineMesh/engineMesh/engineMeshNew.C
engineMesh/staticEngineMesh/staticEngineMesh.C
engineMesh/layeredEngineMesh/layeredEngineMesh.C
engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C

View File

@ -9,7 +9,7 @@ $(fvBoundaryMesh)/fvBoundaryMesh.C
fvPatches = fvMesh/fvPatches
$(fvPatches)/fvPatch/fvPatch.C
$(fvPatches)/fvPatch/newFvPatch.C
$(fvPatches)/fvPatch/fvPatchNew.C
basicFvPatches = $(fvPatches)/basic
$(basicFvPatches)/coupled/coupledFvPatch.C
@ -334,7 +334,7 @@ $(MRF)/MRFZones.C
SRF = $(general)/SRF
$(SRF)/SRFModel/SRFModel/SRFModel.C
$(SRF)/SRFModel/SRFModel/newSRFModel.C
$(SRF)/SRFModel/SRFModel/SRFModelNew.C
$(SRF)/SRFModel/rpm/rpm.C
$(SRF)/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C

View File

@ -231,7 +231,7 @@ void Foam::activeBaffleVelocityFvPatchVectorField::updateCoeffs()
Info<< "openFraction = " << openFraction_ << endl;
vectorField::subField Sfw = patch().patch().faceAreas();
vectorField::subField Sfw = this->patch().patch().faceAreas();
vectorField newSfw = (1 - openFraction_)*initWallSf_;
forAll(Sfw, facei)
{

View File

@ -249,7 +249,7 @@ void directMappedFixedValueFvPatchField<Type>::updateCoeffs()
{
const fvPatchField<Type>& pf =
nbrField.boundaryField()[patchI];
label faceStart = pf.patch().patch().start();
label faceStart = pf.patch().start();
forAll(pf, faceI)
{

View File

@ -116,7 +116,7 @@ directMappedVelocityFluxFixedValueFvPatchField
// Force calculation of schedule (uses parallel comms)
const directMappedPolyPatch& mpp = refCast<const directMappedPolyPatch>
(
patch().patch()
this->patch().patch()
);
(void)mpp.map().schedule();
}
@ -187,7 +187,7 @@ void directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs()
const fvPatchVectorField& Upf = UField.boundaryField()[patchI];
const scalarField& phipf = phiField.boundaryField()[patchI];
label faceStart = Upf.patch().patch().start();
label faceStart = Upf.patch().start();
forAll(Upf, faceI)
{

View File

@ -479,6 +479,6 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const fvPatchField<Type>& ptf)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
# include "newFvPatchField.C"
# include "fvPatchFieldNew.C"
// ************************************************************************* //

View File

@ -37,7 +37,7 @@ Description
SourceFiles
fvPatchField.C
newFvPatchField.C
fvPatchFieldNew.C
\*---------------------------------------------------------------------------*/

View File

@ -403,6 +403,6 @@ Ostream& operator<<(Ostream& os, const fvsPatchField<Type>& ptf)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
# include "newFvsPatchField.C"
# include "fvsPatchFieldNew.C"
// ************************************************************************* //

View File

@ -37,7 +37,7 @@ Description
SourceFiles
fvsPatchField.C
newFvsPatchField.C
fvsPatchFieldNew.C
\*---------------------------------------------------------------------------*/

View File

@ -139,7 +139,7 @@ Foam::extendedCellToFaceStencil::weightedSum
if (pSfCorr.coupled())
{
label faceI = pSfCorr.patch().patch().start();
label faceI = pSfCorr.patch().start();
forAll(pSfCorr, i)
{

View File

@ -106,7 +106,7 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum
if (pSfCorr.coupled())
{
label faceI = pSfCorr.patch().patch().start();
label faceI = pSfCorr.patch().start();
forAll(pSfCorr, i)
{

View File

@ -73,14 +73,14 @@ tmp<GeometricField<Type, fvPatchField, volMesh> > fvMeshSubset::interpolate
// Construct addressing
const fvPatch& subPatch = sMesh.boundary()[patchI];
const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]];
label baseStart = basePatch.patch().start();
label baseSize = basePatch.size();
const label baseStart = basePatch.start();
const label baseSize = basePatch.size();
labelList directAddressing(subPatch.size());
forAll(directAddressing, i)
{
label baseFaceI = faceMap[subPatch.patch().start()+i];
label baseFaceI = faceMap[subPatch.start()+i];
if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize)
{
@ -197,14 +197,14 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
// Construct addressing
const fvPatch& subPatch = sMesh.boundary()[patchI];
const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]];
label baseStart = basePatch.patch().start();
label baseSize = basePatch.size();
const label baseStart = basePatch.start();
const label baseSize = basePatch.size();
labelList directAddressing(subPatch.size());
forAll(directAddressing, i)
{
label baseFaceI = faceMap[subPatch.patch().start()+i];
label baseFaceI = faceMap[subPatch.start()+i];
if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize)
{
@ -239,7 +239,7 @@ tmp<GeometricField<Type, fvsPatchField, surfaceMesh> > fvMeshSubset::interpolate
{
fvsPatchField<Type>& pfld = patchFields[patchI];
label meshFaceI = pfld.patch().patch().start();
label meshFaceI = pfld.patch().start();
forAll(pfld, i)
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -31,21 +31,18 @@ License
#include "volFields.H"
#include "surfaceFields.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
defineTypeNameAndDebug(fvPatch, 0);
defineRunTimeSelectionTable(fvPatch, polyPatch);
addToRunTimeSelectionTable(fvPatch, fvPatch, polyPatch);
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
fvPatch::fvPatch(const polyPatch& p, const fvBoundaryMesh& bm)
Foam::fvPatch::fvPatch(const polyPatch& p, const fvBoundaryMesh& bm)
:
polyPatch_(p),
boundaryMesh_(bm)
@ -54,19 +51,19 @@ fvPatch::fvPatch(const polyPatch& p, const fvBoundaryMesh& bm)
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
fvPatch::~fvPatch()
Foam::fvPatch::~fvPatch()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool fvPatch::constraintType(const word& pt)
bool Foam::fvPatch::constraintType(const word& pt)
{
return fvPatchField<scalar>::patchConstructorTablePtr_->found(pt);
}
wordList fvPatch::constraintTypes()
Foam::wordList Foam::fvPatch::constraintTypes()
{
wordList cTypes(polyPatchConstructorTablePtr_->size());
@ -92,19 +89,19 @@ wordList fvPatch::constraintTypes()
}
const unallocLabelList& fvPatch::faceCells() const
const Foam::unallocLabelList& Foam::fvPatch::faceCells() const
{
return polyPatch_.faceCells();
}
const vectorField& fvPatch::Cf() const
const Foam::vectorField& Foam::fvPatch::Cf() const
{
return boundaryMesh().mesh().Cf().boundaryField()[index()];
}
tmp<vectorField> fvPatch::Cn() const
Foam::tmp<Foam::vectorField> Foam::fvPatch::Cn() const
{
tmp<vectorField> tcc(new vectorField(size()));
vectorField& cc = tcc();
@ -123,64 +120,60 @@ tmp<vectorField> fvPatch::Cn() const
}
tmp<vectorField> fvPatch::nf() const
Foam::tmp<Foam::vectorField> Foam::fvPatch::nf() const
{
return Sf()/magSf();
}
const vectorField& fvPatch::Sf() const
const Foam::vectorField& Foam::fvPatch::Sf() const
{
return boundaryMesh().mesh().Sf().boundaryField()[index()];
}
const scalarField& fvPatch::magSf() const
const Foam::scalarField& Foam::fvPatch::magSf() const
{
return boundaryMesh().mesh().magSf().boundaryField()[index()];
}
tmp<vectorField> fvPatch::delta() const
Foam::tmp<Foam::vectorField> Foam::fvPatch::delta() const
{
return Cf() - Cn();
}
void fvPatch::makeWeights(scalarField& w) const
void Foam::fvPatch::makeWeights(scalarField& w) const
{
w = 1.0;
}
void fvPatch::makeDeltaCoeffs(scalarField& dc) const
void Foam::fvPatch::makeDeltaCoeffs(scalarField& dc) const
{
dc = 1.0/(nf() & delta());
}
void fvPatch::initMovePoints()
void Foam::fvPatch::initMovePoints()
{}
void fvPatch::movePoints()
void Foam::fvPatch::movePoints()
{}
const scalarField& fvPatch::deltaCoeffs() const
const Foam::scalarField& Foam::fvPatch::deltaCoeffs() const
{
return boundaryMesh().mesh().deltaCoeffs().boundaryField()[index()];
}
const scalarField& fvPatch::weights() const
const Foam::scalarField& Foam::fvPatch::weights() const
{
return boundaryMesh().mesh().weights().boundaryField()[index()];
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// ************************************************************************* //

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -25,11 +25,11 @@ Class
Foam::fvPatch
Description
Foam::fvPatch
A finiteVolume patch using a polyPatch and a fvBoundaryMesh
SourceFiles
fvPatch.C
newFvPatch.C
fvPatchNew.C
\*---------------------------------------------------------------------------*/
@ -121,14 +121,18 @@ public:
// Constructors
//- Construct from polyPatch
//- Construct from polyPatch and fvBoundaryMesh
fvPatch(const polyPatch&, const fvBoundaryMesh&);
// Selectors
//- Return a pointer to a new patch created on freestore from polyPatch
static autoPtr<fvPatch> New(const polyPatch&, const fvBoundaryMesh&);
static autoPtr<fvPatch> New
(
const polyPatch&,
const fvBoundaryMesh&
);
//- Destructor
@ -151,6 +155,12 @@ public:
return polyPatch_.name();
}
//- Return start label of this patch in the polyMesh face list
label start() const
{
return polyPatch_.start();
}
//- Return size
virtual label size() const
{
@ -185,7 +195,7 @@ public:
template<class T>
const typename List<T>::subList patchSlice(const List<T>& l) const
{
return typename List<T>::subList(l, size(), polyPatch_.start());
return typename List<T>::subList(l, size(), start());
}
//- Return faceCells

View File

@ -56,6 +56,6 @@ interpolation<Type>::interpolation
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
# include "newInterpolation.C"
# include "interpolationNew.C"
// ************************************************************************* //

View File

@ -103,7 +103,7 @@ void Foam::CentredFitData<Polynomial>::calcFit()
if (pw.coupled())
{
label facei = pw.patch().patch().start();
label facei = pw.patch().start();
forAll(pw, i)
{

View File

@ -121,7 +121,7 @@ void Foam::UpwindFitData<Polynomial>::calcFit()
if (pw.coupled())
{
label facei = pw.patch().patch().start();
label facei = pw.patch().start();
forAll(pw, i)
{
@ -180,7 +180,7 @@ void Foam::UpwindFitData<Polynomial>::calcFit()
if (pw.coupled())
{
label facei = pw.patch().patch().start();
label facei = pw.patch().start();
forAll(pw, i)
{

Some files were not shown because too many files have changed in this diff Show More