mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@ -5,6 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
|
|||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
wmake $targetType pdrFields
|
wmake $targetType pdrFields
|
||||||
wmake PDRsetFields
|
wmake $targetType PDRsetFields
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -69,13 +69,12 @@ Foam::implicitFunctions::cylinderImplicitFunction::cylinderImplicitFunction
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
cylinderImplicitFunction
|
// __INTEL_COMPILER bug with inheriting constructors?? (issue #1821)
|
||||||
(
|
origin_(dict.get<point>("origin")),
|
||||||
dict.get<point>("origin"),
|
radius_(dict.get<scalar>("radius")),
|
||||||
dict.get<scalar>("radius"),
|
scale_(dict.getOrDefault<scalar>("scale", 1)),
|
||||||
dict.getOrDefault<scalar>("scale", 1),
|
direction_(dict.get<vector>("direction").normalise()),
|
||||||
dict.get<vector>("direction")
|
project_(tensor::I - direction_*direction_) // outer product
|
||||||
)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -72,15 +72,13 @@ Foam::implicitFunctions::sinImplicitFunction::sinImplicitFunction
|
|||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
sinImplicitFunction
|
// __INTEL_COMPILER bug with inheriting constructors?? (issue #1821)
|
||||||
(
|
period_(dict.get<scalar>("period")),
|
||||||
dict.get<scalar>("period"),
|
phase_(dict.getOrDefault<scalar>("phase", 0)),
|
||||||
dict.getOrDefault<scalar>("phase", 0),
|
amplitude_(dict.get<scalar>("amplitude")),
|
||||||
dict.get<scalar>("amplitude"),
|
up_(dict.get<vector>("up").normalise()),
|
||||||
dict.get<vector>("direction"),
|
direction_(dict.get<vector>("direction").normalise()),
|
||||||
dict.get<vector>("up"),
|
origin_(dict.get<vector>("origin"))
|
||||||
dict.get<vector>("origin")
|
|
||||||
)
|
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -46,11 +46,10 @@ Description
|
|||||||
readerType csv;
|
readerType csv;
|
||||||
file "<constant>/p0vsTime.csv";
|
file "<constant>/p0vsTime.csv";
|
||||||
hasHeaderLine true; // skip first line
|
hasHeaderLine true; // skip first line
|
||||||
timeColumn 0; // time is in column 0
|
refColumn 0; // reference (eg, time) is in column 0
|
||||||
valueColumns (1); // value starts in column 1
|
componentColumns (1); // component values starts in column 1
|
||||||
\endverbatim
|
\endverbatim
|
||||||
|
|
||||||
|
|
||||||
Note
|
Note
|
||||||
- Accessing an empty list results in an error.
|
- Accessing an empty list results in an error.
|
||||||
- Accessing a list with a single element always returns the same value.
|
- Accessing a list with a single element always returns the same value.
|
||||||
|
|||||||
@ -37,6 +37,7 @@ template<class Type>
|
|||||||
Foam::labelList Foam::csvTableReader<Type>::getComponentColumns
|
Foam::labelList Foam::csvTableReader<Type>::getComponentColumns
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
|
std::initializer_list<std::pair<const char*,int>> compat,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -45,7 +46,7 @@ Foam::labelList Foam::csvTableReader<Type>::getComponentColumns
|
|||||||
|
|
||||||
labelList cols;
|
labelList cols;
|
||||||
|
|
||||||
ITstream& is = dict.lookup(name);
|
ITstream& is = dict.lookupCompat(name, compat);
|
||||||
is.format(IOstream::ASCII);
|
is.format(IOstream::ASCII);
|
||||||
is >> cols;
|
is >> cols;
|
||||||
dict.checkITstream(is, name);
|
dict.checkITstream(is, name);
|
||||||
@ -113,8 +114,11 @@ Foam::csvTableReader<Type>::csvTableReader(const dictionary& dict)
|
|||||||
:
|
:
|
||||||
tableReader<Type>(dict),
|
tableReader<Type>(dict),
|
||||||
headerLine_(dict.get<bool>("hasHeaderLine")),
|
headerLine_(dict.get<bool>("hasHeaderLine")),
|
||||||
refColumn_(dict.get<label>("timeColumn")),
|
refColumn_(dict.getCompat<label>("refColumn", {{"timeColumn", 1912}})),
|
||||||
componentColumns_(getComponentColumns("valueColumns", dict)),
|
componentColumns_
|
||||||
|
(
|
||||||
|
getComponentColumns("componentColumns", {{"valueColumns", 1912}}, dict)
|
||||||
|
),
|
||||||
separator_(dict.getOrDefault<string>("separator", ",")[0])
|
separator_(dict.getOrDefault<string>("separator", ",")[0])
|
||||||
{}
|
{}
|
||||||
|
|
||||||
@ -218,9 +222,9 @@ void Foam::csvTableReader<Type>::write(Ostream& os) const
|
|||||||
tableReader<Type>::write(os);
|
tableReader<Type>::write(os);
|
||||||
|
|
||||||
os.writeEntry("hasHeaderLine", headerLine_);
|
os.writeEntry("hasHeaderLine", headerLine_);
|
||||||
os.writeEntry("timeColumn", refColumn_);
|
os.writeEntry("refColumn", refColumn_);
|
||||||
|
|
||||||
// Force writing labelList in ascii
|
// Force writing labelList in ASCII
|
||||||
const enum IOstream::streamFormat fmt = os.format();
|
const enum IOstream::streamFormat fmt = os.format();
|
||||||
os.format(IOstream::ASCII);
|
os.format(IOstream::ASCII);
|
||||||
os.writeEntry("componentColumns", componentColumns_);
|
os.writeEntry("componentColumns", componentColumns_);
|
||||||
|
|||||||
@ -76,6 +76,7 @@ class csvTableReader
|
|||||||
static labelList getComponentColumns
|
static labelList getComponentColumns
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
|
std::initializer_list<std::pair<const char*,int>> compat,
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -264,7 +264,7 @@ void Foam::Function1Types::CSV<Type>::writeData(Ostream& os) const
|
|||||||
os.writeEntry("nHeaderLine", nHeaderLine_);
|
os.writeEntry("nHeaderLine", nHeaderLine_);
|
||||||
os.writeEntry("refColumn", refColumn_);
|
os.writeEntry("refColumn", refColumn_);
|
||||||
|
|
||||||
// Force writing labelList in ascii
|
// Force writing labelList in ASCII
|
||||||
const enum IOstream::streamFormat fmt = os.format();
|
const enum IOstream::streamFormat fmt = os.format();
|
||||||
os.format(IOstream::ASCII);
|
os.format(IOstream::ASCII);
|
||||||
os.writeEntry("componentColumns", componentColumns_);
|
os.writeEntry("componentColumns", componentColumns_);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd "${0%/*}" || exit # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments -no-recursion
|
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments -no-recursion "$@"
|
||||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
|
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -12,7 +12,7 @@ warning="==> skip optional libccm adapter"
|
|||||||
# Link with static libccmio only (fewer issues)
|
# Link with static libccmio only (fewer issues)
|
||||||
if have_ccmio
|
if have_ccmio
|
||||||
then
|
then
|
||||||
wmake libso || echo "$warning (build issues detected)"
|
wmake $targetType || echo "$warning (build issues detected)"
|
||||||
else
|
else
|
||||||
echo $warning
|
echo $warning
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -127,7 +127,7 @@ void Foam::fv::actuationDiskSource::calcFroudeMethod
|
|||||||
Ostream& os = file();
|
Ostream& os = file();
|
||||||
writeCurrentTime(os);
|
writeCurrentTime(os);
|
||||||
|
|
||||||
os << Uref << tab << Cp << tab << Ct << tab << a << tab << T << tab
|
os << Uref << tab << Cp << tab << Ct << tab << a << tab << T
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -238,7 +238,7 @@ void Foam::fv::actuationDiskSource::calcVariableScalingMethod
|
|||||||
Ostream& os = file();
|
Ostream& os = file();
|
||||||
writeCurrentTime(os);
|
writeCurrentTime(os);
|
||||||
|
|
||||||
os << Uref << tab << Cp << tab << Ct
|
os << Uref << tab << Cp << tab << Ct << tab
|
||||||
<< Udisk << tab << CpStar << tab << CtStar << tab << T << tab << P
|
<< Udisk << tab << CpStar << tab << CtStar << tab << T << tab << P
|
||||||
<< endl;
|
<< endl;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
cd "${0%/*}" || exit # Run from this directory
|
cd "${0%/*}" || exit # Run from this directory
|
||||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments -no-recursion
|
. ${WM_PROJECT_DIR:?}/wmake/scripts/AllwmakeParseArguments -no-recursion "$@"
|
||||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
|
. ${WM_PROJECT_DIR:?}/wmake/scripts/wmakeFunctions # Require wmake functions
|
||||||
. ${WM_PROJECT_DIR:?}/wmake/scripts/have_scotch
|
. ${WM_PROJECT_DIR:?}/wmake/scripts/have_scotch
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,6 @@ boundaryField
|
|||||||
outOfBounds clamp;
|
outOfBounds clamp;
|
||||||
direction in;
|
direction in;
|
||||||
readerType openFoam;
|
readerType openFoam;
|
||||||
hasHeaderLine true;
|
|
||||||
file "<constant>/FluxVsdP.dat";
|
file "<constant>/FluxVsdP.dat";
|
||||||
//nonDimensional true;
|
//nonDimensional true;
|
||||||
//rpm 300;
|
//rpm 300;
|
||||||
|
|||||||
@ -173,6 +173,10 @@ findObjectDir()
|
|||||||
# Default (local) build directory
|
# Default (local) build directory
|
||||||
if [ -z "$objectsDir" ]
|
if [ -z "$objectsDir" ]
|
||||||
then
|
then
|
||||||
|
if [ -d "$absdir/Make" ]
|
||||||
|
then
|
||||||
|
objectsDir="${absdir}/Make/${WM_OPTIONS}"
|
||||||
|
else
|
||||||
relativeDir="$absdir"
|
relativeDir="$absdir"
|
||||||
appDir=.
|
appDir=.
|
||||||
[ -d Make ] || appDir=$(findTarget .) || exit 1 # Fatal
|
[ -d Make ] || appDir=$(findTarget .) || exit 1 # Fatal
|
||||||
@ -181,6 +185,7 @@ findObjectDir()
|
|||||||
relativeDir="${relativeDir#${absdir}}"
|
relativeDir="${relativeDir#${absdir}}"
|
||||||
objectsDir="${appDir}/Make/${WM_OPTIONS}${relativeDir}"
|
objectsDir="${appDir}/Make/${WM_OPTIONS}${relativeDir}"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
echo "$objectsDir"
|
echo "$objectsDir"
|
||||||
}
|
}
|
||||||
|
|||||||
18
wmake/wclean
18
wmake/wclean
@ -313,17 +313,19 @@ fi
|
|||||||
# Clean the 'Make' directory if present
|
# Clean the 'Make' directory if present
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|
||||||
if [ -d "$MakeDir" ]
|
if [ -d "$MakeDir" ] && [ -n "$WM_OPTIONS" ]
|
||||||
then
|
then
|
||||||
objectsDir="$MakeDir/$WM_OPTIONS"
|
# Remove in-source directory (if any)
|
||||||
case "$PWD" in
|
rm -rf "$MakeDir/$WM_OPTIONS" 2>/dev/null
|
||||||
("$WM_PROJECT_DIR"/*)
|
|
||||||
buildPath="$WM_PROJECT_DIR/build/${WM_OPTIONS}"
|
# Remove out-of-source directory (if applicable)
|
||||||
objectsDir=$buildPath$(echo $PWD | sed s%$WM_PROJECT_DIR%% )
|
relativeDir="${PWD#${WM_PROJECT_DIR}/}"
|
||||||
;;
|
if [ "$relativeDir" != "$PWD" ]
|
||||||
esac
|
then
|
||||||
|
objectsDir="${WM_PROJECT_DIR}/build/${WM_OPTIONS}/${relativeDir}"
|
||||||
rm -rf "$objectsDir" 2>/dev/null
|
rm -rf "$objectsDir" 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
# Remove the lnInclude directory if present
|
# Remove the lnInclude directory if present
|
||||||
|
|||||||
Reference in New Issue
Block a user