mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: tabs and line length in files, very dubious NULL in ensight reader.
- disable automatically upgrading copyrights in files since changes to not automatically imply a change in copyright. Eg, fixing a typo in comments, or changing a variable from 'loopI' to 'loopi' etc.
This commit is contained in:
@ -651,7 +651,7 @@ int main(int argc, char *argv[])
|
|||||||
);
|
);
|
||||||
|
|
||||||
// corrector for mesh motion
|
// corrector for mesh motion
|
||||||
twoDPointCorrector* correct2DPtr = NULL;
|
twoDPointCorrector* correct2DPtr = nullptr;
|
||||||
|
|
||||||
if (motionObj.typeHeaderOk<IOdictionary>(true))
|
if (motionObj.typeHeaderOk<IOdictionary>(true))
|
||||||
{
|
{
|
||||||
|
|||||||
@ -28,7 +28,7 @@ int USERD_set_filenames
|
|||||||
// remove the last '/' from rootDir
|
// remove the last '/' from rootDir
|
||||||
if (the_path[lRoot-1] == '/')
|
if (the_path[lRoot-1] == '/')
|
||||||
{
|
{
|
||||||
the_path[lRoot-1] = char(NULL);
|
the_path[lRoot-1] = '\0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -62,6 +62,14 @@ die()
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Automatically upgrade copyrights in files.
|
||||||
|
# Disabled by default since some changes (eg, spelling) do not automatically
|
||||||
|
# imply an update copyright.
|
||||||
|
optCopyright=false
|
||||||
|
|
||||||
|
# Run all tests (do not exit on first failure)
|
||||||
|
optAll=false
|
||||||
|
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
# Check content that will be added by this commit.
|
# Check content that will be added by this commit.
|
||||||
|
|
||||||
@ -76,11 +84,27 @@ fi
|
|||||||
# called manually with arguments for the files/directories to be tested?
|
# called manually with arguments for the files/directories to be tested?
|
||||||
if [ "$#" -gt 0 ]
|
if [ "$#" -gt 0 ]
|
||||||
then
|
then
|
||||||
case "$1" in
|
while [ "$#" -gt 0 ]
|
||||||
-h | -help)
|
do
|
||||||
die "interactive usage: supply list of files/directories to check"
|
case "$1" in
|
||||||
;;
|
-h | -help)
|
||||||
esac
|
die "interactive usage: supply list of files/directories to check"
|
||||||
|
;;
|
||||||
|
-copy)
|
||||||
|
echo "$hookName: adjust copyright enabled" 1>&2
|
||||||
|
optCopyright=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-all)
|
||||||
|
echo "$hookName: do all tests (no premature exit)" 1>&2
|
||||||
|
optAll=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
break
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
# obtain list of all specified files/directories
|
# obtain list of all specified files/directories
|
||||||
fileList=$(git ls-files -- $@ 2>/dev/null)
|
fileList=$(git ls-files -- $@ 2>/dev/null)
|
||||||
@ -100,6 +124,8 @@ unset badFiles
|
|||||||
# join list of files with this amount of space
|
# join list of files with this amount of space
|
||||||
Indent=" "
|
Indent=" "
|
||||||
|
|
||||||
|
exitCode=0
|
||||||
|
|
||||||
#
|
#
|
||||||
# report bad files and die if there are any
|
# report bad files and die if there are any
|
||||||
#
|
#
|
||||||
@ -114,7 +140,14 @@ dieOnBadFiles()
|
|||||||
echo "File(s):" 1>&2
|
echo "File(s):" 1>&2
|
||||||
echo "$badFiles" 1>&2
|
echo "$badFiles" 1>&2
|
||||||
echo '' 1>&2
|
echo '' 1>&2
|
||||||
exit 1
|
|
||||||
|
exitCode=1
|
||||||
|
if [ "$optAll" = true ]
|
||||||
|
then
|
||||||
|
return 0 # Continue to the next test
|
||||||
|
else
|
||||||
|
exit $exitCode
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,7 +347,7 @@ MESSAGE
|
|||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# check that OpenFOAM Foundation copyright is current
|
# check that copyright date is current
|
||||||
#
|
#
|
||||||
checkCopyright()
|
checkCopyright()
|
||||||
{
|
{
|
||||||
@ -327,9 +360,9 @@ checkCopyright()
|
|||||||
startYear=`grep "Copyright.*OpenCFD" $f | sed 's/[^0-9]*\([0-9]*\).*/\1/g'`
|
startYear=`grep "Copyright.*OpenCFD" $f | sed 's/[^0-9]*\([0-9]*\).*/\1/g'`
|
||||||
endYear=`grep "Copyright.*-.*OpenCFD" $f | sed 's/[^-]*-\([0-9]*\).*/\1/g'`
|
endYear=`grep "Copyright.*-.*OpenCFD" $f | sed 's/[^-]*-\([0-9]*\).*/\1/g'`
|
||||||
#echo "startYear=$startYear endYear=$endYear"
|
#echo "startYear=$startYear endYear=$endYear"
|
||||||
if [ "$startYear" != "" ]
|
if [ -n "$startYear" ]
|
||||||
then
|
then
|
||||||
if [ "$endYear" != "" ]
|
if [ -n "$endYear" ]
|
||||||
then
|
then
|
||||||
# Date is of type 2011-2012 OpenCFD Ltd.
|
# Date is of type 2011-2012 OpenCFD Ltd.
|
||||||
if [ "$year" != "$endYear" ]
|
if [ "$year" != "$endYear" ]
|
||||||
@ -371,7 +404,11 @@ checkLineLengthNonDirective
|
|||||||
# check for non-standard code patterns
|
# check for non-standard code patterns
|
||||||
checkNonStandardCodePatterns
|
checkNonStandardCodePatterns
|
||||||
|
|
||||||
checkCopyright
|
# Stop now if there were any errors
|
||||||
|
[ "$exitCode" = 0 ] || exit $exitCode
|
||||||
|
|
||||||
|
# check copyright date (normally disabled)
|
||||||
|
[ "$optCopyright" = true ] && checkCopyright
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -1284,7 +1284,7 @@ int Foam::system(const Foam::UList<Foam::string>& command)
|
|||||||
{
|
{
|
||||||
// in child:
|
// in child:
|
||||||
// Need command and arguments separately.
|
// Need command and arguments separately.
|
||||||
// args is a NULL-terminated list of c-strings
|
// args is a nullptr-terminated list of c-strings
|
||||||
|
|
||||||
CStringList args(SubList<string>(command, 0));
|
CStringList args(SubList<string>(command, 0));
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
|
|||||||
@ -97,10 +97,11 @@ inline uint64_t Foam::endian::swap64(uint64_t u)
|
|||||||
);
|
);
|
||||||
|
|
||||||
// alternative formulation
|
// alternative formulation
|
||||||
//
|
/*
|
||||||
// u = ((u<< 8) & 0xFF00FF00FF00FF00ull) | ((u>> 8) & 0x00FF00FF00FF00FFull);
|
u = ((u<< 8) & 0xFF00FF00FF00FF00ull) | ((u>> 8) & 0x00FF00FF00FF00FFull);
|
||||||
// u = ((u<<16) & 0xFFFF0000FFFF0000ull) | ((u>>16) & 0x0000FFFF0000FFFFull);
|
u = ((u<<16) & 0xFFFF0000FFFF0000ull) | ((u>>16) & 0x0000FFFF0000FFFFull);
|
||||||
// return (u >> 32) | (u << 32);
|
return (u >> 32) | (u << 32);
|
||||||
|
*/
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,7 @@ class CStringList
|
|||||||
// Does not include the final nul-character
|
// Does not include the final nul-character
|
||||||
size_t len_;
|
size_t len_;
|
||||||
|
|
||||||
//- List of strings, including trailing NULL pointer
|
//- List of strings, including trailing nullptr
|
||||||
char** argv_;
|
char** argv_;
|
||||||
|
|
||||||
//- Flattened content with interspersed nul-characters
|
//- Flattened content with interspersed nul-characters
|
||||||
@ -109,8 +109,8 @@ public:
|
|||||||
|
|
||||||
// Public Members
|
// Public Members
|
||||||
|
|
||||||
//- Count the number of parameters until the first NULL pointer.
|
//- Count the number of parameters until the first nullptr
|
||||||
// Return 0 if argv is NULL.
|
// Return 0 if argv is nullptr.
|
||||||
static inline int count(const char * const argv[]);
|
static inline int count(const char * const argv[]);
|
||||||
|
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ public:
|
|||||||
inline int size() const;
|
inline int size() const;
|
||||||
|
|
||||||
//- Return the list of C-strings (ie, argv)
|
//- Return the list of C-strings (ie, argv)
|
||||||
// The position at argc is a NULL pointer
|
// The position at argc is a nullptr
|
||||||
inline char** strings() const;
|
inline char** strings() const;
|
||||||
|
|
||||||
|
|
||||||
@ -148,8 +148,8 @@ public:
|
|||||||
template<class StringType>
|
template<class StringType>
|
||||||
static List<StringType> asList(int argc, const char * const argv[]);
|
static List<StringType> asList(int argc, const char * const argv[]);
|
||||||
|
|
||||||
//- Create a list from a NULL-terminated list of argv parameters.
|
//- Create a list from a nullptr-terminated list of argv parameters.
|
||||||
// A null pointer for argv is permissible.
|
// Using a nullptr for argv is permissible.
|
||||||
template<class StringType>
|
template<class StringType>
|
||||||
static inline List<StringType> asList(const char * const argv[]);
|
static inline List<StringType> asList(const char * const argv[]);
|
||||||
|
|
||||||
|
|||||||
@ -85,10 +85,10 @@ bool Foam::ccm::base::close()
|
|||||||
{
|
{
|
||||||
if (CCMIOIsValidEntity(globalState_->root))
|
if (CCMIOIsValidEntity(globalState_->root))
|
||||||
{
|
{
|
||||||
CCMIOCloseFile(NULL, globalState_->root);
|
CCMIOCloseFile(nullptr, globalState_->root);
|
||||||
}
|
}
|
||||||
delete globalState_;
|
delete globalState_;
|
||||||
globalState_ = 0;
|
globalState_ = nullptr;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,7 +52,7 @@ void Foam::ccm::reader::determineFieldInfo
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
fieldSetNode,
|
fieldSetNode,
|
||||||
kCCMIOFieldPhase,
|
kCCMIOFieldPhase,
|
||||||
&phaseI,
|
&phaseI,
|
||||||
@ -74,7 +74,7 @@ void Foam::ccm::reader::determineFieldInfo
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
phaseNode,
|
phaseNode,
|
||||||
kCCMIOField,
|
kCCMIOField,
|
||||||
&fieldI,
|
&fieldI,
|
||||||
@ -84,12 +84,12 @@ void Foam::ccm::reader::determineFieldInfo
|
|||||||
|
|
||||||
&& CCMIOReadField
|
&& CCMIOReadField
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
fieldNode,
|
fieldNode,
|
||||||
fullName,
|
fullName,
|
||||||
shortName,
|
shortName,
|
||||||
&dims,
|
&dims,
|
||||||
NULL
|
nullptr
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
@ -139,7 +139,7 @@ void Foam::ccm::reader::determineFieldInfo
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
fieldNode,
|
fieldNode,
|
||||||
kCCMIOFieldData,
|
kCCMIOFieldData,
|
||||||
&dataI,
|
&dataI,
|
||||||
@ -149,20 +149,20 @@ void Foam::ccm::reader::determineFieldInfo
|
|||||||
|
|
||||||
&& CCMIOEntitySize
|
&& CCMIOEntitySize
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
dataNode,
|
dataNode,
|
||||||
NULL,
|
nullptr,
|
||||||
&maxId
|
&maxId
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
|
|
||||||
&& CCMIOReadFieldDatad
|
&& CCMIOReadFieldDatad
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
dataNode,
|
dataNode,
|
||||||
NULL,
|
nullptr,
|
||||||
&dataLocation,
|
&dataLocation,
|
||||||
NULL,
|
nullptr,
|
||||||
kCCMIOStart,
|
kCCMIOStart,
|
||||||
kCCMIOEnd
|
kCCMIOEnd
|
||||||
)
|
)
|
||||||
@ -212,7 +212,7 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
(globalState_->root),
|
(globalState_->root),
|
||||||
kCCMIOState,
|
kCCMIOState,
|
||||||
&stateI,
|
&stateI,
|
||||||
@ -230,7 +230,7 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
stateNode,
|
stateNode,
|
||||||
kCCMIOProcessor,
|
kCCMIOProcessor,
|
||||||
&procI,
|
&procI,
|
||||||
@ -240,11 +240,11 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
|
|
||||||
&& CCMIOReadProcessor
|
&& CCMIOReadProcessor
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
processorNode,
|
processorNode,
|
||||||
NULL, // Ignore verticesNode
|
nullptr, // Ignore verticesNode
|
||||||
NULL, // Ignore topologyNode
|
nullptr, // Ignore topologyNode
|
||||||
NULL, // Ignore initialField
|
nullptr, // Ignore initialField
|
||||||
&solutionNode
|
&solutionNode
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
@ -263,7 +263,7 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
solutionNode,
|
solutionNode,
|
||||||
kCCMIORestart,
|
kCCMIORestart,
|
||||||
&restartI,
|
&restartI,
|
||||||
@ -273,7 +273,7 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
|
|
||||||
&& CCMIOEntityName
|
&& CCMIOEntityName
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
stateNode,
|
stateNode,
|
||||||
solutionName
|
solutionName
|
||||||
)
|
)
|
||||||
@ -281,13 +281,13 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
|
|
||||||
&& CCMIOReadRestartInfo
|
&& CCMIOReadRestartInfo
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
restartNode,
|
restartNode,
|
||||||
NULL, // Ignore solverName
|
nullptr, // Ignore solverName
|
||||||
&iteration,
|
&iteration,
|
||||||
&timeValue,
|
&timeValue,
|
||||||
NULL, // Ignore timeUnits
|
nullptr, // Ignore timeUnits
|
||||||
NULL // Ignore startAngle
|
nullptr // Ignore startAngle
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
@ -310,7 +310,7 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
processorNode,
|
processorNode,
|
||||||
kCCMIOLagrangianData,
|
kCCMIOLagrangianData,
|
||||||
&lagrangianI,
|
&lagrangianI,
|
||||||
@ -320,9 +320,9 @@ bool Foam::ccm::reader::detectSolution()
|
|||||||
|
|
||||||
&& CCMIOReadLagrangianData
|
&& CCMIOReadLagrangianData
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
lagrangianNode,
|
lagrangianNode,
|
||||||
NULL,
|
nullptr,
|
||||||
&lagrangianSolutions
|
&lagrangianSolutions
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
@ -366,10 +366,10 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIOGetState
|
CCMIOGetState
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
(globalState_->root),
|
(globalState_->root),
|
||||||
solutionName.c_str(),
|
solutionName.c_str(),
|
||||||
NULL,
|
nullptr,
|
||||||
&stateNode
|
&stateNode
|
||||||
)
|
)
|
||||||
!= kCCMIONoErr
|
!= kCCMIONoErr
|
||||||
@ -420,7 +420,7 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
stateNode,
|
stateNode,
|
||||||
kCCMIOProcessor,
|
kCCMIOProcessor,
|
||||||
&procI,
|
&procI,
|
||||||
@ -430,11 +430,11 @@ Foam::ccm::reader::readField
|
|||||||
|
|
||||||
&& CCMIOReadProcessor
|
&& CCMIOReadProcessor
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
processorNode,
|
processorNode,
|
||||||
NULL, // Ignore verticesNode
|
nullptr, // Ignore verticesNode
|
||||||
NULL, // Ignore topologyNode
|
nullptr, // Ignore topologyNode
|
||||||
NULL, // Ignore initialField
|
nullptr, // Ignore initialField
|
||||||
&solutionNode
|
&solutionNode
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
@ -448,7 +448,7 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
solutionNode,
|
solutionNode,
|
||||||
kCCMIOFieldPhase,
|
kCCMIOFieldPhase,
|
||||||
&phaseI,
|
&phaseI,
|
||||||
@ -465,7 +465,7 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
phaseNode,
|
phaseNode,
|
||||||
kCCMIOField,
|
kCCMIOField,
|
||||||
&fieldI,
|
&fieldI,
|
||||||
@ -480,10 +480,10 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
&(globalState_->error),
|
&(globalState_->error),
|
||||||
fieldNode,
|
fieldNode,
|
||||||
NULL,
|
nullptr,
|
||||||
shortName,
|
shortName,
|
||||||
&dims,
|
&dims,
|
||||||
NULL
|
nullptr
|
||||||
);
|
);
|
||||||
assertNoError
|
assertNoError
|
||||||
(
|
(
|
||||||
@ -501,7 +501,7 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIONextEntity
|
CCMIONextEntity
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
fieldNode,
|
fieldNode,
|
||||||
kCCMIOFieldData,
|
kCCMIOFieldData,
|
||||||
&dataI,
|
&dataI,
|
||||||
@ -518,20 +518,20 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIOEntitySize
|
CCMIOEntitySize
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
dataNode,
|
dataNode,
|
||||||
&n,
|
&n,
|
||||||
NULL
|
nullptr
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
|
|
||||||
&& CCMIOReadFieldDatad
|
&& CCMIOReadFieldDatad
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
dataNode,
|
dataNode,
|
||||||
&mapId,
|
&mapId,
|
||||||
&dataLocation,
|
&dataLocation,
|
||||||
NULL,
|
nullptr,
|
||||||
kCCMIOStart,
|
kCCMIOStart,
|
||||||
kCCMIOEnd
|
kCCMIOEnd
|
||||||
)
|
)
|
||||||
@ -549,10 +549,10 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIOEntityDescription
|
CCMIOEntityDescription
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
dataNode,
|
dataNode,
|
||||||
&len,
|
&len,
|
||||||
NULL
|
nullptr
|
||||||
)
|
)
|
||||||
== kCCMIONoErr
|
== kCCMIONoErr
|
||||||
)
|
)
|
||||||
@ -563,7 +563,7 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
CCMIOEntityDescription
|
CCMIOEntityDescription
|
||||||
(
|
(
|
||||||
NULL,
|
nullptr,
|
||||||
dataNode,
|
dataNode,
|
||||||
&len,
|
&len,
|
||||||
dataLabel
|
dataLabel
|
||||||
@ -577,7 +577,7 @@ Foam::ccm::reader::readField
|
|||||||
strstr(fieldName.c_str(), "SIG")
|
strstr(fieldName.c_str(), "SIG")
|
||||||
|| strstr(fieldName.c_str(), "EPS")
|
|| strstr(fieldName.c_str(), "EPS")
|
||||||
)
|
)
|
||||||
&& strstr(dataLabel, "So") == NULL
|
&& strstr(dataLabel, "So") == nullptr
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
okayCombination = false;
|
okayCombination = false;
|
||||||
@ -607,8 +607,8 @@ Foam::ccm::reader::readField
|
|||||||
(
|
(
|
||||||
&(globalState_->error),
|
&(globalState_->error),
|
||||||
dataNode,
|
dataNode,
|
||||||
NULL,
|
nullptr,
|
||||||
NULL,
|
nullptr,
|
||||||
rawData.begin(),
|
rawData.begin(),
|
||||||
kCCMIOStart,
|
kCCMIOStart,
|
||||||
kCCMIOEnd
|
kCCMIOEnd
|
||||||
|
|||||||
@ -592,7 +592,7 @@ Foam::vector Foam::turbulentDFSEMInletFvPatchVectorField::uDashEddy
|
|||||||
|
|
||||||
void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies
|
void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies
|
||||||
(
|
(
|
||||||
List<List<eddy> >& overlappingEddies
|
List<List<eddy>>& overlappingEddies
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
int oldTag = UPstream::msgType();
|
int oldTag = UPstream::msgType();
|
||||||
@ -604,7 +604,7 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::calcOverlappingProcEddies
|
|||||||
Pstream::scatterList(patchBBs);
|
Pstream::scatterList(patchBBs);
|
||||||
|
|
||||||
// Per processor indices into all segments to send
|
// Per processor indices into all segments to send
|
||||||
List<DynamicList<label> > dynSendMap(Pstream::nProcs());
|
List<DynamicList<label>> dynSendMap(Pstream::nProcs());
|
||||||
|
|
||||||
forAll(eddies_, i)
|
forAll(eddies_, i)
|
||||||
{
|
{
|
||||||
@ -1050,7 +1050,7 @@ void Foam::turbulentDFSEMInletFvPatchVectorField::updateCoeffs()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add contributions from overlapping eddies
|
// Add contributions from overlapping eddies
|
||||||
List<List<eddy> > overlappingEddies(Pstream::nProcs());
|
List<List<eddy>> overlappingEddies(Pstream::nProcs());
|
||||||
calcOverlappingProcEddies(overlappingEddies);
|
calcOverlappingProcEddies(overlappingEddies);
|
||||||
|
|
||||||
forAll(overlappingEddies, procI)
|
forAll(overlappingEddies, procI)
|
||||||
|
|||||||
@ -231,7 +231,7 @@ class turbulentDFSEMInletFvPatchVectorField
|
|||||||
//- Helper function to interpolate values from the boundary data or
|
//- Helper function to interpolate values from the boundary data or
|
||||||
// read from dictionary
|
// read from dictionary
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > interpolateOrRead
|
tmp<Field<Type>> interpolateOrRead
|
||||||
(
|
(
|
||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
const dictionary& dict,
|
const dictionary& dict,
|
||||||
@ -240,7 +240,7 @@ class turbulentDFSEMInletFvPatchVectorField
|
|||||||
|
|
||||||
//- Helper function to interpolate values from the boundary data
|
//- Helper function to interpolate values from the boundary data
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > interpolateBoundaryData
|
tmp<Field<Type>> interpolateBoundaryData
|
||||||
(
|
(
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
) const;
|
) const;
|
||||||
@ -258,7 +258,7 @@ class turbulentDFSEMInletFvPatchVectorField
|
|||||||
// processor
|
// processor
|
||||||
void calcOverlappingProcEddies
|
void calcOverlappingProcEddies
|
||||||
(
|
(
|
||||||
List<List<eddy> >& overlappingEddies
|
List<List<eddy>>& overlappingEddies
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ License
|
|||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type> >
|
Foam::tmp<Foam::Field<Type>>
|
||||||
Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead
|
Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead
|
||||||
(
|
(
|
||||||
const word& fieldName,
|
const word& fieldName,
|
||||||
@ -40,7 +40,7 @@ Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead
|
|||||||
{
|
{
|
||||||
if (dict.found(fieldName))
|
if (dict.found(fieldName))
|
||||||
{
|
{
|
||||||
tmp<Field<Type> > tFld
|
tmp<Field<Type>> tFld
|
||||||
(
|
(
|
||||||
new Field<Type>
|
new Field<Type>
|
||||||
(
|
(
|
||||||
@ -62,7 +62,7 @@ Foam::turbulentDFSEMInletFvPatchVectorField::interpolateOrRead
|
|||||||
|
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type> >
|
Foam::tmp<Foam::Field<Type>>
|
||||||
Foam::turbulentDFSEMInletFvPatchVectorField::interpolateBoundaryData
|
Foam::turbulentDFSEMInletFvPatchVectorField::interpolateBoundaryData
|
||||||
(
|
(
|
||||||
const word& fieldName
|
const word& fieldName
|
||||||
|
|||||||
@ -72,6 +72,11 @@ Description
|
|||||||
patches and suppress writing the internalMesh.
|
patches and suppress writing the internalMesh.
|
||||||
Consecutive output numbering can be used in conjunction with \c overwrite.
|
Consecutive output numbering can be used in conjunction with \c overwrite.
|
||||||
|
|
||||||
|
See also
|
||||||
|
Foam::functionObjects::vtkWrite
|
||||||
|
Foam::functionObjects::fvMeshFunctionObject
|
||||||
|
Foam::functionObjects::timeControl
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
ensightWrite.C
|
ensightWrite.C
|
||||||
ensightWriteTemplates.C
|
ensightWriteTemplates.C
|
||||||
|
|||||||
@ -62,6 +62,7 @@ Usage
|
|||||||
\endtable
|
\endtable
|
||||||
|
|
||||||
See also
|
See also
|
||||||
|
Foam::functionObjects::ensightWrite
|
||||||
Foam::functionObjects::fvMeshFunctionObject
|
Foam::functionObjects::fvMeshFunctionObject
|
||||||
Foam::functionObjects::timeControl
|
Foam::functionObjects::timeControl
|
||||||
|
|
||||||
|
|||||||
@ -123,7 +123,7 @@ void Foam::pairPatchAgglomeration::setEdgeWeights
|
|||||||
const label nCoarseI = max(fineToCoarse) + 1;
|
const label nCoarseI = max(fineToCoarse) + 1;
|
||||||
labelListList coarseToFine(invertOneToMany(nCoarseI, fineToCoarse));
|
labelListList coarseToFine(invertOneToMany(nCoarseI, fineToCoarse));
|
||||||
|
|
||||||
HashSet<edge, Hash<edge> > fineFeaturedFaces(coarsePatch.nEdges()/10);
|
HashSet<edge, Hash<edge>> fineFeaturedFaces(coarsePatch.nEdges()/10);
|
||||||
|
|
||||||
// Map fine faces with featured edge into coarse faces
|
// Map fine faces with featured edge into coarse faces
|
||||||
forAllConstIter(EdgeMap<scalar>, facePairWeight_, iter)
|
forAllConstIter(EdgeMap<scalar>, facePairWeight_, iter)
|
||||||
|
|||||||
@ -180,9 +180,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual autoPtr<InjectionModel<CloudType> > clone() const
|
virtual autoPtr<InjectionModel<CloudType>> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<InjectionModel<CloudType> >
|
return autoPtr<InjectionModel<CloudType>>
|
||||||
(
|
(
|
||||||
new InjectedParticleDistributionInjection<CloudType>(*this)
|
new InjectedParticleDistributionInjection<CloudType>(*this)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -145,9 +145,9 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual autoPtr<InjectionModel<CloudType> > clone() const
|
virtual autoPtr<InjectionModel<CloudType>> clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<InjectionModel<CloudType> >
|
return autoPtr<InjectionModel<CloudType>>
|
||||||
(
|
(
|
||||||
new InjectedParticleInjection<CloudType>(*this)
|
new InjectedParticleInjection<CloudType>(*this)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -358,8 +358,8 @@ Foam::pointToPointPlanarInterpolation::pointToPointPlanarInterpolation
|
|||||||
const bool nearestOnly,
|
const bool nearestOnly,
|
||||||
const coordinateSystem& referenceCS,
|
const coordinateSystem& referenceCS,
|
||||||
const label sourceSize,
|
const label sourceSize,
|
||||||
const List<FixedList<label, 3> >& nearestVertex,
|
const List<FixedList<label, 3>>& nearestVertex,
|
||||||
const List<FixedList<scalar, 3> >& nearestVertexWeight
|
const List<FixedList<scalar, 3>>& nearestVertexWeight
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
perturb_(perturb),
|
perturb_(perturb),
|
||||||
|
|||||||
@ -123,8 +123,8 @@ public:
|
|||||||
const bool nearestOnly,
|
const bool nearestOnly,
|
||||||
const coordinateSystem& referenceCS,
|
const coordinateSystem& referenceCS,
|
||||||
const label sourceSize,
|
const label sourceSize,
|
||||||
const List<FixedList<label, 3> >& nearestVertex,
|
const List<FixedList<label, 3>>& nearestVertex,
|
||||||
const List<FixedList<scalar, 3> >& nearestVertexWeight
|
const List<FixedList<scalar, 3>>& nearestVertexWeight
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
|
|||||||
@ -1047,7 +1047,7 @@ bool Foam::cellCellStencils::cellVolumeWeight::update()
|
|||||||
interpolationCells_.transfer(interpolationCells);
|
interpolationCells_.transfer(interpolationCells);
|
||||||
|
|
||||||
|
|
||||||
List<Map<label> > compactMap;
|
List<Map<label>> compactMap;
|
||||||
mapDistribute map(globalCells, cellStencil_, compactMap);
|
mapDistribute map(globalCells, cellStencil_, compactMap);
|
||||||
cellInterpolationMap_.transfer(map);
|
cellInterpolationMap_.transfer(map);
|
||||||
|
|
||||||
|
|||||||
@ -488,7 +488,7 @@ void Foam::cellCellStencils::inverseDistance::markDonors
|
|||||||
|
|
||||||
|
|
||||||
// Indices of tgtcells to send over to each processor
|
// Indices of tgtcells to send over to each processor
|
||||||
List<DynamicList<label> > tgtSendCells(Pstream::nProcs());
|
List<DynamicList<label>> tgtSendCells(Pstream::nProcs());
|
||||||
forAll(srcOverlapProcs, i)
|
forAll(srcOverlapProcs, i)
|
||||||
{
|
{
|
||||||
label procI = srcOverlapProcs[i];
|
label procI = srcOverlapProcs[i];
|
||||||
@ -1548,7 +1548,7 @@ void Foam::cellCellStencils::inverseDistance::createStencil
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Re-do the mapDistribute
|
// Re-do the mapDistribute
|
||||||
List<Map<label> > compactMap;
|
List<Map<label>> compactMap;
|
||||||
mapDistribute map(globalCells, cellStencil_, compactMap);
|
mapDistribute map(globalCells, cellStencil_, compactMap);
|
||||||
cellInterpolationMap_.transfer(map);
|
cellInterpolationMap_.transfer(map);
|
||||||
}
|
}
|
||||||
@ -1902,7 +1902,7 @@ bool Foam::cellCellStencils::inverseDistance::update()
|
|||||||
}
|
}
|
||||||
interpolationCells_.transfer(interpolationCells);
|
interpolationCells_.transfer(interpolationCells);
|
||||||
|
|
||||||
List<Map<label> > compactMap;
|
List<Map<label>> compactMap;
|
||||||
mapDistribute map(globalCells, cellStencil_, compactMap);
|
mapDistribute map(globalCells, cellStencil_, compactMap);
|
||||||
cellInterpolationMap_.transfer(map);
|
cellInterpolationMap_.transfer(map);
|
||||||
|
|
||||||
|
|||||||
@ -317,7 +317,7 @@ void Foam::cellCellStencils::trackingInverseDistance::markDonors
|
|||||||
|
|
||||||
|
|
||||||
// Indices of tgtcells to send over to each processor
|
// Indices of tgtcells to send over to each processor
|
||||||
List<DynamicList<label> > tgtSendCells(Pstream::nProcs());
|
List<DynamicList<label>> tgtSendCells(Pstream::nProcs());
|
||||||
forAll(srcOverlapProcs, i)
|
forAll(srcOverlapProcs, i)
|
||||||
{
|
{
|
||||||
label procI = srcOverlapProcs[i];
|
label procI = srcOverlapProcs[i];
|
||||||
@ -768,7 +768,7 @@ bool Foam::cellCellStencils::trackingInverseDistance::update()
|
|||||||
}
|
}
|
||||||
interpolationCells_.transfer(interpolationCells);
|
interpolationCells_.transfer(interpolationCells);
|
||||||
|
|
||||||
List<Map<label> > compactMap;
|
List<Map<label>> compactMap;
|
||||||
mapDistribute map(globalCells, cellStencil_, compactMap);
|
mapDistribute map(globalCells, cellStencil_, compactMap);
|
||||||
cellInterpolationMap_.transfer(map);
|
cellInterpolationMap_.transfer(map);
|
||||||
|
|
||||||
|
|||||||
@ -103,9 +103,9 @@ public:
|
|||||||
oversetFvPatchField(const oversetFvPatchField<Type>&);
|
oversetFvPatchField(const oversetFvPatchField<Type>&);
|
||||||
|
|
||||||
//- Construct and return a clone
|
//- Construct and return a clone
|
||||||
virtual tmp<fvPatchField<Type> > clone() const
|
virtual tmp<fvPatchField<Type>> clone() const
|
||||||
{
|
{
|
||||||
return tmp<fvPatchField<Type> >
|
return tmp<fvPatchField<Type>>
|
||||||
(
|
(
|
||||||
new oversetFvPatchField<Type>(*this)
|
new oversetFvPatchField<Type>(*this)
|
||||||
);
|
);
|
||||||
@ -119,12 +119,12 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
//- Construct and return a clone setting internal field reference
|
//- Construct and return a clone setting internal field reference
|
||||||
virtual tmp<fvPatchField<Type> > clone
|
virtual tmp<fvPatchField<Type>> clone
|
||||||
(
|
(
|
||||||
const DimensionedField<Type, volMesh>& iF
|
const DimensionedField<Type, volMesh>& iF
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return tmp<fvPatchField<Type> >
|
return tmp<fvPatchField<Type>>
|
||||||
(
|
(
|
||||||
new oversetFvPatchField<Type>(*this, iF)
|
new oversetFvPatchField<Type>(*this, iF)
|
||||||
);
|
);
|
||||||
|
|||||||
@ -118,7 +118,7 @@ public:
|
|||||||
|
|
||||||
//- Return the windowed data
|
//- Return the windowed data
|
||||||
template<class Type>
|
template<class Type>
|
||||||
tmp<Field<Type> > apply
|
tmp<Field<Type>> apply
|
||||||
(
|
(
|
||||||
const Field<Type>& fld,
|
const Field<Type>& fld,
|
||||||
const label windowI
|
const label windowI
|
||||||
|
|||||||
@ -24,7 +24,7 @@ License
|
|||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class Type>
|
template<class Type>
|
||||||
Foam::tmp<Foam::Field<Type> > Foam::windowModel::apply
|
Foam::tmp<Foam::Field<Type>> Foam::windowModel::apply
|
||||||
(
|
(
|
||||||
const Field<Type>& fld,
|
const Field<Type>& fld,
|
||||||
const label windowI
|
const label windowI
|
||||||
@ -44,7 +44,7 @@ Foam::tmp<Foam::Field<Type> > Foam::windowModel::apply
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tmp<Field<Type> > tresult(new Field<Type>(nSamples, pTraits<Type>::zero));
|
tmp<Field<Type>> tresult(new Field<Type>(nSamples, pTraits<Type>::zero));
|
||||||
Field<Type>& result = tresult.ref();
|
Field<Type>& result = tresult.ref();
|
||||||
|
|
||||||
label nWindow = nWindowsTotal(fld.size());
|
label nWindow = nWindowsTotal(fld.size());
|
||||||
|
|||||||
@ -108,7 +108,7 @@ public:
|
|||||||
virtual wordList fieldNames(const label timeIndex) const = 0;
|
virtual wordList fieldNames(const label timeIndex) const = 0;
|
||||||
|
|
||||||
//- Return a scalar field at a given time
|
//- Return a scalar field at a given time
|
||||||
virtual tmp<Field<scalar> > field
|
virtual tmp<Field<scalar>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -116,7 +116,7 @@ public:
|
|||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Return a vector field at a given time
|
//- Return a vector field at a given time
|
||||||
virtual tmp<Field<vector> > field
|
virtual tmp<Field<vector>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -124,7 +124,7 @@ public:
|
|||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Return a sphericalTensor field at a given time
|
//- Return a sphericalTensor field at a given time
|
||||||
virtual tmp<Field<sphericalTensor> > field
|
virtual tmp<Field<sphericalTensor>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -132,7 +132,7 @@ public:
|
|||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Return a symmTensor field at a given time
|
//- Return a symmTensor field at a given time
|
||||||
virtual tmp<Field<symmTensor> > field
|
virtual tmp<Field<symmTensor>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
@ -140,7 +140,7 @@ public:
|
|||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Return a tensor field at a given time
|
//- Return a tensor field at a given time
|
||||||
virtual tmp<Field<tensor> > field
|
virtual tmp<Field<tensor>> field
|
||||||
(
|
(
|
||||||
const label timeIndex,
|
const label timeIndex,
|
||||||
const label fieldIndex,
|
const label fieldIndex,
|
||||||
|
|||||||
@ -64,7 +64,7 @@ class boundaryRadiationProperties
|
|||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Ptr list of boundaryRadiationProperties
|
//- Ptr list of boundaryRadiationProperties
|
||||||
List<autoPtr<boundaryRadiationPropertiesPatch> >
|
List<autoPtr<boundaryRadiationPropertiesPatch>>
|
||||||
radBoundaryPropertiesPtrList_;
|
radBoundaryPropertiesPtrList_;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -153,7 +153,7 @@ public:
|
|||||||
) const = 0;
|
) const = 0;
|
||||||
|
|
||||||
//- Return net solid sensible enthalpy [J/Kg]
|
//- Return net solid sensible enthalpy [J/Kg]
|
||||||
virtual tmp<DimensionedField<scalar, volMesh> > RRsHs() const = 0;
|
virtual tmp<DimensionedField<scalar, volMesh>> RRsHs() const = 0;
|
||||||
|
|
||||||
//- Return specie Table for gases
|
//- Return specie Table for gases
|
||||||
virtual const speciesTable& gasTable() const = 0;
|
virtual const speciesTable& gasTable() const = 0;
|
||||||
|
|||||||
@ -188,7 +188,7 @@ public:
|
|||||||
inline tmp<volScalarField::Internal> RRs() const;
|
inline tmp<volScalarField::Internal> RRs() const;
|
||||||
|
|
||||||
//- Return net solid sensible enthalpy
|
//- Return net solid sensible enthalpy
|
||||||
inline tmp<DimensionedField<scalar, volMesh> > RRsHs() const;
|
inline tmp<DimensionedField<scalar, volMesh>> RRsHs() const;
|
||||||
|
|
||||||
//- Solve the reaction system for the given time step
|
//- Solve the reaction system for the given time step
|
||||||
// and return the characteristic time
|
// and return the characteristic time
|
||||||
|
|||||||
@ -97,10 +97,10 @@ Foam::solidChemistryModel<CompType, SolidThermo>::RRs() const
|
|||||||
|
|
||||||
|
|
||||||
template<class CompType, class SolidThermo>
|
template<class CompType, class SolidThermo>
|
||||||
inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh> >
|
inline Foam::tmp<Foam::DimensionedField<Foam::scalar, Foam::volMesh>>
|
||||||
Foam::solidChemistryModel<CompType, SolidThermo>::RRsHs() const
|
Foam::solidChemistryModel<CompType, SolidThermo>::RRsHs() const
|
||||||
{
|
{
|
||||||
tmp<DimensionedField<scalar, volMesh> > tRRsHs
|
tmp<DimensionedField<scalar, volMesh>> tRRsHs
|
||||||
(
|
(
|
||||||
new DimensionedField<scalar, volMesh>
|
new DimensionedField<scalar, volMesh>
|
||||||
(
|
(
|
||||||
|
|||||||
@ -72,7 +72,8 @@ Foam::scalar Foam::waveModels::Grimshaw::eta
|
|||||||
const scalar eps2 = eps*eps;
|
const scalar eps2 = eps*eps;
|
||||||
const scalar eps3 = eps*eps2;
|
const scalar eps3 = eps*eps2;
|
||||||
|
|
||||||
const scalar C = sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3);
|
const scalar C =
|
||||||
|
sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3);
|
||||||
|
|
||||||
const scalar ts = 3.5*h/sqrt(H/h);
|
const scalar ts = 3.5*h/sqrt(H/h);
|
||||||
const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
||||||
@ -109,7 +110,8 @@ Foam::vector Foam::waveModels::Grimshaw::Uf
|
|||||||
const scalar eps2 = eps*eps;
|
const scalar eps2 = eps*eps;
|
||||||
const scalar eps3 = eps*eps2;
|
const scalar eps3 = eps*eps2;
|
||||||
|
|
||||||
const scalar C = sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3);
|
const scalar C =
|
||||||
|
sqrt(mag(g_)*h)*sqrt(1.0 + eps - 0.05*eps2 - (3.0/70.0)*eps3);
|
||||||
|
|
||||||
const scalar ts = 3.5*h/sqrt(eps);
|
const scalar ts = 3.5*h/sqrt(eps);
|
||||||
const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
const scalar xa = -C*t + ts - X0 + x*cos(theta) + y*sin(theta);
|
||||||
@ -228,19 +230,19 @@ void Foam::waveModels::Grimshaw::setVelocity
|
|||||||
|
|
||||||
if (fraction > 0)
|
if (fraction > 0)
|
||||||
{
|
{
|
||||||
const label paddlei = faceToPaddle_[facei];
|
const label paddlei = faceToPaddle_[facei];
|
||||||
|
|
||||||
const vector Uf = this->Uf
|
const vector Uf = this->Uf
|
||||||
(
|
(
|
||||||
waveHeight_,
|
waveHeight_,
|
||||||
waterDepthRef_,
|
waterDepthRef_,
|
||||||
xPaddle_[paddlei],
|
xPaddle_[paddlei],
|
||||||
yPaddle_[paddlei],
|
yPaddle_[paddlei],
|
||||||
waveAngle_,
|
waveAngle_,
|
||||||
t,
|
t,
|
||||||
x0_,
|
x0_,
|
||||||
z
|
z
|
||||||
);
|
);
|
||||||
|
|
||||||
U_[facei] = fraction*Uf*tCoeff;
|
U_[facei] = fraction*Uf*tCoeff;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -320,19 +320,19 @@ void Foam::waveModels::McCowan::setVelocity
|
|||||||
|
|
||||||
if (fraction > 0)
|
if (fraction > 0)
|
||||||
{
|
{
|
||||||
const label paddlei = faceToPaddle_[facei];
|
const label paddlei = faceToPaddle_[facei];
|
||||||
|
|
||||||
const vector Uf = this->Uf
|
const vector Uf = this->Uf
|
||||||
(
|
(
|
||||||
waveHeight_,
|
waveHeight_,
|
||||||
waterDepthRef_,
|
waterDepthRef_,
|
||||||
xPaddle_[paddlei],
|
xPaddle_[paddlei],
|
||||||
yPaddle_[paddlei],
|
yPaddle_[paddlei],
|
||||||
waveAngle_,
|
waveAngle_,
|
||||||
t,
|
t,
|
||||||
x0_,
|
x0_,
|
||||||
z
|
z
|
||||||
);
|
);
|
||||||
|
|
||||||
U_[facei] = fraction*Uf*tCoeff;
|
U_[facei] = fraction*Uf*tCoeff;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -74,14 +74,14 @@ protected:
|
|||||||
virtual scalar newtonRapsonF1
|
virtual scalar newtonRapsonF1
|
||||||
(
|
(
|
||||||
const scalar x0,
|
const scalar x0,
|
||||||
const scalar H,
|
const scalar H,
|
||||||
const scalar h
|
const scalar h
|
||||||
) const;
|
) const;
|
||||||
|
|
||||||
virtual scalar newtonRapsonF2
|
virtual scalar newtonRapsonF2
|
||||||
(
|
(
|
||||||
const scalar x0,
|
const scalar x0,
|
||||||
const scalar H,
|
const scalar H,
|
||||||
const scalar h,
|
const scalar h,
|
||||||
const scalar xa,
|
const scalar xa,
|
||||||
const scalar m,
|
const scalar m,
|
||||||
|
|||||||
@ -615,7 +615,11 @@ void Foam::waveModels::StokesV::initialise
|
|||||||
|
|
||||||
f1 = pi*H/d - 2*pi/(k*d)*(lambda + l3*b33 + l5*(b35 + b55));
|
f1 = pi*H/d - 2*pi/(k*d)*(lambda + l3*b33 + l5*(b35 + b55));
|
||||||
|
|
||||||
f2 = (2*pi*d)/(mag(g_)*sqr(T)) - k*d/(2*pi)*tanh(k*d)*(1 + l2*c1 + l4*c2);
|
f2 =
|
||||||
|
(
|
||||||
|
(2*pi*d)/(mag(g_)*sqr(T))
|
||||||
|
- k*d/(2*pi)*tanh(k*d)*(1 + l2*c1 + l4*c2)
|
||||||
|
);
|
||||||
|
|
||||||
const scalar lambdaPr =
|
const scalar lambdaPr =
|
||||||
(f1*Bmat21 - f2*Bmat11)/(Bmat11*Bmat22 - Bmat12*Bmat21);
|
(f1*Bmat21 - f2*Bmat11)/(Bmat11*Bmat22 - Bmat12*Bmat21);
|
||||||
|
|||||||
Reference in New Issue
Block a user