Commit 1c71c7cb authored by Mark Olesen's avatar Mark Olesen

Merge remote-tracking branch 'origin/master' into develop

parents 916dcc85 73057447
......@@ -5,6 +5,6 @@ cd "${0%/*}" || exit # Run from this directory
#------------------------------------------------------------------------------
wmake $targetType pdrFields
wmake PDRsetFields
wmake $targetType PDRsetFields
#------------------------------------------------------------------------------
......@@ -69,13 +69,12 @@ Foam::implicitFunctions::cylinderImplicitFunction::cylinderImplicitFunction
const dictionary& dict
)
:
cylinderImplicitFunction
(
dict.get<point>("origin"),
dict.get<scalar>("radius"),
dict.getOrDefault<scalar>("scale", 1),
dict.get<vector>("direction")
)
// __INTEL_COMPILER bug with inheriting constructors?? (issue #1821)
origin_(dict.get<point>("origin")),
radius_(dict.get<scalar>("radius")),
scale_(dict.getOrDefault<scalar>("scale", 1)),
direction_(dict.get<vector>("direction").normalise()),
project_(tensor::I - direction_*direction_) // outer product
{}
......
......@@ -72,15 +72,13 @@ Foam::implicitFunctions::sinImplicitFunction::sinImplicitFunction
const dictionary& dict
)
:
sinImplicitFunction
(
dict.get<scalar>("period"),
dict.getOrDefault<scalar>("phase", 0),
dict.get<scalar>("amplitude"),
dict.get<vector>("direction"),
dict.get<vector>("up"),
dict.get<vector>("origin")
)
// __INTEL_COMPILER bug with inheriting constructors?? (issue #1821)
period_(dict.get<scalar>("period")),
phase_(dict.getOrDefault<scalar>("phase", 0)),
amplitude_(dict.get<scalar>("amplitude")),
up_(dict.get<vector>("up").normalise()),
direction_(dict.get<vector>("direction").normalise()),
origin_(dict.get<vector>("origin"))
{}
......
......@@ -43,14 +43,13 @@ Description
Read csv format:
\verbatim
readerType csv;
file "<constant>/p0vsTime.csv";
hasHeaderLine true; // skip first line
timeColumn 0; // time is in column 0
valueColumns (1); // value starts in column 1
readerType csv;
file "<constant>/p0vsTime.csv";
hasHeaderLine true; // skip first line
refColumn 0; // reference (eg, time) is in column 0
componentColumns (1); // component values starts in column 1
\endverbatim
Note
- Accessing an empty list results in an error.
- 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
(
const word& name,
std::initializer_list<std::pair<const char*,int>> compat,
const dictionary& dict
)
{
......@@ -45,7 +46,7 @@ Foam::labelList Foam::csvTableReader<Type>::getComponentColumns
labelList cols;
ITstream& is = dict.lookup(name);
ITstream& is = dict.lookupCompat(name, compat);
is.format(IOstream::ASCII);
is >> cols;
dict.checkITstream(is, name);
......@@ -113,8 +114,11 @@ Foam::csvTableReader<Type>::csvTableReader(const dictionary& dict)
:
tableReader<Type>(dict),
headerLine_(dict.get<bool>("hasHeaderLine")),
refColumn_(dict.get<label>("timeColumn")),
componentColumns_(getComponentColumns("valueColumns", dict)),
refColumn_(dict.getCompat<label>("refColumn", {{"timeColumn", 1912}})),
componentColumns_
(
getComponentColumns("componentColumns", {{"valueColumns", 1912}}, dict)
),
separator_(dict.getOrDefault<string>("separator", ",")[0])
{}
......@@ -218,9 +222,9 @@ void Foam::csvTableReader<Type>::write(Ostream& os) const
tableReader<Type>::write(os);
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();
os.format(IOstream::ASCII);
os.writeEntry("componentColumns", componentColumns_);
......
......@@ -76,6 +76,7 @@ class csvTableReader
static labelList getComponentColumns
(
const word& name,
std::initializer_list<std::pair<const char*,int>> compat,
const dictionary& dict
);
......
......@@ -264,7 +264,7 @@ void Foam::Function1Types::CSV<Type>::writeData(Ostream& os) const
os.writeEntry("nHeaderLine", nHeaderLine_);
os.writeEntry("refColumn", refColumn_);
// Force writing labelList in ascii
// Force writing labelList in ASCII
const enum IOstream::streamFormat fmt = os.format();
os.format(IOstream::ASCII);
os.writeEntry("componentColumns", componentColumns_);
......
#!/bin/sh
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
#------------------------------------------------------------------------------
......
......@@ -12,7 +12,7 @@ warning="==> skip optional libccm adapter"
# Link with static libccmio only (fewer issues)
if have_ccmio
then
wmake libso || echo "$warning (build issues detected)"
wmake $targetType || echo "$warning (build issues detected)"
else
echo $warning
fi
......
......@@ -127,7 +127,7 @@ void Foam::fv::actuationDiskSource::calcFroudeMethod
Ostream& os = file();
writeCurrentTime(os);
os << Uref << tab << Cp << tab << Ct << tab << a << tab << T << tab
os << Uref << tab << Cp << tab << Ct << tab << a << tab << T
<< endl;
}
}
......@@ -238,7 +238,7 @@ void Foam::fv::actuationDiskSource::calcVariableScalingMethod
Ostream& os = file();
writeCurrentTime(os);
os << Uref << tab << Cp << tab << Ct
os << Uref << tab << Cp << tab << Ct << tab
<< Udisk << tab << CpStar << tab << CtStar << tab << T << tab << P
<< endl;
}
......
#!/bin/sh
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/have_scotch
......
......@@ -27,7 +27,6 @@ boundaryField
outOfBounds clamp;
direction in;
readerType openFoam;
hasHeaderLine true;
file "<constant>/FluxVsdP.dat";
//nonDimensional true;
//rpm 300;
......
......@@ -173,13 +173,18 @@ findObjectDir()
# Default (local) build directory
if [ -z "$objectsDir" ]
then
relativeDir="$absdir"
appDir=.
[ -d Make ] || appDir=$(findTarget .) || exit 1 # Fatal
absdir=$(expandPath "$appDir"/.)
if [ -d "$absdir/Make" ]
then
objectsDir="${absdir}/Make/${WM_OPTIONS}"
else
relativeDir="$absdir"
appDir=.
[ -d Make ] || appDir=$(findTarget .) || exit 1 # Fatal
absdir=$(expandPath "$appDir"/.)
relativeDir="${relativeDir#${absdir}}"
objectsDir="${appDir}/Make/${WM_OPTIONS}${relativeDir}"
relativeDir="${relativeDir#${absdir}}"
objectsDir="${appDir}/Make/${WM_OPTIONS}${relativeDir}"
fi
fi
echo "$objectsDir"
......
......@@ -313,16 +313,18 @@ fi
# Clean the 'Make' directory if present
#------------------------------------------------------------------------------
if [ -d "$MakeDir" ]
if [ -d "$MakeDir" ] && [ -n "$WM_OPTIONS" ]
then
objectsDir="$MakeDir/$WM_OPTIONS"
case "$PWD" in
("$WM_PROJECT_DIR"/*)
buildPath="$WM_PROJECT_DIR/build/${WM_OPTIONS}"
objectsDir=$buildPath$(echo $PWD | sed s%$WM_PROJECT_DIR%% )
;;
esac
rm -rf "$objectsDir" 2>/dev/null
# Remove in-source directory (if any)
rm -rf "$MakeDir/$WM_OPTIONS" 2>/dev/null
# Remove out-of-source directory (if applicable)
relativeDir="${PWD#${WM_PROJECT_DIR}/}"
if [ "$relativeDir" != "$PWD" ]
then
objectsDir="${WM_PROJECT_DIR}/build/${WM_OPTIONS}/${relativeDir}"
rm -rf "$objectsDir" 2>/dev/null
fi
fi
#------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment