Project update
This commit is contained in:
parent
7aa5ad96b3
commit
d280b12a93
400 changed files with 1732 additions and 26992 deletions
3
ThirdParty/AllMake.stage4
vendored
3
ThirdParty/AllMake.stage4
vendored
|
@ -68,9 +68,6 @@ fi
|
||||||
# Paraview
|
# Paraview
|
||||||
if [ -z "$PARAVIEW_SYSTEM" ]
|
if [ -z "$PARAVIEW_SYSTEM" ]
|
||||||
then
|
then
|
||||||
# Make sure we get the value of QT_BIN_DIR initialized
|
|
||||||
. $WM_PROJECT_DIR/etc/settings.sh
|
|
||||||
|
|
||||||
if [ -d "$QT_BIN_DIR" -a -r "$QT_BIN_DIR"/qmake ]
|
if [ -d "$QT_BIN_DIR" -a -r "$QT_BIN_DIR"/qmake ]
|
||||||
then
|
then
|
||||||
( rpm_make -p ParaView-3.12.0 -s ParaView-3.12.0.spec -u http://www.paraview.org/files/v3.12/ParaView-3.12.0.tar.gz \
|
( rpm_make -p ParaView-3.12.0 -s ParaView-3.12.0.spec -u http://www.paraview.org/files/v3.12/ParaView-3.12.0.tar.gz \
|
||||||
|
|
0
ThirdParty/rpmBuild/BUILD/.emptyFileForGit
vendored
0
ThirdParty/rpmBuild/BUILD/.emptyFileForGit
vendored
0
ThirdParty/rpmBuild/RPMS/.emptyFileForGit
vendored
0
ThirdParty/rpmBuild/RPMS/.emptyFileForGit
vendored
|
@ -153,7 +153,7 @@ Patch0: ParaView-3.12.0.patch_darwin
|
||||||
addCMakeVariable PARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON
|
addCMakeVariable PARAVIEW_INSTALL_DEVELOPMENT:BOOL=ON
|
||||||
|
|
||||||
# new alternative to "make HTMLDocumentation"
|
# new alternative to "make HTMLDocumentation"
|
||||||
addCMakeVariable PARAVIEW_GENERATE_PROXY_DOCUMENTATION:BOOL=ON
|
addCMakeVariable PARAVIEW_GENERATE_PROXY_DOCUMENTATION:BOOL=OFF
|
||||||
|
|
||||||
%ifos darwin
|
%ifos darwin
|
||||||
# Additional installation rules for Mac OS X
|
# Additional installation rules for Mac OS X
|
||||||
|
@ -206,7 +206,7 @@ cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
|
||||||
export PARAVIEW_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
export PARAVIEW_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
export PARAVIEW_BIN_DIR=\$PARAVIEW_DIR/bin
|
export PARAVIEW_BIN_DIR=\$PARAVIEW_DIR/bin
|
||||||
export PARAVIEW_LIB_DIR=\$PARAVIEW_DIR/lib
|
export PARAVIEW_LIB_DIR=\$PARAVIEW_DIR/lib
|
||||||
export PARAVIEW_INCLUDE_DIR=\$PARAVIEW_DIR/include
|
export PARAVIEW_INCLUDE_DIR=\$PARAVIEW_DIR/include/paraview-3.12
|
||||||
|
|
||||||
export PARAVIEW_VERSION=%{version}
|
export PARAVIEW_VERSION=%{version}
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.cs
|
||||||
setenv PARAVIEW_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
setenv PARAVIEW_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/\$WM_OPTIONS
|
||||||
setenv PARAVIEW_BIN_DIR \$PARAVIEW_DIR/bin
|
setenv PARAVIEW_BIN_DIR \$PARAVIEW_DIR/bin
|
||||||
setenv PARAVIEW_LIB_DIR \$PARAVIEW_DIR/lib
|
setenv PARAVIEW_LIB_DIR \$PARAVIEW_DIR/lib
|
||||||
setenv PARAVIEW_INCLUDE_DIR \$PARAVIEW_DIR/include
|
setenv PARAVIEW_INCLUDE_DIR \$PARAVIEW_DIR/include/paraview-3.12
|
||||||
|
|
||||||
setenv PARAVIEW_VERSION %{version}
|
setenv PARAVIEW_VERSION %{version}
|
||||||
|
|
||||||
|
|
12
ThirdParty/rpmBuild/SPECS/PyFoam-0.5.6.spec
vendored
12
ThirdParty/rpmBuild/SPECS/PyFoam-0.5.6.spec
vendored
|
@ -110,7 +110,7 @@ cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
export PYFOAM_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
export PYFOAM_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
||||||
export PYTHONPATH=\$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages:\$PYTHONPATH
|
export PYTHONPATH=\$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages
|
||||||
|
|
||||||
# Enable access to the package applications if present
|
# Enable access to the package applications if present
|
||||||
[ -d \$PYFOAM_DIR/bin ] && _foamAddPath \$PYFOAM_DIR/bin
|
[ -d \$PYFOAM_DIR/bin ] && _foamAddPath \$PYFOAM_DIR/bin
|
||||||
|
@ -125,16 +125,12 @@ cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.cs
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
setenv PYFOAM_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
setenv PYFOAM_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
||||||
|
|
||||||
setenv PYTHONPATH \$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages:\$PYTHONPATH
|
setenv PYTHONPATH \$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages
|
||||||
|
|
||||||
if ( -e \$PYFOAM_DIR/bin ) then
|
if ( -e \$PYFOAM_DIR/bin ) then
|
||||||
_foamAddPath \$PYFOAM_DIR/bin
|
_foamAddPath \$PYFOAM_DIR/bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ( -e \$PYFOAM_SITE_DIR/bin ) then
|
|
||||||
_foamAddPath \$PYFOAM_SITE_DIR/bin
|
|
||||||
endif
|
|
||||||
|
|
||||||
DOT_CSH_EOF
|
DOT_CSH_EOF
|
||||||
|
|
||||||
cat << DOT_HARDCODED_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}_hardcoded.sh
|
cat << DOT_HARDCODED_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}_hardcoded.sh
|
||||||
|
@ -146,7 +142,7 @@ cat << DOT_HARDCODED_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{ve
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
export PYFOAM_DIR=$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
export PYFOAM_DIR=$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
||||||
export PYTHONPATH=\$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages:\$PYTHONPATH
|
export PYTHONPATH=\$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages
|
||||||
|
|
||||||
# Enable access to the package applications if present
|
# Enable access to the package applications if present
|
||||||
[ -d \$PYFOAM_DIR/bin ] && export PATH=\$PYFOAM_DIR/bin:\$PATH
|
[ -d \$PYFOAM_DIR/bin ] && export PATH=\$PYFOAM_DIR/bin:\$PATH
|
||||||
|
@ -165,7 +161,7 @@ cat << DOT_HARDCODED_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{v
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
setenv PYFOAM_DIR $WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
setenv PYFOAM_DIR $WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
||||||
|
|
||||||
setenv PYTHONPATH \$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages:\$PYTHONPATH
|
setenv PYTHONPATH \$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages
|
||||||
|
|
||||||
if ( -e \$PYFOAM_DIR/bin ) then
|
if ( -e \$PYFOAM_DIR/bin ) then
|
||||||
setenv PATH \$PYFOAM_DIR/bin:\$PATH
|
setenv PATH \$PYFOAM_DIR/bin:\$PATH
|
||||||
|
|
12
ThirdParty/rpmBuild/SPECS/PyFoam-0.5.7.spec
vendored
12
ThirdParty/rpmBuild/SPECS/PyFoam-0.5.7.spec
vendored
|
@ -110,7 +110,7 @@ cat << DOT_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.sh
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
export PYFOAM_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
export PYFOAM_DIR=\$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
||||||
export PYTHONPATH=\$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages:\$PYTHONPATH
|
export PYTHONPATH=\$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages
|
||||||
|
|
||||||
# Enable access to the package applications if present
|
# Enable access to the package applications if present
|
||||||
[ -d \$PYFOAM_DIR/bin ] && _foamAddPath \$PYFOAM_DIR/bin
|
[ -d \$PYFOAM_DIR/bin ] && _foamAddPath \$PYFOAM_DIR/bin
|
||||||
|
@ -125,16 +125,12 @@ cat << DOT_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}.cs
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
setenv PYFOAM_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
setenv PYFOAM_DIR \$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
||||||
|
|
||||||
setenv PYTHONPATH \$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages:\$PYTHONPATH
|
setenv PYTHONPATH \$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages
|
||||||
|
|
||||||
if ( -e \$PYFOAM_DIR/bin ) then
|
if ( -e \$PYFOAM_DIR/bin ) then
|
||||||
_foamAddPath \$PYFOAM_DIR/bin
|
_foamAddPath \$PYFOAM_DIR/bin
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if ( -e \$PYFOAM_SITE_DIR/bin ) then
|
|
||||||
_foamAddPath \$PYFOAM_SITE_DIR/bin
|
|
||||||
endif
|
|
||||||
|
|
||||||
DOT_CSH_EOF
|
DOT_CSH_EOF
|
||||||
|
|
||||||
cat << DOT_HARDCODED_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}_hardcoded.sh
|
cat << DOT_HARDCODED_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{version}_hardcoded.sh
|
||||||
|
@ -146,7 +142,7 @@ cat << DOT_HARDCODED_SH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{ve
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
export PYFOAM_DIR=$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
export PYFOAM_DIR=$WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
||||||
export PYTHONPATH=\$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages:\$PYTHONPATH
|
export PYTHONPATH=\$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages
|
||||||
|
|
||||||
# Enable access to the package applications if present
|
# Enable access to the package applications if present
|
||||||
[ -d \$PYFOAM_DIR/bin ] && export PATH=\$PYFOAM_DIR/bin:\$PATH
|
[ -d \$PYFOAM_DIR/bin ] && export PATH=\$PYFOAM_DIR/bin:\$PATH
|
||||||
|
@ -165,7 +161,7 @@ cat << DOT_HARDCODED_CSH_EOF > $RPM_BUILD_ROOT/%{_installPrefix}/etc/%{name}-%{v
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
setenv PYFOAM_DIR $WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
setenv PYFOAM_DIR $WM_THIRD_PARTY_DIR/packages/%{name}-%{version}/platforms/noarch
|
||||||
|
|
||||||
setenv PYTHONPATH \$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages:\$PYTHONPATH
|
setenv PYTHONPATH \$PYFOAM_DIR/lib/python%{pythonVersion}/site-packages
|
||||||
|
|
||||||
if ( -e \$PYFOAM_DIR/bin ) then
|
if ( -e \$PYFOAM_DIR/bin ) then
|
||||||
setenv PATH \$PYFOAM_DIR/bin:\$PATH
|
setenv PATH \$PYFOAM_DIR/bin:\$PATH
|
||||||
|
|
|
@ -77,6 +77,7 @@ URL: http://software.sandia.gov/~jakraft
|
||||||
Source: %url/%{name}-%{version}.tar.gz
|
Source: %url/%{name}-%{version}.tar.gz
|
||||||
Prefix: %{_prefix}
|
Prefix: %{_prefix}
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
|
Patch0: mesquite-2.1.2.patch
|
||||||
|
|
||||||
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
%define _installPrefix %{_prefix}/packages/%{name}-%{version}/platforms/%{_WM_OPTIONS}
|
||||||
|
|
||||||
|
@ -86,6 +87,8 @@ Group: Development/Tools
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
|
||||||
|
%patch0 -p0
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# export WM settings in a form that GNU configure recognizes
|
# export WM settings in a form that GNU configure recognizes
|
||||||
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
[ -n "$WM_CC" ] && export CC="$WM_CC"
|
||||||
|
|
47
ThirdParty/tools/makeThirdPartyFunctionsForRPM
vendored
47
ThirdParty/tools/makeThirdPartyFunctionsForRPM
vendored
|
@ -59,9 +59,8 @@ rpm_make()
|
||||||
_SPECFILE=''
|
_SPECFILE=''
|
||||||
_PACKAGE_URL=''
|
_PACKAGE_URL=''
|
||||||
_ADDITIONALFLAGS=''
|
_ADDITIONALFLAGS=''
|
||||||
_RPMFILENAME=''
|
|
||||||
|
|
||||||
while getopts p:s:u:f:n:a: flags
|
while getopts p:s:u:a: flags
|
||||||
do
|
do
|
||||||
case $flags in
|
case $flags in
|
||||||
p) _PACKAGE=$OPTARG
|
p) _PACKAGE=$OPTARG
|
||||||
|
@ -70,11 +69,7 @@ rpm_make()
|
||||||
;;
|
;;
|
||||||
s) _SPECFILE=$OPTARG
|
s) _SPECFILE=$OPTARG
|
||||||
;;
|
;;
|
||||||
f) _ADDITIONALFLAGS=$OPTARG
|
a) _ADDITIONALFLAGS=$OPTARG
|
||||||
;;
|
|
||||||
n) _RPMFILENAME=$OPTARG
|
|
||||||
;;
|
|
||||||
a) architecture=$OPTARG
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
@ -87,21 +82,9 @@ rpm_make()
|
||||||
# Shift options
|
# Shift options
|
||||||
shift `expr $OPTIND - 1`
|
shift `expr $OPTIND - 1`
|
||||||
|
|
||||||
# Make sure the ThirdParty environment is up-to-date
|
rpmName=$_PACKAGE-$WM_OPTIONS.$architecture
|
||||||
echo "Updating the ThirdParty environment variables before building package $_PACKAGE"
|
|
||||||
. $WM_PROJECT_DIR/etc/settings.sh
|
|
||||||
|
|
||||||
if [ "$_RPMFILENAME" = "" ]; then
|
|
||||||
rpmName=$_PACKAGE-$WM_OPTIONS.$architecture
|
|
||||||
else
|
|
||||||
# Filename for the RPM was overridden from the command line
|
|
||||||
rpmName=$_RPMFILENAME
|
|
||||||
fi
|
|
||||||
|
|
||||||
rpmFile=$buildBase/RPMS/$architecture/$rpmName.rpm
|
rpmFile=$buildBase/RPMS/$architecture/$rpmName.rpm
|
||||||
|
|
||||||
echo "RPM file name : $rpmFile"
|
|
||||||
|
|
||||||
# We check immediatly if the RPM binary package is available in the local RPMs vault.
|
# We check immediatly if the RPM binary package is available in the local RPMs vault.
|
||||||
# If so, we basically uninstall/reinstall the package. This is handy for installation
|
# If so, we basically uninstall/reinstall the package. This is handy for installation
|
||||||
# on machines with no Internet access, so without downloading capabilities. If one wants to
|
# on machines with no Internet access, so without downloading capabilities. If one wants to
|
||||||
|
@ -130,16 +113,10 @@ rpm_make()
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install RPM package if not done already
|
# Install RPM package if not done already
|
||||||
if [ "$architecture" = "noarch" ]; then
|
if [ ! -e "$WM_THIRD_PARTY_DIR/packages/$_PACKAGE/platforms/$WM_OPTIONS" ]; then
|
||||||
installDir=$WM_THIRD_PARTY_DIR/packages/$_PACKAGE/platforms/noarch
|
|
||||||
else
|
|
||||||
installDir=$WM_THIRD_PARTY_DIR/packages/$_PACKAGE/platforms/$WM_OPTIONS
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -e "$installDir" ]; then
|
|
||||||
echo "Installing package: $_PACKAGE"
|
echo "Installing package: $_PACKAGE"
|
||||||
rpm_uninstall $_PACKAGE $rpmName
|
rpm_uninstall $_PACKAGE
|
||||||
rpm_install $_PACKAGE $rpmName $rpmFile
|
rpm_install $_PACKAGE
|
||||||
else
|
else
|
||||||
echo "Package $_PACKAGE is already installed"
|
echo "Package $_PACKAGE is already installed"
|
||||||
fi
|
fi
|
||||||
|
@ -148,7 +125,6 @@ rpm_make()
|
||||||
unset _SPECFILE
|
unset _SPECFILE
|
||||||
unset _PACKAGE_URL
|
unset _PACKAGE_URL
|
||||||
unset _ADDITIONALFLAGS
|
unset _ADDITIONALFLAGS
|
||||||
unset _RPMFILENAME
|
|
||||||
|
|
||||||
echo "Done installing package $_PACKAGE"
|
echo "Done installing package $_PACKAGE"
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -166,8 +142,8 @@ rpm_build()
|
||||||
cd $buildBase
|
cd $buildBase
|
||||||
|
|
||||||
[ -e ./SPECS/$specFile ] || {
|
[ -e ./SPECS/$specFile ] || {
|
||||||
echo "rpm_build: Error: missing SPEC file for package $package. Aborting."
|
echo "rpm_build: missing SPEC file for package $package. Aborting."
|
||||||
exit -1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
#Build RPM package
|
#Build RPM package
|
||||||
|
@ -184,7 +160,7 @@ rpm_build()
|
||||||
rpm_uninstall()
|
rpm_uninstall()
|
||||||
{
|
{
|
||||||
package="$1"
|
package="$1"
|
||||||
rpmName="$2"
|
rpmName=$package-$WM_OPTIONS.$architecture
|
||||||
|
|
||||||
cd $buildBase
|
cd $buildBase
|
||||||
|
|
||||||
|
@ -204,13 +180,14 @@ rpm_uninstall()
|
||||||
rpm_install()
|
rpm_install()
|
||||||
{
|
{
|
||||||
package="$1";
|
package="$1";
|
||||||
rpmName="$2";
|
rpmName=$package-$WM_OPTIONS.$architecture;
|
||||||
rpmFile="$3";
|
rpmFile=$buildBase/RPMS/$architecture/$rpmName.rpm;
|
||||||
|
|
||||||
echo " Installing $package using RPM file: $rpmFile";
|
echo " Installing $package using RPM file: $rpmFile";
|
||||||
${RPM_CMD} ${RPM_CMD_XTRA_OPTIONS} -ivh \
|
${RPM_CMD} ${RPM_CMD_XTRA_OPTIONS} -ivh \
|
||||||
$rpmFile \
|
$rpmFile \
|
||||||
--dbpath $buildBase/rpmDB --force --nodeps;
|
--dbpath $buildBase/rpmDB --force --nodeps;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
p = dimensionedScalar("zero", p.dimensions(), 0.0);
|
p.internalField() = 0;
|
||||||
|
|
||||||
|
|
||||||
Info<< "Reading field U\n" << endl;
|
Info<< "Reading field U\n" << endl;
|
||||||
volVectorField U
|
volVectorField U
|
||||||
|
@ -29,7 +28,7 @@
|
||||||
mesh
|
mesh
|
||||||
);
|
);
|
||||||
|
|
||||||
U = dimensionedVector("0", U.dimensions(), vector::zero);
|
U.internalField() = vector::zero;
|
||||||
|
|
||||||
surfaceScalarField phi
|
surfaceScalarField phi
|
||||||
(
|
(
|
||||||
|
|
|
@ -29,4 +29,5 @@ EXE_LIBS = \
|
||||||
-llaminarFlameSpeedModels \
|
-llaminarFlameSpeedModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-ldynamicFvMesh \
|
-ldynamicFvMesh \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -19,4 +19,5 @@ EXE_LIBS = \
|
||||||
-llaminarFlameSpeedModels \
|
-llaminarFlameSpeedModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -16,4 +16,5 @@ EXE_LIBS = \
|
||||||
-lbasicThermophysicalModels \
|
-lbasicThermophysicalModels \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -34,4 +34,5 @@ EXE_LIBS = \
|
||||||
-lchemistryModel \
|
-lchemistryModel \
|
||||||
-lODE \
|
-lODE \
|
||||||
-lpdf \
|
-lpdf \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -18,4 +18,5 @@ EXE_LIBS = \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-llaminarFlameSpeedModels \
|
-llaminarFlameSpeedModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -113,6 +113,7 @@ addSolverToBlockMatrix(Vector2, blockCGSolverVector2, symMatrix);
|
||||||
typedef BlockGaussSeidelSolver<vector2> blockGaussSeidelSolverVector2;
|
typedef BlockGaussSeidelSolver<vector2> blockGaussSeidelSolverVector2;
|
||||||
makeBlockSolverTypeName(blockGaussSeidelSolverVector2);
|
makeBlockSolverTypeName(blockGaussSeidelSolverVector2);
|
||||||
addSolverToBlockMatrix(Vector2, blockGaussSeidelSolverVector2, symMatrix);
|
addSolverToBlockMatrix(Vector2, blockGaussSeidelSolverVector2, symMatrix);
|
||||||
|
addSolverToBlockMatrix(Vector2, blockGaussSeidelSolverVector2, asymMatrix);
|
||||||
|
|
||||||
typedef BlockGMRESSolver<vector2> blockGMRESSolverVector2;
|
typedef BlockGMRESSolver<vector2> blockGMRESSolverVector2;
|
||||||
makeBlockSolverTypeName(blockGMRESSolverVector2);
|
makeBlockSolverTypeName(blockGMRESSolverVector2);
|
||||||
|
|
|
@ -14,4 +14,5 @@ EXE_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
$(WM_DECOMP_LIBS) \
|
$(WM_DECOMP_LIBS) \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -20,4 +20,5 @@ EXE_LIBS = \
|
||||||
-lspecie \
|
-lspecie \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
$(WM_DECOMP_LIBS) \
|
$(WM_DECOMP_LIBS) \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -21,4 +21,5 @@ EXE_LIBS = \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
$(WM_DECOMP_LIBS) \
|
$(WM_DECOMP_LIBS) \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -10,4 +10,5 @@ EXE_LIBS = \
|
||||||
-lengine \
|
-lengine \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -10,4 +10,5 @@ EXE_LIBS = \
|
||||||
-lengine \
|
-lengine \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
|
@ -17,4 +17,5 @@ EXE_LIBS = \
|
||||||
-lincompressibleRASModels \
|
-lincompressibleRASModels \
|
||||||
-lincompressibleLESModels \
|
-lincompressibleLESModels \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -18,5 +18,6 @@ EXE_LIBS = \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldynamicFvMesh \
|
-ldynamicFvMesh \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
||||||
|
|
|
@ -20,4 +20,5 @@ EXE_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldynamicFvMesh \
|
-ldynamicFvMesh \
|
||||||
-ltopoChangerFvMesh \
|
-ltopoChangerFvMesh \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
+ fvc::ddtPhiCorr(rUA, rho, U, phi)
|
||||||
);
|
);
|
||||||
|
|
||||||
adjustPhi(phiU, U, p);
|
adjustPhi(phiU, U, pd);
|
||||||
|
|
||||||
phi = phiU +
|
phi = phiU +
|
||||||
(
|
(
|
||||||
|
|
|
@ -12,4 +12,5 @@ EXE_LIBS = \
|
||||||
-ldynamicFvMesh \
|
-ldynamicFvMesh \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
$(WM_DECOMP_LIBS) \
|
$(WM_DECOMP_LIBS) \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -13,4 +13,5 @@ EXE_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lfiniteArea \
|
-lfiniteArea \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -13,4 +13,5 @@ EXE_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lfiniteArea \
|
-lfiniteArea \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -14,4 +14,5 @@ EXE_LIBS = \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-ldynamicFvMesh \
|
-ldynamicFvMesh \
|
||||||
-lautoMesh
|
-lautoMesh \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -232,7 +232,7 @@ int main(int argc, char *argv[])
|
||||||
# include "createNamedMesh.H"
|
# include "createNamedMesh.H"
|
||||||
const word oldInstance = mesh.pointsInstance();
|
const word oldInstance = mesh.pointsInstance();
|
||||||
|
|
||||||
bool split = args.optionFound("split");
|
bool split = args.optionFound("split");
|
||||||
bool overwrite = args.optionFound("overwrite");
|
bool overwrite = args.optionFound("overwrite");
|
||||||
bool detectOnly = args.optionFound("detectOnly");
|
bool detectOnly = args.optionFound("detectOnly");
|
||||||
|
|
||||||
|
|
|
@ -14,4 +14,5 @@ EXE_LIBS = \
|
||||||
-lengine \
|
-lengine \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
$(WM_DECOMP_LIBS) \
|
$(WM_DECOMP_LIBS) \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -36,12 +36,6 @@ Author
|
||||||
#include "fvCFD.H"
|
#include "fvCFD.H"
|
||||||
#include "engineTime.H"
|
#include "engineTime.H"
|
||||||
#include "engineTopoChangerMesh.H"
|
#include "engineTopoChangerMesh.H"
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
#include "OFstream.H"
|
|
||||||
|
|
||||||
using namespace Foam;
|
|
||||||
>>>>>>> parallelTopo
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
// Main program:
|
// Main program:
|
||||||
|
|
|
@ -10,4 +10,5 @@ EXE_LIBS = \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-lengine \
|
-lengine \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-llduSolvers
|
-llduSolvers \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -5,4 +5,5 @@ EXE_INC = \
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lengine \
|
-lengine \
|
||||||
-ldynamicMesh
|
-ldynamicMesh \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -41,4 +41,5 @@ EXE_LIBS = \
|
||||||
-lthermophysicalFunctions \
|
-lthermophysicalFunctions \
|
||||||
-ltopoChangerFvMesh \
|
-ltopoChangerFvMesh \
|
||||||
-ltriSurface \
|
-ltriSurface \
|
||||||
-lautoMesh
|
-lautoMesh \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -10,4 +10,5 @@ EXE_LIBS = \
|
||||||
-ldecompositionMethods \
|
-ldecompositionMethods \
|
||||||
-lmeshTools \
|
-lmeshTools \
|
||||||
-ldynamicMesh \
|
-ldynamicMesh \
|
||||||
-ldynamicFvMesh
|
-ldynamicFvMesh \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
|
@ -5,4 +5,6 @@ EXE_INC = \
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-lengine \
|
-lengine \
|
||||||
-ldynamicMesh
|
-ldynamicMesh \
|
||||||
|
-L$(MESQUITE_LIB_DIR) -lmesquite
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,4 @@ EXE_INC = \
|
||||||
EXE_LIBS = \
|
EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-linterfaceProperties \
|
-linterfaceProperties \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels
|
||||||
-ldynamicFvMesh \
|
|
||||||
-llduSolvers
|
|
||||||
|
|
|
@ -8,5 +8,4 @@ EXE_LIBS = \
|
||||||
-lfiniteVolume \
|
-lfiniteVolume \
|
||||||
-linterfaceProperties \
|
-linterfaceProperties \
|
||||||
-lincompressibleTransportModels \
|
-lincompressibleTransportModels \
|
||||||
-ldynamicFvMesh \
|
|
||||||
-llduSolvers
|
-llduSolvers
|
||||||
|
|
|
@ -200,11 +200,11 @@ endOfSection {space}")"{space}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- *\
|
/* ------------------------------------------------------------------------- *\
|
||||||
------ Start Lexing ------
|
------ Start Lexing ------
|
||||||
\* ------------------------------------------------------------------------- */
|
\* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* ------ Reading control header ------ */
|
/* ------ Reading control header ------ */
|
||||||
|
|
||||||
{comment} {
|
{comment} {
|
||||||
yy_push_state(readComment);
|
yy_push_state(readComment);
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
surfaceTransformPoints.C
|
surfaceTransformPoints.C
|
||||||
|
|
||||||
EXE = $(FOAM_APPBIN)/surfaceTransformPoints
|
EXE = $(FOAM_APPBIN)/surfaceTransformPoints
|
||||||
|
|
|
@ -79,7 +79,9 @@ alias _foamSource 'if ($?FOAM_VERBOSE && $?prompt) echo "Sourcing: \!*"; source
|
||||||
# Add in preset user or site preferences:
|
# Add in preset user or site preferences:
|
||||||
set foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh`
|
set foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile prefs.csh`
|
||||||
if ( $status == 0 ) then
|
if ( $status == 0 ) then
|
||||||
_foamSource $foamPrefs
|
if ($foamPrefs) then
|
||||||
|
_foamSource $foamPrefs
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
unset foamPrefs
|
unset foamPrefs
|
||||||
|
|
||||||
|
@ -127,7 +129,7 @@ if ( ! $?WM_PRECISION_OPTION ) setenv WM_PRECISION_OPTION DP
|
||||||
|
|
||||||
# WM_COMPILE_OPTION = Opt | Debug | Prof
|
# WM_COMPILE_OPTION = Opt | Debug | Prof
|
||||||
if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt
|
if ( ! $?WM_COMPILE_OPTION ) setenv WM_COMPILE_OPTION Opt
|
||||||
#setenv WM_COMPILE_OPTION Opt
|
setenv WM_COMPILE_OPTION Opt
|
||||||
#setenv WM_COMPILE_OPTION Debug
|
#setenv WM_COMPILE_OPTION Debug
|
||||||
|
|
||||||
# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI
|
# WM_MPLIB = | OPENMPI | MPICH | MPICH-GM | HPMPI | GAMMA | MPI | QSMPI
|
||||||
|
|
|
@ -425,8 +425,8 @@ endif
|
||||||
|
|
||||||
# cmake
|
# cmake
|
||||||
# ~~~~~
|
# ~~~~~
|
||||||
if ( $?CMAKE_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/cmake-2.8.5/platforms/$WM_OPTIONS ) then
|
if ( $?CMAKE_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/cmake-2.8.6/platforms/$WM_OPTIONS ) then
|
||||||
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.5/platforms/$WM_OPTIONS/etc/cmake-2.8.5.csh
|
_foamSource $WM_THIRD_PARTY_DIR/packages/cmake-2.8.6/platforms/$WM_OPTIONS/etc/cmake-2.8.6.csh
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Python
|
# Python
|
||||||
|
@ -437,7 +437,7 @@ endif
|
||||||
|
|
||||||
# PyFoam
|
# PyFoam
|
||||||
# ~~~~~~
|
# ~~~~~~
|
||||||
if ( $?PYFOAM_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/PyFoam-0.5.7 ) then
|
if ( $?PYFOAM_SYSTEM == 0 && -e "$WM_THIRD_PARTY_DIR"/packages/PyFoam-0.5.7/platforms/noarch ) then
|
||||||
_foamSource $WM_THIRD_PARTY_DIR/packages/PyFoam-0.5.7/platforms/noarch/etc/PyFoam-0.5.7.csh
|
_foamSource $WM_THIRD_PARTY_DIR/packages/PyFoam-0.5.7/platforms/noarch/etc/PyFoam-0.5.7.csh
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
@ -277,6 +277,7 @@ $(GAMGInterfaces)/cyclicGAMGInterface/cyclicGAMGInterface.C
|
||||||
$(GAMGInterfaces)/ggiGAMGInterface/ggiGAMGInterface.C
|
$(GAMGInterfaces)/ggiGAMGInterface/ggiGAMGInterface.C
|
||||||
$(GAMGInterfaces)/cyclicGgiGAMGInterface/cyclicGgiGAMGInterface.C
|
$(GAMGInterfaces)/cyclicGgiGAMGInterface/cyclicGgiGAMGInterface.C
|
||||||
$(GAMGInterfaces)/regionCoupleGAMGInterface/regionCoupleGAMGInterface.C
|
$(GAMGInterfaces)/regionCoupleGAMGInterface/regionCoupleGAMGInterface.C
|
||||||
|
$(GAMGInterfaces)/mixingPlaneGAMGInterface/mixingPlaneGAMGInterface.C
|
||||||
|
|
||||||
GAMGInterfaceFields = $(GAMG)/interfaceFields
|
GAMGInterfaceFields = $(GAMG)/interfaceFields
|
||||||
$(GAMGInterfaceFields)/GAMGInterfaceField/GAMGInterfaceField.C
|
$(GAMGInterfaceFields)/GAMGInterfaceField/GAMGInterfaceField.C
|
||||||
|
|
|
@ -155,14 +155,14 @@ void Foam::indexedOctree<Type>::divide
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
List<DynamicList<label> > subIndices(8);
|
List<DynamicList<label> > subIndices(8);
|
||||||
for (direction octant = 0; octant < subIndices.size(); octant++)
|
for (label octant = 0; octant < subIndices.size(); octant++)
|
||||||
{
|
{
|
||||||
subIndices[octant].setCapacity(indices.size()/8);
|
subIndices[octant].setCapacity(indices.size()/8);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Precalculate bounding boxes.
|
// Precalculate bounding boxes.
|
||||||
FixedList<treeBoundBox, 8> subBbs;
|
FixedList<treeBoundBox, 8> subBbs;
|
||||||
for (direction octant = 0; octant < subBbs.size(); octant++)
|
for (label octant = 0; octant < subBbs.size(); octant++)
|
||||||
{
|
{
|
||||||
subBbs[octant] = bb.subBbox(octant);
|
subBbs[octant] = bb.subBbox(octant);
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ void Foam::indexedOctree<Type>::divide
|
||||||
{
|
{
|
||||||
label shapeI = indices[i];
|
label shapeI = indices[i];
|
||||||
|
|
||||||
for (direction octant = 0; octant < 8; octant++)
|
for (label octant = 0; octant < 8; octant++)
|
||||||
{
|
{
|
||||||
if (shapes_.overlaps(shapeI, subBbs[octant]))
|
if (shapes_.overlaps(shapeI, subBbs[octant]))
|
||||||
{
|
{
|
||||||
|
@ -181,7 +181,7 @@ void Foam::indexedOctree<Type>::divide
|
||||||
}
|
}
|
||||||
|
|
||||||
result.setSize(8);
|
result.setSize(8);
|
||||||
for (direction octant = 0; octant < subIndices.size(); octant++)
|
for (label octant = 0; octant < subIndices.size(); octant++)
|
||||||
{
|
{
|
||||||
result[octant].transfer(subIndices[octant]);
|
result[octant].transfer(subIndices[octant]);
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,7 @@ Foam::indexedOctree<Type>::divide
|
||||||
// Append the rest.
|
// Append the rest.
|
||||||
bool replaced = false;
|
bool replaced = false;
|
||||||
|
|
||||||
for (direction octant = 0; octant < dividedIndices.size(); octant++)
|
for (label octant = 0; octant < dividedIndices.size(); octant++)
|
||||||
{
|
{
|
||||||
labelList& subIndices = dividedIndices[octant];
|
labelList& subIndices = dividedIndices[octant];
|
||||||
|
|
||||||
|
@ -276,7 +276,7 @@ void Foam::indexedOctree<Type>::splitNodes
|
||||||
{
|
{
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
direction octant = 0;
|
label octant = 0;
|
||||||
octant < nodes[nodeI].subNodes_.size();
|
octant < nodes[nodeI].subNodes_.size();
|
||||||
octant++
|
octant++
|
||||||
)
|
)
|
||||||
|
@ -303,7 +303,8 @@ void Foam::indexedOctree<Type>::splitNodes
|
||||||
subNode.parent_ = nodeI;
|
subNode.parent_ = nodeI;
|
||||||
label sz = nodes.size();
|
label sz = nodes.size();
|
||||||
nodes.append(subNode);
|
nodes.append(subNode);
|
||||||
nodes[nodeI].subNodes_[octant] = nodePlusOctant(sz, octant);
|
nodes[nodeI].subNodes_[octant] =
|
||||||
|
nodePlusOctant(sz, octant);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -332,7 +333,7 @@ Foam::label Foam::indexedOctree<Type>::compactContents
|
||||||
|
|
||||||
if (level < compactLevel)
|
if (level < compactLevel)
|
||||||
{
|
{
|
||||||
for (direction octant = 0; octant < nod.subNodes_.size(); octant++)
|
for (label octant = 0; octant < nod.subNodes_.size(); octant++)
|
||||||
{
|
{
|
||||||
labelBits index = nod.subNodes_[octant];
|
labelBits index = nod.subNodes_[octant];
|
||||||
|
|
||||||
|
@ -354,7 +355,7 @@ Foam::label Foam::indexedOctree<Type>::compactContents
|
||||||
else if (level == compactLevel)
|
else if (level == compactLevel)
|
||||||
{
|
{
|
||||||
// Compact all content on this level
|
// Compact all content on this level
|
||||||
for (direction octant = 0; octant < nod.subNodes_.size(); octant++)
|
for (label octant = 0; octant < nod.subNodes_.size(); octant++)
|
||||||
{
|
{
|
||||||
labelBits index = nod.subNodes_[octant];
|
labelBits index = nod.subNodes_[octant];
|
||||||
|
|
||||||
|
@ -394,7 +395,7 @@ Foam::indexedOctree<Type>::calcVolumeType
|
||||||
|
|
||||||
volumeType myType = UNKNOWN;
|
volumeType myType = UNKNOWN;
|
||||||
|
|
||||||
for (direction octant = 0; octant < nod.subNodes_.size(); octant++)
|
for (label octant = 0; octant < nod.subNodes_.size(); octant++)
|
||||||
{
|
{
|
||||||
volumeType subType;
|
volumeType subType;
|
||||||
|
|
||||||
|
@ -451,7 +452,7 @@ Foam::indexedOctree<Type>::getVolumeType
|
||||||
{
|
{
|
||||||
const node& nod = nodes_[nodeI];
|
const node& nod = nodes_[nodeI];
|
||||||
|
|
||||||
direction octant = nod.bb_.subOctant(sample);
|
label octant = nod.bb_.subOctant(sample);
|
||||||
|
|
||||||
volumeType octantType = volumeType(nodeTypes_.get((nodeI<<3)+octant));
|
volumeType octantType = volumeType(nodeTypes_.get((nodeI<<3)+octant));
|
||||||
|
|
||||||
|
@ -1268,7 +1269,7 @@ bool Foam::indexedOctree<Type>::walkToParent
|
||||||
// Find octant nodeI is in.
|
// Find octant nodeI is in.
|
||||||
parentOctant = 255;
|
parentOctant = 255;
|
||||||
|
|
||||||
for (direction i = 0; i < parentNode.subNodes_.size(); i++)
|
for (label i = 0; i < parentNode.subNodes_.size(); i++)
|
||||||
{
|
{
|
||||||
labelBits index = parentNode.subNodes_[i];
|
labelBits index = parentNode.subNodes_[i];
|
||||||
|
|
||||||
|
@ -2020,7 +2021,7 @@ void Foam::indexedOctree<Type>::findBox
|
||||||
const node& nod = nodes_[nodeI];
|
const node& nod = nodes_[nodeI];
|
||||||
const treeBoundBox& nodeBb = nod.bb_;
|
const treeBoundBox& nodeBb = nod.bb_;
|
||||||
|
|
||||||
for (direction octant = 0; octant < nod.subNodes_.size(); octant++)
|
for (label octant = 0; octant < nod.subNodes_.size(); octant++)
|
||||||
{
|
{
|
||||||
labelBits index = nod.subNodes_[octant];
|
labelBits index = nod.subNodes_[octant];
|
||||||
|
|
||||||
|
@ -2072,7 +2073,7 @@ Foam::label Foam::indexedOctree<Type>::countElements
|
||||||
|
|
||||||
const node& nod = nodes_[nodeI];
|
const node& nod = nodes_[nodeI];
|
||||||
|
|
||||||
for (direction octant = 0; octant < nod.subNodes_.size(); octant++)
|
for (label octant = 0; octant < nod.subNodes_.size(); octant++)
|
||||||
{
|
{
|
||||||
nElems += countElements(nod.subNodes_[octant]);
|
nElems += countElements(nod.subNodes_[octant]);
|
||||||
}
|
}
|
||||||
|
@ -2583,7 +2584,7 @@ void Foam::indexedOctree<Type>::print
|
||||||
<< "parent:" << nod.parent_ << nl
|
<< "parent:" << nod.parent_ << nl
|
||||||
<< "n:" << countElements(nodePlusOctant(nodeI, 0)) << nl;
|
<< "n:" << countElements(nodePlusOctant(nodeI, 0)) << nl;
|
||||||
|
|
||||||
for (direction octant = 0; octant < nod.subNodes_.size(); octant++)
|
for (label octant = 0; octant < nod.subNodes_.size(); octant++)
|
||||||
{
|
{
|
||||||
const treeBoundBox subBb(bb.subBbox(octant));
|
const treeBoundBox subBb(bb.subBbox(octant));
|
||||||
|
|
||||||
|
|
|
@ -357,7 +357,8 @@ types() const
|
||||||
|
|
||||||
|
|
||||||
template<class Type, template<class> class PatchField, class GeoMesh>
|
template<class Type, template<class> class PatchField, class GeoMesh>
|
||||||
typename Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField
|
typename
|
||||||
|
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||||
boundaryInternalField() const
|
boundaryInternalField() const
|
||||||
{
|
{
|
||||||
|
@ -402,7 +403,10 @@ typename Foam::BlockLduInterfaceFieldPtrsList<Type>::Type
|
||||||
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
Foam::GeometricField<Type, PatchField, GeoMesh>::GeometricBoundaryField::
|
||||||
blockInterfaces() const
|
blockInterfaces() const
|
||||||
{
|
{
|
||||||
typename BlockLduInterfaceFieldPtrsList<Type>::Type interfaces(this->size());
|
typename BlockLduInterfaceFieldPtrsList<Type>::Type interfaces
|
||||||
|
(
|
||||||
|
this->size()
|
||||||
|
);
|
||||||
|
|
||||||
forAll (interfaces, patchi)
|
forAll (interfaces, patchi)
|
||||||
{
|
{
|
||||||
|
@ -411,7 +415,10 @@ blockInterfaces() const
|
||||||
interfaces.set
|
interfaces.set
|
||||||
(
|
(
|
||||||
patchi,
|
patchi,
|
||||||
&refCast<const BlockLduInterfaceField<Type> >(this->operator[](patchi))
|
&refCast<const BlockLduInterfaceField<Type> >
|
||||||
|
(
|
||||||
|
this->operator[](patchi)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,7 +210,6 @@ public:
|
||||||
()
|
()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
// Selectors
|
// Selectors
|
||||||
|
|
||||||
//- Return a reference to the selected writer
|
//- Return a reference to the selected writer
|
||||||
|
|
|
@ -239,14 +239,14 @@ MixingPlaneInterpolation<MasterPatch, SlavePatch>::masterToSlave
|
||||||
Field<Type>& result = tresult();
|
Field<Type>& result = tresult();
|
||||||
|
|
||||||
interpolate
|
interpolate
|
||||||
(
|
(
|
||||||
profileFF, // Master data in 'profile space'
|
profileFF, // Master data in 'profile space'
|
||||||
masterPatchToProfileAddr(), // From master: compute the average
|
masterPatchToProfileAddr(), // From master: compute the average
|
||||||
masterPatchToProfileWeights(),
|
masterPatchToProfileWeights(),
|
||||||
slaveProfileToPatchAddr(), // To slave we distribute the average from
|
slaveProfileToPatchAddr(), // To slave we distribute the average from
|
||||||
slaveProfileToPatchWeights(), // profile to patch
|
slaveProfileToPatchWeights(), // profile to patch
|
||||||
result
|
result
|
||||||
);
|
);
|
||||||
|
|
||||||
// Apply transform to bring the slave field back from 'profile space'
|
// Apply transform to bring the slave field back from 'profile space'
|
||||||
// to 'patch space'
|
// to 'patch space'
|
||||||
|
@ -315,14 +315,14 @@ MixingPlaneInterpolation<MasterPatch, SlavePatch>::slaveToMaster
|
||||||
Field<Type>& result = tresult();
|
Field<Type>& result = tresult();
|
||||||
|
|
||||||
interpolate
|
interpolate
|
||||||
(
|
(
|
||||||
profileFF, // Slave data in 'profile space'
|
profileFF, // Slave data in 'profile space'
|
||||||
slavePatchToProfileAddr(), // From slave: compute the average
|
slavePatchToProfileAddr(), // From slave: compute the average
|
||||||
slavePatchToProfileWeights(),
|
slavePatchToProfileWeights(),
|
||||||
masterProfileToPatchAddr(), // To master: distribute the average
|
masterProfileToPatchAddr(), // To master: distribute the average
|
||||||
masterProfileToPatchWeights(),
|
masterProfileToPatchWeights(),
|
||||||
result
|
result
|
||||||
);
|
);
|
||||||
|
|
||||||
// Apply transform to bring the master field back from 'profile space'
|
// Apply transform to bring the master field back from 'profile space'
|
||||||
// to 'patch space'
|
// to 'patch space'
|
||||||
|
@ -389,14 +389,14 @@ MixingPlaneInterpolation<MasterPatch, SlavePatch>::masterToMaster
|
||||||
Field<Type>& result = tresult();
|
Field<Type>& result = tresult();
|
||||||
|
|
||||||
interpolate
|
interpolate
|
||||||
(
|
(
|
||||||
profileFF, // Master data in 'profile space'
|
profileFF, // Master data in 'profile space'
|
||||||
masterPatchToProfileAddr(), // From master: compute the average
|
masterPatchToProfileAddr(), // From master: compute the average
|
||||||
masterPatchToProfileWeights(),
|
masterPatchToProfileWeights(),
|
||||||
masterProfileToPatchAddr(), // To master: distribute the average
|
masterProfileToPatchAddr(), // To master: distribute the average
|
||||||
masterProfileToPatchWeights(),
|
masterProfileToPatchWeights(),
|
||||||
result
|
result
|
||||||
);
|
);
|
||||||
|
|
||||||
// Apply transform to bring the master field back from 'profile space'
|
// Apply transform to bring the master field back from 'profile space'
|
||||||
// to 'patch space'
|
// to 'patch space'
|
||||||
|
|
|
@ -62,12 +62,12 @@ Foam::Gauss::~Gauss()
|
||||||
|
|
||||||
Foam::tmp<Foam::scalarField> Foam::Gauss::weights
|
Foam::tmp<Foam::scalarField> Foam::Gauss::weights
|
||||||
(
|
(
|
||||||
const vectorField& points,
|
const vectorField& controlPoints,
|
||||||
const vector& controlPoint
|
const vector& dataPoint
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Algorithmic improvement, Matteo Lombardi. 21/Mar/2011
|
// Algorithmic improvement, Matteo Lombardi. 21/Mar/2011
|
||||||
scalarField sqrDist = magSqr(points - controlPoint);
|
scalarField sqrDist = magSqr(controlPoints - dataPoint);
|
||||||
|
|
||||||
return Foam::exp(-sqr(radius_)*sqrDist);
|
return Foam::exp(-sqr(radius_)*sqrDist);
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,8 +99,8 @@ public:
|
||||||
//- Return weights given points
|
//- Return weights given points
|
||||||
virtual tmp<scalarField> weights
|
virtual tmp<scalarField> weights
|
||||||
(
|
(
|
||||||
const vectorField& points,
|
const vectorField& controlPoints,
|
||||||
const vector& controlPoint
|
const vector& dataPoint
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -63,12 +63,12 @@ Foam::IMQB::~IMQB()
|
||||||
|
|
||||||
Foam::tmp<Foam::scalarField> Foam::IMQB::weights
|
Foam::tmp<Foam::scalarField> Foam::IMQB::weights
|
||||||
(
|
(
|
||||||
const vectorField& points,
|
const vectorField& controlPoints,
|
||||||
const vector& controlPoint
|
const vector& dataPoint
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
// Algorithmic improvement, Matteo Lombardi. 21/Mar/2011
|
// Algorithmic improvement, Matteo Lombardi. 21/Mar/2011
|
||||||
scalarField sqrDist = magSqr(points - controlPoint);
|
scalarField sqrDist = magSqr(controlPoints - dataPoint);
|
||||||
|
|
||||||
return 1/sqrt(sqrDist + sqr(radius_));
|
return 1/sqrt(sqrDist + sqr(radius_));
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,8 +99,8 @@ public:
|
||||||
//- Return weights given points
|
//- Return weights given points
|
||||||
virtual tmp<scalarField> weights
|
virtual tmp<scalarField> weights
|
||||||
(
|
(
|
||||||
const vectorField& points,
|
const vectorField& controlPoints,
|
||||||
const vector& controlPoint
|
const vector& dataPoint
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -117,8 +117,8 @@ public:
|
||||||
//- Return RBF weights
|
//- Return RBF weights
|
||||||
virtual tmp<scalarField> weights
|
virtual tmp<scalarField> weights
|
||||||
(
|
(
|
||||||
const vectorField& points,
|
const vectorField& controlPoints,
|
||||||
const vector& controlPoint
|
const vector& dataPoint
|
||||||
) const = 0;
|
) const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -62,11 +62,11 @@ Foam::TPS::~TPS()
|
||||||
|
|
||||||
Foam::tmp<Foam::scalarField> Foam::TPS::weights
|
Foam::tmp<Foam::scalarField> Foam::TPS::weights
|
||||||
(
|
(
|
||||||
const vectorField& points,
|
const vectorField& controlPoints,
|
||||||
const vector& controlPoint
|
const vector& dataPoint
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
scalarField dist = mag(points - controlPoint);
|
scalarField dist = mag(controlPoints - dataPoint);
|
||||||
scalarField RBF(dist.size());
|
scalarField RBF(dist.size());
|
||||||
|
|
||||||
forAll(RBF, i)
|
forAll(RBF, i)
|
||||||
|
|
|
@ -98,8 +98,8 @@ public:
|
||||||
//- Return weights given points
|
//- Return weights given points
|
||||||
virtual tmp<scalarField> weights
|
virtual tmp<scalarField> weights
|
||||||
(
|
(
|
||||||
const vectorField& points,
|
const vectorField& controlPoints,
|
||||||
const vector& controlPoint
|
const vector& dataPoint
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -62,11 +62,11 @@ Foam::W2::~W2()
|
||||||
|
|
||||||
Foam::tmp<Foam::scalarField> Foam::W2::weights
|
Foam::tmp<Foam::scalarField> Foam::W2::weights
|
||||||
(
|
(
|
||||||
const vectorField& points,
|
const vectorField& controlPoints,
|
||||||
const vector& controlPoint
|
const vector& dataPoint
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
scalarField dist = mag(points - controlPoint);
|
scalarField dist = mag(controlPoints - dataPoint);
|
||||||
|
|
||||||
scalarField RBF(dist.size());
|
scalarField RBF(dist.size());
|
||||||
|
|
||||||
|
|
|
@ -99,8 +99,8 @@ public:
|
||||||
//- Return weights given points
|
//- Return weights given points
|
||||||
virtual tmp<scalarField> weights
|
virtual tmp<scalarField> weights
|
||||||
(
|
(
|
||||||
const vectorField& points,
|
const vectorField& controlPoints,
|
||||||
const vector& controlPoint
|
const vector& dataPoint
|
||||||
) const;
|
) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,6 @@ Foam::RBFInterpolation::RBFInterpolation
|
||||||
const vectorField& allPoints
|
const vectorField& allPoints
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
dict_(dict),
|
|
||||||
controlPoints_(controlPoints),
|
controlPoints_(controlPoints),
|
||||||
allPoints_(allPoints),
|
allPoints_(allPoints),
|
||||||
RBF_(RBFFunction::New(word(dict.lookup("RBF")), dict)),
|
RBF_(RBFFunction::New(word(dict.lookup("RBF")), dict)),
|
||||||
|
@ -190,7 +189,6 @@ Foam::RBFInterpolation::RBFInterpolation
|
||||||
const RBFInterpolation& rbf
|
const RBFInterpolation& rbf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
dict_(rbf.dict_),
|
|
||||||
controlPoints_(rbf.controlPoints_),
|
controlPoints_(rbf.controlPoints_),
|
||||||
allPoints_(rbf.allPoints_),
|
allPoints_(rbf.allPoints_),
|
||||||
RBF_(rbf.RBF_->clone()),
|
RBF_(rbf.RBF_->clone()),
|
||||||
|
|
|
@ -86,13 +86,10 @@ class RBFInterpolation
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Dictionary
|
|
||||||
const dictionary& dict_;
|
|
||||||
|
|
||||||
//- Reference to control points
|
//- Reference to control points
|
||||||
const vectorField& controlPoints_;
|
const vectorField& controlPoints_;
|
||||||
|
|
||||||
//- Rerefence to all points
|
//- Reference to all points
|
||||||
const vectorField& allPoints_;
|
const vectorField& allPoints_;
|
||||||
|
|
||||||
//- RBF function
|
//- RBF function
|
||||||
|
|
|
@ -146,7 +146,8 @@ Foam::BlockBiCGStabSolver<Type>::solve
|
||||||
s[i] = r[i] - alpha*v[i];
|
s[i] = r[i] - alpha*v[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
preconPtr_->preconditionT(sh, s);
|
// Bug fix, Alexander Monakov, 11/Jul/2012
|
||||||
|
preconPtr_->precondition(sh, s);
|
||||||
matrix.Amul(t, sh);
|
matrix.Amul(t, sh);
|
||||||
omega = gSumProd(t, s)/gSumProd(t, t);
|
omega = gSumProd(t, s)/gSumProd(t, t);
|
||||||
|
|
||||||
|
|
|
@ -280,6 +280,9 @@ public:
|
||||||
//- Is the stop criterion reached
|
//- Is the stop criterion reached
|
||||||
bool stop(lduMatrix::solverPerformance& solverPerf) const;
|
bool stop(lduMatrix::solverPerformance& solverPerf) const;
|
||||||
|
|
||||||
|
//- Is the converrgence criterion reached
|
||||||
|
bool converged(lduMatrix::solverPerformance& solverPerf) const;
|
||||||
|
|
||||||
//- Read the control parameters from the dictionary
|
//- Read the control parameters from the dictionary
|
||||||
virtual void readControls();
|
virtual void readControls();
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ Foam::autoPtr<Foam::lduMatrix::solver> Foam::lduMatrix::solver::New
|
||||||
FatalIOErrorIn
|
FatalIOErrorIn
|
||||||
(
|
(
|
||||||
"lduSolver::New", dict
|
"lduSolver::New", dict
|
||||||
) << "Unknown asymmetric matrix solver " << solverName << nl << nl
|
) << "Unknown asymmetric matrix solver " << solverName << nl
|
||||||
<< "Valid asymmetric matrix solvers are :" << endl
|
<< "Valid asymmetric matrix solvers are :" << endl
|
||||||
<< asymMatrixConstructorTablePtr_->toc()
|
<< asymMatrixConstructorTablePtr_->toc()
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
|
@ -197,6 +197,15 @@ bool Foam::lduMatrix::solver::stop
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return converged(solverPerf);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
bool Foam::lduMatrix::solver::converged
|
||||||
|
(
|
||||||
|
lduMatrix::solverPerformance& solverPerf
|
||||||
|
) const
|
||||||
|
{
|
||||||
if
|
if
|
||||||
(
|
(
|
||||||
solverPerf.nIterations() >= maxIter_
|
solverPerf.nIterations() >= maxIter_
|
||||||
|
|
|
@ -107,6 +107,15 @@ public:
|
||||||
|
|
||||||
// Member Functions
|
// Member Functions
|
||||||
|
|
||||||
|
// Access
|
||||||
|
|
||||||
|
//- Return true if interface is coupled
|
||||||
|
virtual bool coupled() const
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Agglomeration
|
// Agglomeration
|
||||||
|
|
||||||
//- Agglomerating the given fine-level coefficients and return
|
//- Agglomerating the given fine-level coefficients and return
|
||||||
|
|
|
@ -39,6 +39,7 @@ Contributor
|
||||||
#include "polyMesh.H"
|
#include "polyMesh.H"
|
||||||
#include "Time.H"
|
#include "Time.H"
|
||||||
#include "standAlonePatch.H"
|
#include "standAlonePatch.H"
|
||||||
|
#include "indirectPrimitivePatch.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -124,8 +125,7 @@ void Foam::cyclicGgiPolyPatch::checkDefinition() const
|
||||||
cyclicShadow().localFaces(),
|
cyclicShadow().localFaces(),
|
||||||
transformedPoints
|
transformedPoints
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -302,6 +302,75 @@ void Foam::cyclicGgiPolyPatch::calcTransforms()
|
||||||
{
|
{
|
||||||
separation_.setSize(0);
|
separation_.setSize(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (debug > 1 && master())
|
||||||
|
{
|
||||||
|
if (patchToPatch().uncoveredMasterFaces().size() > 0)
|
||||||
|
{
|
||||||
|
// Write uncovered master faces
|
||||||
|
Info<< "Writing uncovered master faces for patch "
|
||||||
|
<< name() << " as VTK." << endl;
|
||||||
|
|
||||||
|
const polyMesh& mesh = boundaryMesh().mesh();
|
||||||
|
|
||||||
|
fileName fvPath(mesh.time().path()/"VTK");
|
||||||
|
mkDir(fvPath);
|
||||||
|
|
||||||
|
indirectPrimitivePatch::writeVTK
|
||||||
|
(
|
||||||
|
fvPath/fileName("uncoveredCyclicGgiFaces" + name()),
|
||||||
|
IndirectList<face>
|
||||||
|
(
|
||||||
|
localFaces(),
|
||||||
|
patchToPatch().uncoveredMasterFaces()
|
||||||
|
),
|
||||||
|
localPoints()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (patchToPatch().uncoveredSlaveFaces().size() > 0)
|
||||||
|
{
|
||||||
|
// Write uncovered master faces
|
||||||
|
Info<< "Writing uncovered shadow faces for patch "
|
||||||
|
<< shadowName() << " as VTK." << endl;
|
||||||
|
|
||||||
|
const polyMesh& mesh = boundaryMesh().mesh();
|
||||||
|
|
||||||
|
fileName fvPath(mesh.time().path()/"VTK");
|
||||||
|
mkDir(fvPath);
|
||||||
|
|
||||||
|
indirectPrimitivePatch::writeVTK
|
||||||
|
(
|
||||||
|
fvPath/fileName("uncoveredCyclicGgiFaces" + shadowName()),
|
||||||
|
IndirectList<face>
|
||||||
|
(
|
||||||
|
shadow().localFaces(),
|
||||||
|
patchToPatch().uncoveredSlaveFaces()
|
||||||
|
),
|
||||||
|
shadow().localPoints()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for bridge overlap
|
||||||
|
if (!bridgeOverlap())
|
||||||
|
{
|
||||||
|
if
|
||||||
|
(
|
||||||
|
patchToPatch().uncoveredMasterFaces().size() > 0
|
||||||
|
|| patchToPatch().uncoveredSlaveFaces().size() > 0
|
||||||
|
)
|
||||||
|
{
|
||||||
|
FatalErrorIn("label cyclicGgiPolyPatch::shadowIndex() const")
|
||||||
|
<< "cyclic ggi patch " << name() << " with shadow "
|
||||||
|
<< shadowName() << " has "
|
||||||
|
<< patchToPatch().uncoveredMasterFaces().size()
|
||||||
|
<< " uncovered master faces and "
|
||||||
|
<< patchToPatch().uncoveredSlaveFaces().size()
|
||||||
|
<< " uncovered slave faces. Bridging is switched off. "
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -854,10 +854,6 @@ void Foam::ggiPolyPatch::calcTransforms()
|
||||||
|
|
||||||
if (debug > 1 && master())
|
if (debug > 1 && master())
|
||||||
{
|
{
|
||||||
Info<< "Writing transformed slave patch as VTK." << nl
|
|
||||||
<< "Master: " << name()
|
|
||||||
<< " Slave: " << shadowName() << endl;
|
|
||||||
|
|
||||||
if (patchToPatch().uncoveredMasterFaces().size() > 0)
|
if (patchToPatch().uncoveredMasterFaces().size() > 0)
|
||||||
{
|
{
|
||||||
// Write uncovered master faces
|
// Write uncovered master faces
|
||||||
|
|
|
@ -217,7 +217,7 @@ Foam::mixingPlanePolyPatch::mixingPlanePolyPatch
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
coupledPolyPatch(name, size, start, index, bm),
|
coupledPolyPatch(name, size, start, index, bm),
|
||||||
shadowName_("_initialize_me_"),
|
shadowName_(fileName::null),
|
||||||
csPtr_
|
csPtr_
|
||||||
(
|
(
|
||||||
new coordinateSystem
|
new coordinateSystem
|
||||||
|
@ -500,6 +500,18 @@ Foam::mixingPlanePolyPatch::reconFaceCellCentres() const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::mixingPlanePolyPatch::initAddressing()
|
||||||
|
{
|
||||||
|
polyPatch::initAddressing();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Foam::mixingPlanePolyPatch::calcAddressing()
|
||||||
|
{
|
||||||
|
polyPatch::calcAddressing();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Foam::mixingPlanePolyPatch::initGeometry()
|
void Foam::mixingPlanePolyPatch::initGeometry()
|
||||||
{
|
{
|
||||||
polyPatch::initGeometry();
|
polyPatch::initGeometry();
|
||||||
|
|
|
@ -112,6 +112,15 @@ protected:
|
||||||
|
|
||||||
// Protected Member functions
|
// Protected Member functions
|
||||||
|
|
||||||
|
//- Is the mixing plane active? (zone and shadow present)
|
||||||
|
// bool active() const;
|
||||||
|
|
||||||
|
//- Initialise the calculation of the patch addressing
|
||||||
|
virtual void initAddressing();
|
||||||
|
|
||||||
|
//- Calculate the patch addressing
|
||||||
|
virtual void calcAddressing();
|
||||||
|
|
||||||
//- Initialise the calculation of the patch geometry
|
//- Initialise the calculation of the patch geometry
|
||||||
virtual void initGeometry();
|
virtual void initGeometry();
|
||||||
|
|
||||||
|
|
|
@ -217,7 +217,7 @@ void Foam::processorPolyPatch::calcGeometry()
|
||||||
<< 100*mag(magSf - nbrMagSf)/avSf
|
<< 100*mag(magSf - nbrMagSf)/avSf
|
||||||
<< "% -- possible face ordering problem." << endl
|
<< "% -- possible face ordering problem." << endl
|
||||||
<< "patch: " << name()
|
<< "patch: " << name()
|
||||||
<< " my area:" << magSf
|
<< " my area: " << magSf
|
||||||
<< " neighbour area: " << nbrMagSf
|
<< " neighbour area: " << nbrMagSf
|
||||||
<< " matching tolerance: " << polyPatch::matchTol_
|
<< " matching tolerance: " << polyPatch::matchTol_
|
||||||
<< endl
|
<< endl
|
||||||
|
|
|
@ -201,12 +201,6 @@ vector eigenValues(const tensor& t)
|
||||||
|
|
||||||
vector eigenVector(const tensor& t, const scalar lambda)
|
vector eigenVector(const tensor& t, const scalar lambda)
|
||||||
{
|
{
|
||||||
// Not sure if this is OK. HJ, 9/Jul/2010
|
|
||||||
// if (mag(lambda) < SMALL)
|
|
||||||
// {
|
|
||||||
// return vector::zero;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Construct the matrix for the eigenvector problem
|
// Construct the matrix for the eigenvector problem
|
||||||
tensor A(t - lambda*I);
|
tensor A(t - lambda*I);
|
||||||
|
|
||||||
|
|
|
@ -27,21 +27,24 @@ Primitive
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Direction is an integer type used to represent the Cartesian directions
|
Direction is an integer type used to represent the Cartesian directions
|
||||||
etc. Currently it is a typedef to char which is limited to the range
|
etc. Due to the extension of block matrix with lots of components
|
||||||
(0, 255) which should be adequate.
|
this is upgraded to unsigned int. Request by David Gaden, 25/Nov/2012
|
||||||
|
HJ, 31/May/2012
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#ifndef direction_H
|
#ifndef direction_H
|
||||||
#define direction_H
|
#define direction_H
|
||||||
|
|
||||||
#include "char.H"
|
#include "int.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
namespace Foam
|
namespace Foam
|
||||||
{
|
{
|
||||||
typedef unsigned char direction;
|
// typedef unsigned char direction;
|
||||||
|
// HJ, 31/May/2012
|
||||||
|
typedef unsigned int direction;
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
|
@ -89,8 +89,8 @@ public:
|
||||||
void randomise(symmTensor&);
|
void randomise(symmTensor&);
|
||||||
void randomise(tensor&);
|
void randomise(tensor&);
|
||||||
|
|
||||||
//- Return a normal Gaussian randon number
|
//- Return a normal Gaussian random number
|
||||||
// with zero mean and unity variance N(0, 1)
|
// with zero mean and unit variance N(0, 1)
|
||||||
scalar GaussNormal();
|
scalar GaussNormal();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -208,8 +208,9 @@ Foam::coupledSolverPerformance Foam::coupledBicgStabSolver::solve
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute preconditioning transpose
|
// Execute preconditioning
|
||||||
preconPtr_->preconditionT(sh, s, cmpt);
|
// Bug fix, Alexander Monakov, 11/Jul/2012
|
||||||
|
preconPtr_->precondition(sh, s, cmpt);
|
||||||
matrix_.Amul(t, sh, bouCoeffs_, interfaces_, cmpt);
|
matrix_.Amul(t, sh, bouCoeffs_, interfaces_, cmpt);
|
||||||
omega = gSumProd(t, s)/gSumProd(t, t);
|
omega = gSumProd(t, s)/gSumProd(t, t);
|
||||||
|
|
||||||
|
|
|
@ -582,17 +582,12 @@ Foam::faMesh::faMesh
|
||||||
// Check for processor edges
|
// Check for processor edges
|
||||||
labelList allUndefEdges = tmpList;
|
labelList allUndefEdges = tmpList;
|
||||||
labelList ngbPolyPatch(allUndefEdges.size(), -1);
|
labelList ngbPolyPatch(allUndefEdges.size(), -1);
|
||||||
<<<<<<< HEAD
|
|
||||||
forAll (ngbPolyPatch, edgeI)
|
forAll (ngbPolyPatch, edgeI)
|
||||||
=======
|
|
||||||
forAll(ngbPolyPatch, edgeI)
|
|
||||||
>>>>>>> parallelTopo
|
|
||||||
{
|
{
|
||||||
label curEdge = allUndefEdges[edgeI];
|
label curEdge = allUndefEdges[edgeI];
|
||||||
|
|
||||||
label curPMeshEdge = meshEdges[curEdge];
|
label curPMeshEdge = meshEdges[curEdge];
|
||||||
|
|
||||||
<<<<<<< HEAD
|
|
||||||
forAll (edgeFaces[curPMeshEdge], faceI)
|
forAll (edgeFaces[curPMeshEdge], faceI)
|
||||||
{
|
{
|
||||||
label curFace = edgeFaces[curPMeshEdge][faceI];
|
label curFace = edgeFaces[curPMeshEdge][faceI];
|
||||||
|
@ -602,22 +597,10 @@ Foam::faMesh::faMesh
|
||||||
label polyPatchID =
|
label polyPatchID =
|
||||||
pMesh.boundaryMesh().whichPatch(curFace);
|
pMesh.boundaryMesh().whichPatch(curFace);
|
||||||
|
|
||||||
=======
|
|
||||||
forAll(edgeFaces[curPMeshEdge], faceI)
|
|
||||||
{
|
|
||||||
label curFace = edgeFaces[curPMeshEdge][faceI];
|
|
||||||
|
|
||||||
if (findIndex(faceLabels_, curFace) == -1)
|
|
||||||
{
|
|
||||||
label polyPatchID =
|
|
||||||
m.boundaryMesh().whichPatch(curFace);
|
|
||||||
|
|
||||||
>>>>>>> parallelTopo
|
|
||||||
if (polyPatchID != -1)
|
if (polyPatchID != -1)
|
||||||
{
|
{
|
||||||
ngbPolyPatch[edgeI] = polyPatchID;
|
ngbPolyPatch[edgeI] = polyPatchID;
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -637,25 +620,6 @@ Foam::faMesh::faMesh
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (!processorPatchSet.found(ngbPolyPatch[edgeI]))
|
if (!processorPatchSet.found(ngbPolyPatch[edgeI]))
|
||||||
=======
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Count ngb processorPolyPatch-es
|
|
||||||
labelHashSet processorPatchSet;
|
|
||||||
forAll(ngbPolyPatch, edgeI)
|
|
||||||
{
|
|
||||||
if (ngbPolyPatch[edgeI] != -1)
|
|
||||||
{
|
|
||||||
if
|
|
||||||
(
|
|
||||||
m.boundaryMesh()[ngbPolyPatch[edgeI]].type()
|
|
||||||
== processorPolyPatch::typeName
|
|
||||||
)
|
|
||||||
{
|
|
||||||
if(!processorPatchSet.found(ngbPolyPatch[edgeI]))
|
|
||||||
>>>>>>> parallelTopo
|
|
||||||
{
|
{
|
||||||
processorPatchSet.insert(ngbPolyPatch[edgeI]);
|
processorPatchSet.insert(ngbPolyPatch[edgeI]);
|
||||||
}
|
}
|
||||||
|
@ -665,11 +629,7 @@ Foam::faMesh::faMesh
|
||||||
labelList processorPatches(processorPatchSet.toc());
|
labelList processorPatches(processorPatchSet.toc());
|
||||||
faPatches.setSize(faPatches.size() + processorPatches.size());
|
faPatches.setSize(faPatches.size() + processorPatches.size());
|
||||||
|
|
||||||
<<<<<<< HEAD
|
for (label i = 0; i < processorPatches.size(); i++)
|
||||||
for (label i=0; i<processorPatches.size(); i++)
|
|
||||||
=======
|
|
||||||
for(label i=0; i<processorPatches.size(); i++)
|
|
||||||
>>>>>>> parallelTopo
|
|
||||||
{
|
{
|
||||||
SLList<label> tmpLst;
|
SLList<label> tmpLst;
|
||||||
|
|
||||||
|
@ -680,7 +640,6 @@ Foam::faMesh::faMesh
|
||||||
tmpLst.append(allUndefEdges[eI]);
|
tmpLst.append(allUndefEdges[eI]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
|
|
||||||
faPatches[faPatchNames.size() + i].edgeLabels_ = tmpLst;
|
faPatches[faPatchNames.size() + i].edgeLabels_ = tmpLst;
|
||||||
|
|
||||||
|
@ -690,31 +649,18 @@ Foam::faMesh::faMesh
|
||||||
faPatches[faPatchNames.size() + i].type_ =
|
faPatches[faPatchNames.size() + i].type_ =
|
||||||
processorFaPatch::typeName;
|
processorFaPatch::typeName;
|
||||||
|
|
||||||
=======
|
|
||||||
|
|
||||||
faPatches[faPatchNames.size() + i].edgeLabels_ = tmpLst;
|
|
||||||
faPatches[faPatchNames.size() + i].name_ =
|
|
||||||
m.boundaryMesh()[processorPatches[i]].name();
|
|
||||||
faPatches[faPatchNames.size() + i].type_ =
|
|
||||||
processorFaPatch::typeName;
|
|
||||||
>>>>>>> parallelTopo
|
|
||||||
faPatches[faPatchNames.size() + i].ngbPolyPatchID_ =
|
faPatches[faPatchNames.size() + i].ngbPolyPatchID_ =
|
||||||
processorPatches[i];
|
processorPatches[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remaining undefined edges
|
// Remaining undefined edges
|
||||||
SLList<label> undefEdges;
|
SLList<label> undefEdges;
|
||||||
<<<<<<< HEAD
|
|
||||||
forAll (ngbPolyPatch, eI)
|
forAll (ngbPolyPatch, eI)
|
||||||
=======
|
|
||||||
forAll(ngbPolyPatch, eI)
|
|
||||||
>>>>>>> parallelTopo
|
|
||||||
{
|
{
|
||||||
if (ngbPolyPatch[eI] == -1)
|
if (ngbPolyPatch[eI] == -1)
|
||||||
{
|
{
|
||||||
undefEdges.append(allUndefEdges[eI]);
|
undefEdges.append(allUndefEdges[eI]);
|
||||||
}
|
}
|
||||||
<<<<<<< HEAD
|
|
||||||
else if
|
else if
|
||||||
(
|
(
|
||||||
!isA<processorPolyPatch>
|
!isA<processorPolyPatch>
|
||||||
|
@ -724,15 +670,6 @@ Foam::faMesh::faMesh
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
undefEdges.append(allUndefEdges[eI]);
|
undefEdges.append(allUndefEdges[eI]);
|
||||||
=======
|
|
||||||
else if
|
|
||||||
(
|
|
||||||
m.boundaryMesh()[ngbPolyPatch[eI]].type()
|
|
||||||
!= processorPolyPatch::typeName
|
|
||||||
)
|
|
||||||
{
|
|
||||||
undefEdges.append(allUndefEdges[eI]);
|
|
||||||
>>>>>>> parallelTopo
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -746,7 +683,6 @@ Foam::faMesh::faMesh
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<<<<<<< HEAD
|
|
||||||
faPatches.setSize(faPatches.size() - 1);
|
faPatches.setSize(faPatches.size() - 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -796,60 +732,8 @@ Foam::faMesh::faMesh
|
||||||
}
|
}
|
||||||
|
|
||||||
faPatches[patchI].edgeLabels_ = reorderedEdgeLabels;
|
faPatches[patchI].edgeLabels_ = reorderedEdgeLabels;
|
||||||
=======
|
|
||||||
faPatches.setSize(faPatches.size()-1);
|
|
||||||
>>>>>>> parallelTopo
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
faPatches.setSize(faPatches.size()-1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Reorder processorFaPatch using
|
|
||||||
// ordering of ngb processorPolyPatch
|
|
||||||
forAll(faPatches, patchI)
|
|
||||||
{
|
|
||||||
if (faPatches[patchI].type_ == processorFaPatch::typeName)
|
|
||||||
{
|
|
||||||
labelList ngbFaces(faPatches[patchI].edgeLabels_.size(), -1);
|
|
||||||
|
|
||||||
forAll(ngbFaces, edgeI)
|
|
||||||
{
|
|
||||||
label curEdge = faPatches[patchI].edgeLabels_[edgeI];
|
|
||||||
|
|
||||||
label curPMeshEdge = meshEdges[curEdge];
|
|
||||||
|
|
||||||
forAll(edgeFaces[curPMeshEdge], faceI)
|
|
||||||
{
|
|
||||||
label curFace = edgeFaces[curPMeshEdge][faceI];
|
|
||||||
|
|
||||||
label curPatchID =
|
|
||||||
m.boundaryMesh().whichPatch(curFace);
|
|
||||||
|
|
||||||
if (curPatchID == faPatches[patchI].ngbPolyPatchID_)
|
|
||||||
{
|
|
||||||
ngbFaces[edgeI] = curFace;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
SortableList<label> sortedNgbFaces(ngbFaces);
|
|
||||||
labelList reorderedEdgeLabels(ngbFaces.size(), -1);
|
|
||||||
for (label i=0; i<reorderedEdgeLabels.size(); i++)
|
|
||||||
{
|
|
||||||
reorderedEdgeLabels[i] =
|
|
||||||
faPatches[patchI].edgeLabels_
|
|
||||||
[
|
|
||||||
sortedNgbFaces.indices()[i]
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
faPatches[patchI].edgeLabels_ = reorderedEdgeLabels;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Add good patches to faMesh
|
// Add good patches to faMesh
|
||||||
|
@ -870,7 +754,6 @@ Foam::faMesh::faMesh
|
||||||
if (faPatches[pI].ngbPolyPatchID_ == -1)
|
if (faPatches[pI].ngbPolyPatchID_ == -1)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
<<<<<<< HEAD
|
|
||||||
(
|
(
|
||||||
"void faMesh::faMesh(const polyMesh&, const fileName&)"
|
"void faMesh::faMesh(const polyMesh&, const fileName&)"
|
||||||
)
|
)
|
||||||
|
@ -883,30 +766,12 @@ Foam::faMesh::faMesh
|
||||||
refCast<const processorPolyPatch>
|
refCast<const processorPolyPatch>
|
||||||
(
|
(
|
||||||
pMesh.boundaryMesh()[faPatches[pI].ngbPolyPatchID_]
|
pMesh.boundaryMesh()[faPatches[pI].ngbPolyPatchID_]
|
||||||
=======
|
|
||||||
(
|
|
||||||
"void faMesh::faMesh(const polyMesh&, const fileName&)"
|
|
||||||
)
|
|
||||||
<< "ngbPolyPatch is not defined for processorFaPatch: "
|
|
||||||
<< faPatches[pI].name_
|
|
||||||
<< abort(FatalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
const processorPolyPatch& procPolyPatch =
|
|
||||||
refCast<const processorPolyPatch>
|
|
||||||
(
|
|
||||||
m.boundaryMesh()[faPatches[pI].ngbPolyPatchID_]
|
|
||||||
>>>>>>> parallelTopo
|
|
||||||
);
|
);
|
||||||
|
|
||||||
faPatches[pI].dict_.add("myProcNo", procPolyPatch.myProcNo());
|
faPatches[pI].dict_.add("myProcNo", procPolyPatch.myProcNo());
|
||||||
faPatches[pI].dict_.add
|
faPatches[pI].dict_.add
|
||||||
(
|
(
|
||||||
<<<<<<< HEAD
|
|
||||||
"neighbProcNo",
|
"neighbProcNo",
|
||||||
=======
|
|
||||||
"neighbProcNo",
|
|
||||||
>>>>>>> parallelTopo
|
|
||||||
procPolyPatch.neighbProcNo()
|
procPolyPatch.neighbProcNo()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ $(constraintFvPatchFields)/ggi/ggiFvPatchFields.C
|
||||||
$(constraintFvPatchFields)/cyclicGgi/cyclicGgiFvPatchFields.C
|
$(constraintFvPatchFields)/cyclicGgi/cyclicGgiFvPatchFields.C
|
||||||
$(constraintFvPatchFields)/overlapGgi/overlapGgiFvPatchFields.C
|
$(constraintFvPatchFields)/overlapGgi/overlapGgiFvPatchFields.C
|
||||||
$(constraintFvPatchFields)/mixingPlane/mixingPlaneFvPatchFields.C
|
$(constraintFvPatchFields)/mixingPlane/mixingPlaneFvPatchFields.C
|
||||||
$(constraintFvPatchFields)/regionCouple/regionCoupleFvPatchFields.C
|
$(constraintFvPatchFields)/regionCoupling/regionCouplingFvPatchFields.C
|
||||||
|
|
||||||
derivedFvPatchFields = $(fvPatchFields)/derived
|
derivedFvPatchFields = $(fvPatchFields)/derived
|
||||||
$(derivedFvPatchFields)/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C
|
$(derivedFvPatchFields)/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C
|
||||||
|
@ -187,13 +187,8 @@ $(constraintFvsPatchFields)/wedge/wedgeFvsPatchFields.C
|
||||||
$(constraintFvsPatchFields)/ggi/ggiFvsPatchFields.C
|
$(constraintFvsPatchFields)/ggi/ggiFvsPatchFields.C
|
||||||
$(constraintFvsPatchFields)/cyclicGgi/cyclicGgiFvsPatchFields.C
|
$(constraintFvsPatchFields)/cyclicGgi/cyclicGgiFvsPatchFields.C
|
||||||
$(constraintFvsPatchFields)/overlapGgi/overlapGgiFvsPatchFields.C
|
$(constraintFvsPatchFields)/overlapGgi/overlapGgiFvsPatchFields.C
|
||||||
<<<<<<< HEAD
|
|
||||||
$(constraintFvsPatchFields)/regionCoupling/regionCouplingFvsPatchFields.C
|
|
||||||
=======
|
|
||||||
$(constraintFvsPatchFields)/mixingPlane/mixingPlaneFvsPatchFields.C
|
$(constraintFvsPatchFields)/mixingPlane/mixingPlaneFvsPatchFields.C
|
||||||
$(constraintFvsPatchFields)/regionCouple/regionCoupleFvsPatchFields.C
|
$(constraintFvsPatchFields)/regionCoupling/regionCouplingFvsPatchFields.C
|
||||||
>>>>>>> remotes/origin/mixingPlane_RC1
|
|
||||||
|
|
||||||
|
|
||||||
fields/volFields/volFields.C
|
fields/volFields/volFields.C
|
||||||
fields/surfaceFields/surfaceFields.C
|
fields/surfaceFields/surfaceFields.C
|
||||||
|
@ -216,8 +211,6 @@ $(interpolation)/interpolationCellPointWallModified/makeInterpolationCellPointWa
|
||||||
volPointInterpolation = interpolation/volPointInterpolation
|
volPointInterpolation = interpolation/volPointInterpolation
|
||||||
$(volPointInterpolation)/pointPatchInterpolation/pointPatchInterpolation.C
|
$(volPointInterpolation)/pointPatchInterpolation/pointPatchInterpolation.C
|
||||||
$(volPointInterpolation)/volPointInterpolation.C
|
$(volPointInterpolation)/volPointInterpolation.C
|
||||||
interpolation/pointVolInterpolation/pointVolInterpolation.C
|
|
||||||
|
|
||||||
|
|
||||||
pointVolInterpolation = interpolation/pointVolInterpolation
|
pointVolInterpolation = interpolation/pointVolInterpolation
|
||||||
$(pointVolInterpolation)/pointVolInterpolation.C
|
$(pointVolInterpolation)/pointVolInterpolation.C
|
||||||
|
@ -351,6 +344,11 @@ $(convectionSchemes)/noConvectionScheme/noConvectionSchemes.C
|
||||||
$(convectionSchemes)/explicitConvectionScheme/explicitConvectionSchemes.C
|
$(convectionSchemes)/explicitConvectionScheme/explicitConvectionSchemes.C
|
||||||
$(convectionSchemes)/multivariateGaussConvectionScheme/multivariateGaussConvectionSchemes.C
|
$(convectionSchemes)/multivariateGaussConvectionScheme/multivariateGaussConvectionSchemes.C
|
||||||
|
|
||||||
|
adjConvectionSchemes = finiteVolume/adjConvectionSchemes
|
||||||
|
$(adjConvectionSchemes)/adjConvectionScheme/adjConvectionSchemes.C
|
||||||
|
$(adjConvectionSchemes)/noAdjConvectionScheme/noAdjConvectionSchemes.C
|
||||||
|
$(adjConvectionSchemes)/explicitAdjConvectionScheme/explicitAdjConvectionSchemes.C
|
||||||
|
|
||||||
laplacianSchemes = finiteVolume/laplacianSchemes
|
laplacianSchemes = finiteVolume/laplacianSchemes
|
||||||
$(laplacianSchemes)/laplacianScheme/laplacianSchemes.C
|
$(laplacianSchemes)/laplacianScheme/laplacianSchemes.C
|
||||||
$(laplacianSchemes)/gaussLaplacianScheme/gaussLaplacianSchemes.C
|
$(laplacianSchemes)/gaussLaplacianScheme/gaussLaplacianSchemes.C
|
||||||
|
|
|
@ -129,6 +129,10 @@ bool Foam::adjustPhi
|
||||||
> closedDomainTol*Foam::max(1.0, mag(massIn))
|
> closedDomainTol*Foam::max(1.0, mag(massIn))
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
phi.write();
|
||||||
|
U.write();
|
||||||
|
p.write();
|
||||||
|
|
||||||
// Cannot adjust
|
// Cannot adjust
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
|
|
|
@ -91,7 +91,7 @@ void Foam::boundMinMax
|
||||||
),
|
),
|
||||||
vsf0.value()
|
vsf0.value()
|
||||||
);
|
);
|
||||||
|
Info<< "new min: " << gMin(vsf.internalField()) << endl;
|
||||||
vsf.correctBoundaryConditions();
|
vsf.correctBoundaryConditions();
|
||||||
vsf.boundaryField() = max(vsf.boundaryField(), vsf0.value());
|
vsf.boundaryField() = max(vsf.boundaryField(), vsf0.value());
|
||||||
}
|
}
|
||||||
|
@ -111,7 +111,7 @@ void Foam::boundMinMax
|
||||||
),
|
),
|
||||||
vsf1.value()
|
vsf1.value()
|
||||||
);
|
);
|
||||||
|
Info<< "new max: " << gMax(vsf.internalField()) << endl;
|
||||||
vsf.correctBoundaryConditions();
|
vsf.correctBoundaryConditions();
|
||||||
vsf.boundaryField() = min(vsf.boundaryField(), vsf1.value());
|
vsf.boundaryField() = min(vsf.boundaryField(), vsf1.value());
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,11 +41,11 @@ if (mesh.nInternalFaces())
|
||||||
surfaceScalarField SfUfbyDelta =
|
surfaceScalarField SfUfbyDelta =
|
||||||
mesh.surfaceInterpolation::deltaCoeffs()*magPhi;
|
mesh.surfaceInterpolation::deltaCoeffs()*magPhi;
|
||||||
|
|
||||||
CoNum = max(SfUfbyDelta/mesh.magSf())
|
const scalar deltaT = runTime.deltaT().value();
|
||||||
.value()*runTime.deltaT().value();
|
|
||||||
|
|
||||||
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf()))
|
CoNum = max(SfUfbyDelta/mesh.magSf()).value()*deltaT;
|
||||||
.value()*runTime.deltaT().value();
|
|
||||||
|
meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())).value()*deltaT;
|
||||||
|
|
||||||
velMag = max(magPhi/mesh.magSf()).value();
|
velMag = max(magPhi/mesh.magSf()).value();
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ fixedValueFvPatchField<Type>::fixedValueFvPatchField
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
fvPatchField<Type>(p, iF, dict, true)
|
fvPatchField<Type>(p, iF, dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,6 @@ License
|
||||||
#include "volFields.H"
|
#include "volFields.H"
|
||||||
#include "surfaceFields.H"
|
#include "surfaceFields.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Foam::fluxCorrectedVelocityFvPatchVectorField::
|
Foam::fluxCorrectedVelocityFvPatchVectorField::
|
||||||
|
|
|
@ -169,7 +169,7 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs(const vectorField& Up)
|
||||||
}
|
}
|
||||||
else if (rhoName_ == "none")
|
else if (rhoName_ == "none")
|
||||||
{
|
{
|
||||||
const fvPatchField<scalar>& psip =
|
const fvPatchScalarField& psip =
|
||||||
lookupPatchField<volScalarField, scalar>(psiName_);
|
lookupPatchField<volScalarField, scalar>(psiName_);
|
||||||
|
|
||||||
if (gamma_ > 1.0)
|
if (gamma_ > 1.0)
|
||||||
|
@ -193,7 +193,7 @@ void Foam::totalPressureFvPatchScalarField::updateCoeffs(const vectorField& Up)
|
||||||
}
|
}
|
||||||
else if (psiName_ == "none")
|
else if (psiName_ == "none")
|
||||||
{
|
{
|
||||||
const fvPatchField<scalar>& rho =
|
const fvPatchScalarField& rho =
|
||||||
lookupPatchField<volScalarField, scalar>(rhoName_);
|
lookupPatchField<volScalarField, scalar>(rhoName_);
|
||||||
|
|
||||||
operator==(p0_ - 0.5*rho*(1.0 - pos(phip))*magSqr(Up));
|
operator==(p0_ - 0.5*rho*(1.0 - pos(phip))*magSqr(Up));
|
||||||
|
|
|
@ -301,9 +301,15 @@ public:
|
||||||
return internalField_;
|
return internalField_;
|
||||||
}
|
}
|
||||||
|
|
||||||
//- Return the type of the calculated for of fvPatchField
|
//- Return the type of the calculated for type of fvPatchField
|
||||||
static const word& calculatedType();
|
static const word& calculatedType();
|
||||||
|
|
||||||
|
//- Return patch type (optional on read)
|
||||||
|
const word& patchType() const
|
||||||
|
{
|
||||||
|
return patchType_;
|
||||||
|
}
|
||||||
|
|
||||||
//- Return true if this patch field fixes a value.
|
//- Return true if this patch field fixes a value.
|
||||||
// Needed to check if a level has to be specified while solving
|
// Needed to check if a level has to be specified while solving
|
||||||
// Poissons equations.
|
// Poissons equations.
|
||||||
|
|
|
@ -24,6 +24,7 @@ License
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
|
@ -137,8 +138,9 @@ Foam::tmp<Foam::fvPatchField<Type> > Foam::fvPatchField<Type>::New
|
||||||
"const DimensionedField<Type, volMesh>&, "
|
"const DimensionedField<Type, volMesh>&, "
|
||||||
"const dictionary&)",
|
"const dictionary&)",
|
||||||
dict
|
dict
|
||||||
) << "inconsistent patch and patchField types for \n"
|
) << "inconsistent patch and patchField types for field "
|
||||||
" patch type " << p.type()
|
<< iF.name() << "\n"
|
||||||
|
<< " patch type " << p.type()
|
||||||
<< " and patchField type " << patchFieldType
|
<< " and patchField type " << patchFieldType
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
|
@ -149,8 +149,9 @@ tmp<fvsPatchField<Type> > fvsPatchField<Type>::New
|
||||||
"const DimensionedField<Type, surfaceMesh>&, "
|
"const DimensionedField<Type, surfaceMesh>&, "
|
||||||
"const dictionary&)",
|
"const dictionary&)",
|
||||||
dict
|
dict
|
||||||
) << "inconsistent patch and patchField types for \n"
|
) << "inconsistent patch and patchField types for field "
|
||||||
" patch type " << p.type()
|
<< iF.name() << "\n"
|
||||||
|
<< " patch type " << p.type()
|
||||||
<< " and patchField type " << patchFieldType
|
<< " and patchField type " << patchFieldType
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,140 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright held by original author
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Description
|
||||||
|
Abstract base class for finite volume calculus adjConvection schemes.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "fv.H"
|
||||||
|
#include "HashTable.H"
|
||||||
|
#include "linear.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace fv
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
adjConvectionScheme<Type>::adjConvectionScheme(const adjConvectionScheme& cs)
|
||||||
|
:
|
||||||
|
refCount(),
|
||||||
|
mesh_(cs.mesh_)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<adjConvectionScheme<Type> > adjConvectionScheme<Type>::New
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const volVectorField& Up,
|
||||||
|
Istream& schemeData
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if (fv::debug)
|
||||||
|
{
|
||||||
|
Info<< "adjConvectionScheme<Type>::New"
|
||||||
|
"(const fvMesh&, const volVectorField&, Istream&) : "
|
||||||
|
"constructing adjConvectionScheme<Type>"
|
||||||
|
<< endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (schemeData.eof())
|
||||||
|
{
|
||||||
|
FatalIOErrorIn
|
||||||
|
(
|
||||||
|
"adjConvectionScheme<Type>::New"
|
||||||
|
"(const fvMesh&, const volVectorField&, Istream&)",
|
||||||
|
schemeData
|
||||||
|
) << "AdjConvection scheme not specified" << endl << endl
|
||||||
|
<< "Valid adjConvection schemes are :" << endl
|
||||||
|
<< IstreamConstructorTablePtr_->toc()
|
||||||
|
<< exit(FatalIOError);
|
||||||
|
}
|
||||||
|
|
||||||
|
word schemeName(schemeData);
|
||||||
|
|
||||||
|
typename IstreamConstructorTable::iterator cstrIter =
|
||||||
|
IstreamConstructorTablePtr_->find(schemeName);
|
||||||
|
|
||||||
|
if (cstrIter == IstreamConstructorTablePtr_->end())
|
||||||
|
{
|
||||||
|
FatalIOErrorIn
|
||||||
|
(
|
||||||
|
"adjConvectionScheme<Type>::New"
|
||||||
|
"(const fvMesh&, const volVectorField&, Istream&)",
|
||||||
|
schemeData
|
||||||
|
) << "unknown adjConvection scheme " << schemeName << endl << endl
|
||||||
|
<< "Valid adjConvection schemes are :" << endl
|
||||||
|
<< IstreamConstructorTablePtr_->toc()
|
||||||
|
<< exit(FatalIOError);
|
||||||
|
}
|
||||||
|
|
||||||
|
return cstrIter()(mesh, Up, schemeData);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
adjConvectionScheme<Type>::~adjConvectionScheme()
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
void adjConvectionScheme<Type>::operator=(const adjConvectionScheme<Type>& cs)
|
||||||
|
{
|
||||||
|
if (this == &cs)
|
||||||
|
{
|
||||||
|
FatalErrorIn
|
||||||
|
(
|
||||||
|
"adjConvectionScheme<Type>::operator="
|
||||||
|
"(const adjConvectionScheme<Type>&)"
|
||||||
|
) << "attempted assignment to self"
|
||||||
|
<< abort(FatalError);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace fv
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -0,0 +1,190 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright held by original author
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::fv::adjConvectionScheme
|
||||||
|
|
||||||
|
Description
|
||||||
|
Abstract base class for adjConvection schemes.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
adjConvectionScheme.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef adjConvectionScheme_H
|
||||||
|
#define adjConvectionScheme_H
|
||||||
|
|
||||||
|
#include "tmp.H"
|
||||||
|
#include "volFieldsFwd.H"
|
||||||
|
#include "surfaceFieldsFwd.H"
|
||||||
|
#include "typeInfo.H"
|
||||||
|
#include "runTimeSelectionTables.H"
|
||||||
|
#include "multivariateSurfaceInterpolationScheme.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class fvMatrix;
|
||||||
|
|
||||||
|
class fvMesh;
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace fv
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class adjConvectionScheme Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class adjConvectionScheme
|
||||||
|
:
|
||||||
|
public refCount
|
||||||
|
{
|
||||||
|
// Private data
|
||||||
|
|
||||||
|
const fvMesh& mesh_;
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
virtual const word& type() const = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// Declare run-time constructor selection tables
|
||||||
|
|
||||||
|
declareRunTimeSelectionTable
|
||||||
|
(
|
||||||
|
tmp,
|
||||||
|
adjConvectionScheme,
|
||||||
|
Istream,
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const volVectorField& Up,
|
||||||
|
Istream& schemeData
|
||||||
|
),
|
||||||
|
(mesh, Up, schemeData)
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Copy construct
|
||||||
|
adjConvectionScheme(const adjConvectionScheme&);
|
||||||
|
|
||||||
|
//- Construct from mesh, flux and Istream
|
||||||
|
adjConvectionScheme
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const volVectorField&
|
||||||
|
)
|
||||||
|
:
|
||||||
|
mesh_(mesh)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Selectors
|
||||||
|
|
||||||
|
//- Return a pointer to a new adjConvectionScheme created on freestore
|
||||||
|
static tmp<adjConvectionScheme<Type> > New
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const volVectorField& Up,
|
||||||
|
Istream& schemeData
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
// Destructor
|
||||||
|
|
||||||
|
virtual ~adjConvectionScheme();
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
//- Return mesh reference
|
||||||
|
const fvMesh& mesh() const
|
||||||
|
{
|
||||||
|
return mesh_;
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual tmp<fvMatrix<Type> > fvmAdjDiv
|
||||||
|
(
|
||||||
|
const volVectorField&,
|
||||||
|
GeometricField<Type, fvPatchField, volMesh>&
|
||||||
|
) const = 0;
|
||||||
|
|
||||||
|
virtual tmp<GeometricField<Type, fvPatchField, volMesh> > fvcAdjDiv
|
||||||
|
(
|
||||||
|
const volVectorField&,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>&
|
||||||
|
) const = 0;
|
||||||
|
|
||||||
|
|
||||||
|
// Member operators
|
||||||
|
|
||||||
|
void operator=(const adjConvectionScheme<Type>&);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace fv
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// Add the patch constructor functions to the hash tables
|
||||||
|
|
||||||
|
#define makeFvAdjConvectionTypeScheme(SS, Type) \
|
||||||
|
\
|
||||||
|
defineNamedTemplateTypeNameAndDebug(SS<Type>, 0); \
|
||||||
|
\
|
||||||
|
adjConvectionScheme<Type>::addIstreamConstructorToTable<SS<Type> > \
|
||||||
|
add##SS##Type##IstreamConstructorToTable_;
|
||||||
|
|
||||||
|
#define makeFvAdjConvectionScheme(SS) \
|
||||||
|
\
|
||||||
|
makeFvAdjConvectionTypeScheme(SS, vector)
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "adjConvectionScheme.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -0,0 +1,65 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright held by original author
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Description
|
||||||
|
Abstract base class for finite volume calculus adjConvection schemes.
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "adjConvectionScheme.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace fv
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
// Define the constructor function hash tables
|
||||||
|
|
||||||
|
#define makeBaseAdjConvectionScheme(Type) \
|
||||||
|
\
|
||||||
|
defineTemplateRunTimeSelectionTable \
|
||||||
|
( \
|
||||||
|
adjConvectionScheme<Type>, \
|
||||||
|
Istream \
|
||||||
|
); \
|
||||||
|
\
|
||||||
|
|
||||||
|
makeBaseAdjConvectionScheme(vector)
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace fv
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -0,0 +1,102 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright held by original author
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "explicitAdjConvectionScheme.H"
|
||||||
|
#include "fvcSurfaceIntegrate.H"
|
||||||
|
#include "fvMatrices.H"
|
||||||
|
#include "fvcGrad.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace fv
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<fvMatrix<Type> >
|
||||||
|
explicitAdjConvectionScheme<Type>::fvmAdjDiv
|
||||||
|
(
|
||||||
|
const volVectorField& Up,
|
||||||
|
GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<fvMatrix<Type> > tfvm
|
||||||
|
(
|
||||||
|
new fvMatrix<Type>
|
||||||
|
(
|
||||||
|
vf,
|
||||||
|
dimVol*Up.dimensions()*vf.dimensions()/dimLength
|
||||||
|
)
|
||||||
|
);
|
||||||
|
fvMatrix<Type>& fvm = tfvm();
|
||||||
|
|
||||||
|
// Matrix consistency
|
||||||
|
fvm.diag() = 0;
|
||||||
|
|
||||||
|
fvm += this->fvcAdjDiv(Up, vf);
|
||||||
|
|
||||||
|
return tfvm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
|
explicitAdjConvectionScheme<Type>::fvcAdjDiv
|
||||||
|
(
|
||||||
|
const volVectorField& Up,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
// Return Up & grad(vf).T()
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > tAdjConvection
|
||||||
|
(
|
||||||
|
fvc::grad(vf) & Up
|
||||||
|
);
|
||||||
|
|
||||||
|
tAdjConvection().rename
|
||||||
|
(
|
||||||
|
"adjConvection(" + Up.name() + ',' + vf.name() + ')'
|
||||||
|
);
|
||||||
|
|
||||||
|
return tAdjConvection;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace fv
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -0,0 +1,137 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright held by original author
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::fv::explicitAdjConvectionScheme
|
||||||
|
|
||||||
|
Description
|
||||||
|
AdjConvection scheme used to make adjConvection explicit without
|
||||||
|
recompilation
|
||||||
|
|
||||||
|
Author
|
||||||
|
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
explicitAdjConvectionScheme.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef explicitAdjConvectionScheme_H
|
||||||
|
#define explicitAdjConvectionScheme_H
|
||||||
|
|
||||||
|
#include "adjConvectionScheme.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace fv
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class explicitAdjConvectionScheme Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class explicitAdjConvectionScheme
|
||||||
|
:
|
||||||
|
public fv::adjConvectionScheme<Type>
|
||||||
|
{
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
explicitAdjConvectionScheme(const explicitAdjConvectionScheme&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const explicitAdjConvectionScheme&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("explicit");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from flux and interpolation scheme
|
||||||
|
explicitAdjConvectionScheme
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const volVectorField& Up
|
||||||
|
)
|
||||||
|
:
|
||||||
|
adjConvectionScheme<Type>(mesh, Up)
|
||||||
|
{}
|
||||||
|
|
||||||
|
//- Construct from flux and Istream
|
||||||
|
explicitAdjConvectionScheme
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const volVectorField& Up,
|
||||||
|
Istream& is
|
||||||
|
)
|
||||||
|
:
|
||||||
|
adjConvectionScheme<Type>(mesh, Up)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
tmp<fvMatrix<Type> > fvmAdjDiv
|
||||||
|
(
|
||||||
|
const volVectorField&,
|
||||||
|
GeometricField<Type, fvPatchField, volMesh>&
|
||||||
|
) const;
|
||||||
|
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > fvcAdjDiv
|
||||||
|
(
|
||||||
|
const volVectorField&,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>&
|
||||||
|
) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace fv
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "explicitAdjConvectionScheme.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -0,0 +1,40 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright held by original author
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "explicitAdjConvectionScheme.H"
|
||||||
|
#include "fvMesh.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
namespace fv
|
||||||
|
{
|
||||||
|
makeFvAdjConvectionScheme(explicitAdjConvectionScheme)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -0,0 +1,98 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright held by original author
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "noAdjConvectionScheme.H"
|
||||||
|
#include "fvcSurfaceIntegrate.H"
|
||||||
|
#include "fvMatrices.H"
|
||||||
|
#include "fvcGrad.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace fv
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<fvMatrix<Type> >
|
||||||
|
noAdjConvectionScheme<Type>::fvmAdjDiv
|
||||||
|
(
|
||||||
|
const volVectorField& Up,
|
||||||
|
GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<fvMatrix<Type> > tfvm
|
||||||
|
(
|
||||||
|
new fvMatrix<Type>
|
||||||
|
(
|
||||||
|
vf,
|
||||||
|
dimVol*Up.dimensions()*vf.dimensions()/dimLength
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Touch diagonal for consistency
|
||||||
|
tfvm().diag() = 0;
|
||||||
|
|
||||||
|
return tfvm;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
|
noAdjConvectionScheme<Type>::fvcAdjDiv
|
||||||
|
(
|
||||||
|
const volVectorField& Up,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
) const
|
||||||
|
{
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > tAdjConvection
|
||||||
|
(
|
||||||
|
fvc::grad(vf) & Up
|
||||||
|
);
|
||||||
|
|
||||||
|
tAdjConvection().rename
|
||||||
|
(
|
||||||
|
"adjConvection(" + Up.name() + ',' + vf.name() + ')'
|
||||||
|
);
|
||||||
|
|
||||||
|
return tAdjConvection;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace fv
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -0,0 +1,137 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright held by original author
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
Class
|
||||||
|
Foam::fv::noAdjConvectionScheme
|
||||||
|
|
||||||
|
Description
|
||||||
|
Dummy adjConvection scheme, used to switch off adjConvection without
|
||||||
|
recompilation
|
||||||
|
|
||||||
|
Author
|
||||||
|
Hrvoje Jasak, Wikki Ltd. All rights reserved.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
noAdjConvectionScheme.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef noAdjConvectionScheme_H
|
||||||
|
#define noAdjConvectionScheme_H
|
||||||
|
|
||||||
|
#include "adjConvectionScheme.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace fv
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Class noAdjConvectionScheme Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
class noAdjConvectionScheme
|
||||||
|
:
|
||||||
|
public fv::adjConvectionScheme<Type>
|
||||||
|
{
|
||||||
|
// Private Member Functions
|
||||||
|
|
||||||
|
//- Disallow default bitwise copy construct
|
||||||
|
noAdjConvectionScheme(const noAdjConvectionScheme&);
|
||||||
|
|
||||||
|
//- Disallow default bitwise assignment
|
||||||
|
void operator=(const noAdjConvectionScheme&);
|
||||||
|
|
||||||
|
|
||||||
|
public:
|
||||||
|
|
||||||
|
//- Runtime type information
|
||||||
|
TypeName("off");
|
||||||
|
|
||||||
|
|
||||||
|
// Constructors
|
||||||
|
|
||||||
|
//- Construct from flux and interpolation scheme
|
||||||
|
noAdjConvectionScheme
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const volVectorField& Up
|
||||||
|
)
|
||||||
|
:
|
||||||
|
adjConvectionScheme<Type>(mesh, Up)
|
||||||
|
{}
|
||||||
|
|
||||||
|
//- Construct from flux and Istream
|
||||||
|
noAdjConvectionScheme
|
||||||
|
(
|
||||||
|
const fvMesh& mesh,
|
||||||
|
const volVectorField& Up,
|
||||||
|
Istream& is
|
||||||
|
)
|
||||||
|
:
|
||||||
|
adjConvectionScheme<Type>(mesh, Up)
|
||||||
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
// Member Functions
|
||||||
|
|
||||||
|
tmp<fvMatrix<Type> > fvmAdjDiv
|
||||||
|
(
|
||||||
|
const volVectorField&,
|
||||||
|
GeometricField<Type, fvPatchField, volMesh>&
|
||||||
|
) const;
|
||||||
|
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > fvcAdjDiv
|
||||||
|
(
|
||||||
|
const volVectorField&,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>&
|
||||||
|
) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace fv
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "noAdjConvectionScheme.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -2,7 +2,7 @@
|
||||||
========= |
|
========= |
|
||||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
\\ / O peration |
|
\\ / O peration |
|
||||||
\\ / A nd | Copyright (C) Original author
|
\\ / A nd | Copyright held by original author
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
|
@ -20,43 +20,23 @@ License
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with OpenFOAM; if not, write to the Free Software Foundation,
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
Application
|
|
||||||
addSwirlAndRotation
|
|
||||||
|
|
||||||
Description
|
Description
|
||||||
Adds solid body swirl and rotation to internal cells and rotatingPatches
|
|
||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
#include "fvCFD.H"
|
#include "noAdjConvectionScheme.H"
|
||||||
|
#include "fvMesh.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
namespace Foam
|
||||||
{
|
{
|
||||||
|
namespace fv
|
||||||
# include "setRootCase.H"
|
{
|
||||||
|
makeFvAdjConvectionScheme(noAdjConvectionScheme)
|
||||||
# include "createTime.H"
|
}
|
||||||
# include "createMesh.H"
|
|
||||||
# include "createFields.H"
|
|
||||||
|
|
||||||
# include "readRotation.H"
|
|
||||||
# include "setRotation.H"
|
|
||||||
|
|
||||||
// Force the write
|
|
||||||
U.write();
|
|
||||||
|
|
||||||
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
|
|
||||||
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
|
|
||||||
<< nl << endl;
|
|
||||||
|
|
||||||
Info<< "End\n" << endl;
|
|
||||||
|
|
||||||
return(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
|
@ -55,6 +55,8 @@ Description
|
||||||
#include "fvcSup.H"
|
#include "fvcSup.H"
|
||||||
#include "fvcMeshPhi.H"
|
#include "fvcMeshPhi.H"
|
||||||
|
|
||||||
|
#include "fvcAdjDiv.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
192
src/finiteVolume/finiteVolume/fvc/fvcAdjDiv.C
Normal file
192
src/finiteVolume/finiteVolume/fvc/fvcAdjDiv.C
Normal file
|
@ -0,0 +1,192 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright held by original author
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include "fvcAdjDiv.H"
|
||||||
|
#include "fvMesh.H"
|
||||||
|
#include "fvcSurfaceIntegrate.H"
|
||||||
|
#include "adjConvectionScheme.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace fvc
|
||||||
|
{
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
|
adjDiv
|
||||||
|
(
|
||||||
|
const volVectorField& Up,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||||
|
const word& name
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return fv::adjConvectionScheme<Type>::New
|
||||||
|
(
|
||||||
|
vf.mesh(),
|
||||||
|
Up,
|
||||||
|
vf.mesh().schemesDict().divScheme(name)
|
||||||
|
)().fvcAdjDiv(Up, vf);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
|
adjDiv
|
||||||
|
(
|
||||||
|
const tmp<volVectorField>& tUp,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||||
|
const word& name
|
||||||
|
)
|
||||||
|
{
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > AdjDiv
|
||||||
|
(
|
||||||
|
fvc::adjDiv(tUp(), vf, name)
|
||||||
|
);
|
||||||
|
tUp.clear();
|
||||||
|
return AdjDiv;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
|
adjDiv
|
||||||
|
(
|
||||||
|
const volVectorField& Up,
|
||||||
|
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
|
||||||
|
const word& name
|
||||||
|
)
|
||||||
|
{
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > AdjDiv
|
||||||
|
(
|
||||||
|
fvc::adjDiv(Up, tvf(), name)
|
||||||
|
);
|
||||||
|
tvf.clear();
|
||||||
|
return AdjDiv;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
|
adjDiv
|
||||||
|
(
|
||||||
|
const tmp<volVectorField>& tUp,
|
||||||
|
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf,
|
||||||
|
const word& name
|
||||||
|
)
|
||||||
|
{
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > AdjDiv
|
||||||
|
(
|
||||||
|
fvc::adjDiv(tUp(), tvf(), name)
|
||||||
|
);
|
||||||
|
tUp.clear();
|
||||||
|
tvf.clear();
|
||||||
|
return AdjDiv;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
|
adjDiv
|
||||||
|
(
|
||||||
|
const volVectorField& Up,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return fvc::adjDiv
|
||||||
|
(
|
||||||
|
Up, vf, "adjDiv(" + Up.name() + ',' + vf.name() + ')'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
|
adjDiv
|
||||||
|
(
|
||||||
|
const tmp<volVectorField>& tUp,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
|
)
|
||||||
|
{
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > AdjDiv
|
||||||
|
(
|
||||||
|
fvc::adjDiv(tUp(), vf)
|
||||||
|
);
|
||||||
|
tUp.clear();
|
||||||
|
return AdjDiv;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
|
adjDiv
|
||||||
|
(
|
||||||
|
const volVectorField& Up,
|
||||||
|
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
|
||||||
|
)
|
||||||
|
{
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > AdjDiv
|
||||||
|
(
|
||||||
|
fvc::adjDiv(Up, tvf())
|
||||||
|
);
|
||||||
|
tvf.clear();
|
||||||
|
return AdjDiv;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> >
|
||||||
|
adjDiv
|
||||||
|
(
|
||||||
|
const tmp<volVectorField>& tUp,
|
||||||
|
const tmp<GeometricField<Type, fvPatchField, volMesh> >& tvf
|
||||||
|
)
|
||||||
|
{
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > AdjDiv
|
||||||
|
(
|
||||||
|
fvc::adjDiv(tUp(), tvf())
|
||||||
|
);
|
||||||
|
tUp.clear();
|
||||||
|
tvf.clear();
|
||||||
|
return AdjDiv;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace fvc
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
131
src/finiteVolume/finiteVolume/fvc/fvcAdjDiv.H
Normal file
131
src/finiteVolume/finiteVolume/fvc/fvcAdjDiv.H
Normal file
|
@ -0,0 +1,131 @@
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
========= |
|
||||||
|
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||||
|
\\ / O peration |
|
||||||
|
\\ / A nd | Copyright held by original author
|
||||||
|
\\/ M anipulation |
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
License
|
||||||
|
This file is part of OpenFOAM.
|
||||||
|
|
||||||
|
OpenFOAM is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU General Public License as published by the
|
||||||
|
Free Software Foundation; either version 2 of the License, or (at your
|
||||||
|
option) any later version.
|
||||||
|
|
||||||
|
OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||||
|
for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with OpenFOAM; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
InNamespace
|
||||||
|
Foam::fvc
|
||||||
|
|
||||||
|
Description
|
||||||
|
Calculate the adjoint divergence of the given field.
|
||||||
|
|
||||||
|
SourceFiles
|
||||||
|
fvcAdjDiv.C
|
||||||
|
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef fvcAdjDiv_H
|
||||||
|
#define fvcAdjDiv_H
|
||||||
|
|
||||||
|
#include "volFieldsFwd.H"
|
||||||
|
#include "surfaceFieldsFwd.H"
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
|
||||||
|
/*---------------------------------------------------------------------------*\
|
||||||
|
Namespace fvc functions Declaration
|
||||||
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
namespace fvc
|
||||||
|
{
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > adjDiv
|
||||||
|
(
|
||||||
|
const volVectorField&,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>&,
|
||||||
|
const word& name
|
||||||
|
);
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > adjDiv
|
||||||
|
(
|
||||||
|
const tmp<volVectorField>&,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>&,
|
||||||
|
const word& name
|
||||||
|
);
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > adjDiv
|
||||||
|
(
|
||||||
|
const volVectorField&,
|
||||||
|
const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
|
||||||
|
const word& name
|
||||||
|
);
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > adjDiv
|
||||||
|
(
|
||||||
|
const tmp<volVectorField>&,
|
||||||
|
const tmp<GeometricField<Type, fvPatchField, volMesh> >&,
|
||||||
|
const word& name
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > adjDiv
|
||||||
|
(
|
||||||
|
const volVectorField&,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > adjDiv
|
||||||
|
(
|
||||||
|
const tmp<volVectorField>&,
|
||||||
|
const GeometricField<Type, fvPatchField, volMesh>&
|
||||||
|
);
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > adjDiv
|
||||||
|
(
|
||||||
|
const volVectorField&,
|
||||||
|
const tmp<GeometricField<Type, fvPatchField, volMesh> >&
|
||||||
|
);
|
||||||
|
|
||||||
|
template<class Type>
|
||||||
|
tmp<GeometricField<Type, fvPatchField, volMesh> > adjDiv
|
||||||
|
(
|
||||||
|
const tmp<volVectorField>&,
|
||||||
|
const tmp<GeometricField<Type, fvPatchField, volMesh> >&
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
} // End namespace Foam
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#ifdef NoRepository
|
||||||
|
# include "fvcAdjDiv.C"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// ************************************************************************* //
|
|
@ -44,6 +44,7 @@ Description
|
||||||
#include "fvmDdt.H"
|
#include "fvmDdt.H"
|
||||||
#include "fvmD2dt2.H"
|
#include "fvmD2dt2.H"
|
||||||
#include "fvmDiv.H"
|
#include "fvmDiv.H"
|
||||||
|
#include "fvmAdjDiv.H"
|
||||||
#include "fvmLaplacian.H"
|
#include "fvmLaplacian.H"
|
||||||
#include "fvmSup.H"
|
#include "fvmSup.H"
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ License
|
||||||
#include "fvmAdjDiv.H"
|
#include "fvmAdjDiv.H"
|
||||||
#include "fvMesh.H"
|
#include "fvMesh.H"
|
||||||
#include "fvMatrix.H"
|
#include "fvMatrix.H"
|
||||||
#include "adjointConvectionScheme.H"
|
#include "adjConvectionScheme.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
@ -45,30 +45,30 @@ template<class Type>
|
||||||
tmp<fvMatrix<Type> >
|
tmp<fvMatrix<Type> >
|
||||||
adjDiv
|
adjDiv
|
||||||
(
|
(
|
||||||
const surfaceScalarField& flux,
|
const volVectorField& Up,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& vf,
|
GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||||
const word& name
|
const word& name
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return fv::adjointConvectionScheme<Type>::New
|
return fv::adjConvectionScheme<Type>::New
|
||||||
(
|
(
|
||||||
vf.mesh(),
|
vf.mesh(),
|
||||||
flux,
|
Up,
|
||||||
vf.mesh().schemesDict().divScheme(name)
|
vf.mesh().schemesDict().divScheme(name)
|
||||||
)().fvmAdjDiv(flux, vf);
|
)().fvmAdjDiv(Up, vf);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<fvMatrix<Type> >
|
tmp<fvMatrix<Type> >
|
||||||
adjDiv
|
adjDiv
|
||||||
(
|
(
|
||||||
const tmp<surfaceScalarField>& tflux,
|
const tmp<volVectorField>& tUp,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& vf,
|
GeometricField<Type, fvPatchField, volMesh>& vf,
|
||||||
const word& name
|
const word& name
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmp<fvMatrix<Type> > AdjDiv(fvm::adjDiv(tflux(), vf, name));
|
tmp<fvMatrix<Type> > AdjDiv(fvm::adjDiv(tUp(), vf, name));
|
||||||
tflux.clear();
|
tUp.clear();
|
||||||
return AdjDiv;
|
return AdjDiv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,23 +77,23 @@ template<class Type>
|
||||||
tmp<fvMatrix<Type> >
|
tmp<fvMatrix<Type> >
|
||||||
adjDiv
|
adjDiv
|
||||||
(
|
(
|
||||||
const surfaceScalarField& flux,
|
const volVectorField& Up,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& vf
|
GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return fvm::adjDiv(flux, vf, "adjDiv("+flux.name()+','+vf.name()+')');
|
return fvm::adjDiv(Up, vf, "adjDiv("+Up.name()+','+vf.name()+')');
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<fvMatrix<Type> >
|
tmp<fvMatrix<Type> >
|
||||||
adjDiv
|
adjDiv
|
||||||
(
|
(
|
||||||
const tmp<surfaceScalarField>& tflux,
|
const tmp<volVectorField>& tUp,
|
||||||
GeometricField<Type, fvPatchField, volMesh>& vf
|
GeometricField<Type, fvPatchField, volMesh>& vf
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
tmp<fvMatrix<Type> > AdjDiv(fvm::adjDiv(tflux(), vf));
|
tmp<fvMatrix<Type> > AdjDiv(fvm::adjDiv(tUp(), vf));
|
||||||
tflux.clear();
|
tUp.clear();
|
||||||
return AdjDiv;
|
return AdjDiv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace fvm
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<fvMatrix<Type> > adjDiv
|
tmp<fvMatrix<Type> > adjDiv
|
||||||
(
|
(
|
||||||
const surfaceScalarField&,
|
const volVectorField&,
|
||||||
GeometricField<Type, fvPatchField, volMesh>&,
|
GeometricField<Type, fvPatchField, volMesh>&,
|
||||||
const word& name
|
const word& name
|
||||||
);
|
);
|
||||||
|
@ -63,7 +63,7 @@ namespace fvm
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<fvMatrix<Type> > adjDiv
|
tmp<fvMatrix<Type> > adjDiv
|
||||||
(
|
(
|
||||||
const tmp<surfaceScalarField>&,
|
const tmp<volVectorField>&,
|
||||||
GeometricField<Type, fvPatchField, volMesh>&,
|
GeometricField<Type, fvPatchField, volMesh>&,
|
||||||
const word& name
|
const word& name
|
||||||
);
|
);
|
||||||
|
@ -72,14 +72,14 @@ namespace fvm
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<fvMatrix<Type> > adjDiv
|
tmp<fvMatrix<Type> > adjDiv
|
||||||
(
|
(
|
||||||
const surfaceScalarField&,
|
const volVectorField&,
|
||||||
GeometricField<Type, fvPatchField, volMesh>&
|
GeometricField<Type, fvPatchField, volMesh>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<fvMatrix<Type> > adjDiv
|
tmp<fvMatrix<Type> > adjDiv
|
||||||
(
|
(
|
||||||
const tmp<surfaceScalarField>&,
|
const tmp<volVectorField>&,
|
||||||
GeometricField<Type, fvPatchField, volMesh>&
|
GeometricField<Type, fvPatchField, volMesh>&
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,7 @@ void gaussGrad<Type>::correctBoundaryConditions
|
||||||
vsf.mesh().Sf().boundaryField()[patchi]
|
vsf.mesh().Sf().boundaryField()[patchi]
|
||||||
/vsf.mesh().magSf().boundaryField()[patchi];
|
/vsf.mesh().magSf().boundaryField()[patchi];
|
||||||
|
|
||||||
gGrad.boundaryField()[patchi] += n *
|
gGrad.boundaryField()[patchi] += n*
|
||||||
(
|
(
|
||||||
vsf.boundaryField()[patchi].snGrad()
|
vsf.boundaryField()[patchi].snGrad()
|
||||||
- (n & gGrad.boundaryField()[patchi])
|
- (n & gGrad.boundaryField()[patchi])
|
||||||
|
|
|
@ -88,7 +88,7 @@ void volPointInterpolation::makeWeights() const
|
||||||
forAll(pcp, pointCelli)
|
forAll(pcp, pointCelli)
|
||||||
{
|
{
|
||||||
pw[pointCelli] =
|
pw[pointCelli] =
|
||||||
1.0/mag(points[pointi] - cellCentres[pcp[pointCelli]]);
|
1/mag(points[pointi] - cellCentres[pcp[pointCelli]]);
|
||||||
|
|
||||||
sumWeights[pointi] += pw[pointCelli];
|
sumWeights[pointi] += pw[pointCelli];
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,8 +172,9 @@ Foam::lduSolverPerformance Foam::bicgStabSolver::solve
|
||||||
s[i] = r[i] - alpha*v[i];
|
s[i] = r[i] - alpha*v[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute preconditioning transpose
|
// Execute preconditioning
|
||||||
preconPtr_->preconditionT(sh, s, cmpt);
|
// Bug fix, Alexander Monakov, 11/Jul/2012
|
||||||
|
preconPtr_->precondition(sh, s, cmpt);
|
||||||
matrix_.Amul(t, sh, coupleBouCoeffs_, interfaces_, cmpt);
|
matrix_.Amul(t, sh, coupleBouCoeffs_, interfaces_, cmpt);
|
||||||
omega = gSumProd(t, s)/gSumProd(t, t);
|
omega = gSumProd(t, s)/gSumProd(t, t);
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Reference in a new issue