Skip to content
Commits on Source (2)
......@@ -8,15 +8,19 @@ export WM_CONTINUE_ON_ERROR=true # Optional unit
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Note
# - '-prefix=..' to define installation prefix (default: FOAM_USER_LIBBIN)
# Build into FOAM_USER_{APPBIN,LIBBIN} unless otherwise specified with
# -prefix or FOAM_MODULE_{APPBIN,LIBBIN}, CMAKE_INSTALL_PREFIX env varables
#
# Note
# - MPI detection may not work properly with later VTK/ParaView versions
#------------------------------------------------------------------------------
# Default to user location
: "${FOAM_MODULE_PREFIX:=${FOAM_USER_LIBBIN%/*}}"
: "${CMAKE_INSTALL_PREFIX:=$FOAM_MODULE_PREFIX}"
# - Long form to avoid dash 0.5.8 error (issue #1757)
[ -n "$FOAM_MODULE_PREFIX" ] || FOAM_MODULE_PREFIX="${FOAM_USER_LIBBIN%/*}"
[ -n "$CMAKE_INSTALL_PREFIX" ] || CMAKE_INSTALL_PREFIX="$FOAM_MODULE_PREFIX"
export FOAM_MODULE_PREFIX CMAKE_INSTALL_PREFIX
export CMAKE_INSTALL_PREFIX
cmakeOpts="-DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX"
#------------------------------------------------------------------------------
......
......@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2018 OpenCFD Ltd.
Copyright (C) 2018-2020 OpenCFD Ltd.
Copyright (C) 2018 CINECA
-------------------------------------------------------------------------------
License
......@@ -203,9 +203,9 @@ bool Foam::functionObjects::catalystFunctionObject::read(const dictionary& dict)
osha1.reset();
osha1 << outputDir_ << scripts_;
if (adaptor_.valid() && oldDigest != osha1.digest())
if (adaptor_ && oldDigest != osha1.digest())
{
adaptor_().reset(outputDir_, scripts_);
adaptor_->reset(outputDir_, scripts_);
}
......@@ -278,10 +278,10 @@ bool Foam::functionObjects::catalystFunctionObject::execute()
sigFpe::ignore sigFpeHandling; //<- disable in local scope
if (!adaptor_.valid())
if (!adaptor_)
{
adaptor_.reset(new catalyst::coprocess());
adaptor_().reset(outputDir_, scripts_);
adaptor_->reset(outputDir_, scripts_);
}
catalyst::dataQuery dataq(time_);
......@@ -378,7 +378,7 @@ bool Foam::functionObjects::catalystFunctionObject::write()
bool Foam::functionObjects::catalystFunctionObject::end()
{
// Only here for extra feedback
if (log && adaptor_.valid())
if (log && adaptor_)
{
Info<< type() << ": Disconnecting ParaView Catalyst..." << nl;
}
......
......@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2019 OpenCFD Ltd.
Copyright (C) 2017-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -223,7 +223,7 @@ void Foam::vtk::fvMeshAdaptor::convertVolFieldInternal
vtuData.convertField(fld)
);
if (ptfPtr.valid())
if (ptfPtr)
{
dataset->GetPointData()->AddArray
(
......
......@@ -9,7 +9,7 @@ export WM_CONTINUE_ON_ERROR=true # Optional unit
#
# Note
# Build into FOAM_USER_{APPBIN,LIBBIN} unless otherwise specified with
# -prefix or FOAM_MODULE_{APPBIN,LIBBIN} env varables
# -prefix or FOAM_MODULE_{APPBIN,LIBBIN}, CMAKE_INSTALL_PREFIX env varables
#
# Note
# For paraview-5.7 (and later) plugins are built into their own subdirs.
......@@ -23,13 +23,13 @@ export WM_CONTINUE_ON_ERROR=true # Optional unit
#------------------------------------------------------------------------------
# Default to user location
: "${FOAM_MODULE_PREFIX:=${FOAM_USER_LIBBIN%/*}}"
: "${CMAKE_INSTALL_PREFIX:=$FOAM_MODULE_PREFIX}"
# - Long form to avoid dash 0.5.8 error (issue #1757)
[ -n "$FOAM_MODULE_PREFIX" ] || FOAM_MODULE_PREFIX="${FOAM_USER_LIBBIN%/*}"
[ -n "$CMAKE_INSTALL_PREFIX" ] || CMAKE_INSTALL_PREFIX="$FOAM_MODULE_PREFIX"
export FOAM_MODULE_PREFIX CMAKE_INSTALL_PREFIX
export CMAKE_INSTALL_PREFIX
cmakeOpts="-DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX"
#------------------------------------------------------------------------------
warnIncomplete()
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2017-2019 OpenCFD Ltd.
Copyright (C) 2017-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -560,7 +560,7 @@ void Foam::vtkPVblockMesh::PrintSelf(ostream& os, vtkIndent indent) const
<< (meshPtr_ ? meshPtr_->nCells() : 0) << "\n";
os << indent << "Number of available time steps: "
<< (dbPtr_.valid() ? dbPtr_().times().size() : 0) << endl;
<< (dbPtr_ ? dbPtr_->times().size() : 0) << endl;
#endif
}
......
......@@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2017-2019 OpenCFD Ltd.
Copyright (C) 2017-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -713,7 +713,7 @@ std::vector<double> Foam::vtkPVFoam::findTimes(const bool skipZero) const
{
std::vector<double> times;
if (dbPtr_.valid())
if (dbPtr_)
{
const Time& runTime = dbPtr_();
// Get times list. Flush first to force refresh.
......@@ -948,7 +948,7 @@ void Foam::vtkPVFoam::PrintSelf(ostream& os, vtkIndent indent) const
<< (volMeshPtr_ ? volMeshPtr_->nCells() : 0) << "\n";
os << indent << "Number of available time steps: "
<< (dbPtr_.valid() ? dbPtr_().times().size() : 0) << "\n";
<< (dbPtr_ ? dbPtr_->times().size() : 0) << "\n";
os << indent << "mesh region: " << meshRegion_ << "\n";
}
......@@ -961,7 +961,7 @@ void Foam::vtkPVFoam::printInfo() const
<< "nPoints: " << (volMeshPtr_ ? volMeshPtr_->nPoints() : 0) << "\n"
<< "nCells: " << (volMeshPtr_ ? volMeshPtr_->nCells() : 0) << "\n"
<< "nTimes: "
<< (dbPtr_.valid() ? dbPtr_().times().size() : 0) << "\n";
<< (dbPtr_ ? dbPtr_->times().size() : 0) << "\n";
std::vector<double> times = this->findTimes(reader_->GetSkipZeroTime());
......
......@@ -5,7 +5,7 @@
\\ / A nd | www.openfoam.com
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2017-2019 OpenCFD Ltd.
Copyright (C) 2017-2020 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
......@@ -421,7 +421,7 @@ void Foam::vtkPVFoam::convertVolFieldBlock
vtuData.convertField(fld)
);
if (ptfPtr.valid())
if (ptfPtr)
{
dataset->GetPointData()->AddArray
(
......
......@@ -8,20 +8,21 @@ export WM_CONTINUE_ON_ERROR=true # Optional unit
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# Note
# - use '-prefix=..' to define installation prefix (default: FOAM_LIBBIN)
# Build into FOAM_USER_{APPBIN,LIBBIN} unless otherwise specified with
# -prefix or FOAM_MODULE_{APPBIN,LIBBIN}, CMAKE_INSTALL_PREFIX env varables
#
# Note
# - can build with VTK or ParaView (preferred) libraries
# - MPI detection may not work properly with later VTK/ParaView versions
#------------------------------------------------------------------------------
# Default is openfoam (FOAM_LIBBIN)
: "${CMAKE_INSTALL_PREFIX:=${FOAM_LIBBIN%/*}}"
# Default to user location
# - Long form to avoid dash 0.5.8 error (issue #1757)
[ -n "$FOAM_MODULE_PREFIX" ] || FOAM_MODULE_PREFIX="${FOAM_USER_LIBBIN%/*}"
[ -n "$CMAKE_INSTALL_PREFIX" ] || CMAKE_INSTALL_PREFIX="$FOAM_MODULE_PREFIX"
export FOAM_MODULE_PREFIX CMAKE_INSTALL_PREFIX
unset cmakeOpts
if [ -n "$CMAKE_INSTALL_PREFIX" ]
then
export CMAKE_INSTALL_PREFIX
cmakeOpts="-DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX"
fi
cmakeOpts="-DCMAKE_INSTALL_PREFIX=$CMAKE_INSTALL_PREFIX"
#------------------------------------------------------------------------------
......