mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev
This commit is contained in:
8
applications/utilities/miscellaneous/foamHelp/Allwclean
Executable file
8
applications/utilities/miscellaneous/foamHelp/Allwclean
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
cd ${0%/*} || exit 1 # run from this directory
|
||||
|
||||
wclean libso helpTypes
|
||||
wclean
|
||||
|
||||
|
||||
# ----------------------------------------------------------------- end-of-file
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -176,38 +176,32 @@ Foam::doxygenXmlParser::doxygenXmlParser
|
||||
|
||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||
|
||||
void Foam::doxygenXmlParser::skipBlock(IFstream& is, const word blockName) const
|
||||
void Foam::doxygenXmlParser::skipBlock
|
||||
(
|
||||
IFstream& is,
|
||||
const word& blockName
|
||||
) const
|
||||
{
|
||||
// recurse to move forward in 'is' until come across </blockName>
|
||||
|
||||
string closeName = "";
|
||||
|
||||
// fast-forward until we reach a '<'
|
||||
char c;
|
||||
while (is.get(c) && c != '<')
|
||||
{}
|
||||
|
||||
// check to see if this is a closing block
|
||||
if (is.get(c) && c == '/')
|
||||
while (is.good() && (closeName != blockName))
|
||||
{
|
||||
while (is.get(c) && c != '>')
|
||||
{
|
||||
closeName += c;
|
||||
}
|
||||
// fast-forward until we reach a '<'
|
||||
while (is.get(c) && c != '<')
|
||||
{}
|
||||
|
||||
if (closeName == blockName)
|
||||
// check to see if this is a closing block
|
||||
if (is.get(c) && c == '/')
|
||||
{
|
||||
// finished reading block
|
||||
return;
|
||||
closeName = "";
|
||||
|
||||
while (is.get(c) && c != '>')
|
||||
{
|
||||
closeName += c;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
skipBlock(is, blockName);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
skipBlock(is, blockName);
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,7 +209,7 @@ void Foam::doxygenXmlParser::skipBlock(IFstream& is, const word blockName) const
|
||||
void Foam::doxygenXmlParser::skipForward
|
||||
(
|
||||
IFstream& is,
|
||||
const word blockName
|
||||
const word& blockName
|
||||
) const
|
||||
{
|
||||
// recurse to move forward in 'is' until come across <blockName>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -25,8 +25,10 @@ Class
|
||||
Foam::doxygenXmlParser
|
||||
|
||||
Description
|
||||
Parser for doxygen XML
|
||||
|
||||
SourceFiles
|
||||
doxygenXmlParser.C
|
||||
|
||||
\*---------------------------------------------------------------------------*/
|
||||
|
||||
@ -65,10 +67,10 @@ public:
|
||||
// Member functions
|
||||
|
||||
//- Skip past a block
|
||||
void skipBlock(IFstream& is, const word blockName) const;
|
||||
void skipBlock(IFstream& is, const word& blockName) const;
|
||||
|
||||
//- Skip forward to block
|
||||
void skipForward(IFstream& is, const word blockName) const;
|
||||
void skipForward(IFstream& is, const word& blockName) const;
|
||||
|
||||
//- Return the entry
|
||||
template<class Type>
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -148,7 +148,12 @@ void Foam::helpType::displayDoc
|
||||
{
|
||||
FatalErrorIn
|
||||
(
|
||||
"void Foam::helpType::displayDoc(const word, const string)"
|
||||
"void Foam::helpType::displayDoc"
|
||||
"("
|
||||
"const word&, "
|
||||
"const string&, "
|
||||
"const bool"
|
||||
")"
|
||||
)
|
||||
<< "No help for type " << className << " found."
|
||||
<< " Valid options include:" << SortableList<word>(parser.toc())
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
========= |
|
||||
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
\\ / O peration |
|
||||
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
|
||||
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
|
||||
\\/ M anipulation |
|
||||
-------------------------------------------------------------------------------
|
||||
License
|
||||
@ -43,6 +43,24 @@ Description
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
bool haveAllTimes
|
||||
(
|
||||
const HashSet<word>& masterTimeDirSet,
|
||||
const instantList& timeDirs
|
||||
)
|
||||
{
|
||||
// Loop over all times
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
if (!masterTimeDirSet.found(timeDirs[timeI].name()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
argList::addNote
|
||||
@ -54,7 +72,7 @@ int main(int argc, char *argv[])
|
||||
// enable -zeroTime to prevent accidentally trashing the initial fields
|
||||
timeSelector::addOptions(true, true);
|
||||
argList::noParallel();
|
||||
# include "addRegionOption.H"
|
||||
#include "addRegionOption.H"
|
||||
argList::addBoolOption
|
||||
(
|
||||
"allRegions",
|
||||
@ -86,8 +104,8 @@ int main(int argc, char *argv[])
|
||||
"only reconstruct new times (i.e. that do not exist already)"
|
||||
);
|
||||
|
||||
# include "setRootCase.H"
|
||||
# include "createTime.H"
|
||||
#include "setRootCase.H"
|
||||
#include "createTime.H"
|
||||
|
||||
HashSet<word> selectedFields;
|
||||
if (args.optionFound("fields"))
|
||||
@ -169,6 +187,11 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
masterTimeDirs = runTime.times();
|
||||
}
|
||||
HashSet<word> masterTimeDirSet(2*masterTimeDirs.size());
|
||||
forAll(masterTimeDirs, i)
|
||||
{
|
||||
masterTimeDirSet.insert(masterTimeDirs[i].name());
|
||||
}
|
||||
|
||||
|
||||
// Set all times on processor meshes equal to reconstructed mesh
|
||||
@ -222,6 +245,21 @@ int main(int argc, char *argv[])
|
||||
Info<< "\n\nReconstructing fields for mesh " << regionName << nl
|
||||
<< endl;
|
||||
|
||||
if
|
||||
(
|
||||
newTimes
|
||||
&& regionNames.size() == 1
|
||||
&& regionDirs[0].empty()
|
||||
&& haveAllTimes(masterTimeDirSet, timeDirs)
|
||||
)
|
||||
{
|
||||
Info<< "Skipping region " << regionName
|
||||
<< " since already have all times"
|
||||
<< endl << endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
fvMesh mesh
|
||||
(
|
||||
IOobject
|
||||
@ -240,29 +278,16 @@ int main(int argc, char *argv[])
|
||||
|
||||
// check face addressing for meshes that have been decomposed
|
||||
// with a very old foam version
|
||||
# include "checkFaceAddressingComp.H"
|
||||
#include "checkFaceAddressingComp.H"
|
||||
|
||||
// Loop over all times
|
||||
forAll(timeDirs, timeI)
|
||||
{
|
||||
if (newTimes)
|
||||
if (newTimes && masterTimeDirSet.found(timeDirs[timeI].name()))
|
||||
{
|
||||
// Compare on timeName, not value
|
||||
bool foundTime = false;
|
||||
forAll(masterTimeDirs, i)
|
||||
{
|
||||
if (masterTimeDirs[i].name() == timeDirs[timeI].name())
|
||||
{
|
||||
foundTime = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundTime)
|
||||
{
|
||||
Info<< "Skipping time " << timeDirs[timeI].name()
|
||||
<< endl << endl;
|
||||
continue;
|
||||
}
|
||||
Info<< "Skipping time " << timeDirs[timeI].name()
|
||||
<< endl << endl;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user