mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
BUG: incorrect IOobject instance for absolute windows path (#1238)
STYLE: remove unused local variables in edgeMeshFormat
This commit is contained in:
@ -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) 2018 OpenCFD Ltd.
|
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
License
|
License
|
||||||
@ -30,6 +30,9 @@ License
|
|||||||
#if defined WM_SP
|
#if defined WM_SP
|
||||||
# define PRECISION "SP"
|
# define PRECISION "SP"
|
||||||
# define SCALAR_SIZE (8*sizeof(float))
|
# define SCALAR_SIZE (8*sizeof(float))
|
||||||
|
#elif defined(WM_SPDP)
|
||||||
|
# define PRECISION "SPDP"
|
||||||
|
# define SCALAR_SIZE (8*sizeof(float))
|
||||||
#elif defined WM_DP
|
#elif defined WM_DP
|
||||||
# define PRECISION "DP"
|
# define PRECISION "DP"
|
||||||
# define SCALAR_SIZE (8*sizeof(double))
|
# define SCALAR_SIZE (8*sizeof(double))
|
||||||
@ -38,9 +41,23 @@ License
|
|||||||
# define SCALAR_SIZE (8*sizeof(long double))
|
# define SCALAR_SIZE (8*sizeof(long double))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Test additional exported symbols
|
||||||
|
#ifdef _WIN32
|
||||||
|
#define defineWindowsLibEntryPoint(libName) \
|
||||||
|
extern "C" void lib_##libName##_entry_point() {}
|
||||||
|
#else
|
||||||
|
#define defineWindowsLibEntryPoint(libName) /* Nothing */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
|
||||||
|
|
||||||
|
// The 'extern C' export is independent of namespace
|
||||||
|
namespace Foam
|
||||||
|
{
|
||||||
|
defineWindowsLibEntryPoint(dummyLib);
|
||||||
|
}
|
||||||
|
|
||||||
const std::string Foam::Detail::dummyLib::arch(WM_ARCH);
|
const std::string Foam::Detail::dummyLib::arch(WM_ARCH);
|
||||||
|
|
||||||
const std::string Foam::Detail::dummyLib::compiler(WM_COMPILER);
|
const std::string Foam::Detail::dummyLib::compiler(WM_COMPILER);
|
||||||
|
|||||||
@ -160,10 +160,10 @@ bool Foam::IOobject::fileNameComponents
|
|||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// Absolute path (starts with '/')
|
// Absolute path (starts with '/' or 'd:/')
|
||||||
// => no local
|
// => no local
|
||||||
|
|
||||||
instance = path.substr(first, last);
|
instance = path.substr(0, last);
|
||||||
|
|
||||||
const std::string ending = path.substr(last+1);
|
const std::string ending = path.substr(last+1);
|
||||||
nameLen = ending.size(); // The raw length of name
|
nameLen = ending.size(); // The raw length of name
|
||||||
|
|||||||
@ -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 |
|
\\ / A nd | Copyright (C) 2017-2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2011-2017 OpenFOAM Foundation
|
| Copyright (C) 2011-2017 OpenFOAM Foundation
|
||||||
@ -52,10 +52,6 @@ bool Foam::fileFormats::edgeMeshFormat::read
|
|||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
fileName dir = filename.path();
|
|
||||||
fileName caseName = dir.name();
|
|
||||||
fileName rootPath = dir.path();
|
|
||||||
|
|
||||||
// Construct dummy time to use as an objectRegistry
|
// Construct dummy time to use as an objectRegistry
|
||||||
Time dummyTime
|
Time dummyTime
|
||||||
(
|
(
|
||||||
@ -117,10 +113,7 @@ bool Foam::fileFormats::edgeMeshFormat::read
|
|||||||
<< exit(FatalError);
|
<< exit(FatalError);
|
||||||
}
|
}
|
||||||
|
|
||||||
// read points:
|
|
||||||
is >> pointLst;
|
is >> pointLst;
|
||||||
|
|
||||||
// read edges:
|
|
||||||
is >> edgeLst;
|
is >> edgeLst;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@ -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 |
|
\\ / A nd | Copyright (C) 2019 OpenCFD Ltd.
|
||||||
\\/ M anipulation |
|
\\/ M anipulation |
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
| Copyright (C) 2013-2017 OpenFOAM Foundation
|
| Copyright (C) 2013-2017 OpenFOAM Foundation
|
||||||
@ -50,10 +50,6 @@ bool Foam::fileFormats::extendedEdgeMeshFormat::read
|
|||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
|
|
||||||
fileName dir = filename.path();
|
|
||||||
fileName caseName = dir.name();
|
|
||||||
fileName rootPath = dir.path();
|
|
||||||
|
|
||||||
// Construct dummy time to use as an objectRegistry
|
// Construct dummy time to use as an objectRegistry
|
||||||
Time dummyTime
|
Time dummyTime
|
||||||
(
|
(
|
||||||
|
|||||||
Reference in New Issue
Block a user