Completed update ...ErrorIn -> ...ErrorInFunction

Avoids the clutter and maintenance effort associated with providing the
function signature string.
This commit is contained in:
Henry Weller
2015-11-11 09:03:39 +00:00
parent cc99b65d77
commit 5e6a7ea282
678 changed files with 3357 additions and 8219 deletions

View File

@ -45,7 +45,7 @@ int main(int argc, char *argv[])
dictionary dict;
IOWarningIn("main", dict) << "warning 3" << endl;
IOWarningInFunction(dict) << "warning 3" << endl;
FatalErrorInFunction << "error 1" << endl;
FatalErrorInFunction << "error 2" << exit(FatalError);

View File

@ -28,12 +28,12 @@
#+END_SRC
so
#+BEGIN_SRC C++
WarningIn("className::functionName()")
WarningInFunction
<< "Warning message"
#+END_SRC
*not*
#+BEGIN_SRC C++
WarningIn("className::functionName()")
WarningInFunction
<< "Warning message"
#+END_SRC

View File

@ -87,7 +87,7 @@ void Foam::CLASSNAME::operator=(const CLASSNAME& rhs)
// Check for assignment to self
if (this == &rhs)
{
FatalErrorIn("Foam::CLASSNAME::operator=(const Foam::CLASSNAME&)")
FatalErrorInFunction
<< "Attempted assignment to self"
<< abort(FatalError);
}

View 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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -103,11 +103,8 @@ void Foam::CLASSNAME<TemplateArgument>::operator=
// Check for assignment to self
if (this == &rhs)
{
FatalErrorIn
(
"Foam::CLASSNAME<TemplateArgument>::operator="
"(const Foam::CLASSNAME<TemplateArgument>&)"
) << "Attempted assignment to self"
FatalErrorInFunction
<< "Attempted assignment to self"
<< abort(FatalError);
}
}

View File

@ -145,12 +145,8 @@ void Foam::ODESolver::solve
}
}
FatalErrorIn
(
"ODESolver::solve"
"(const scalar xStart, const scalar xEnd,"
"scalarField& y, scalar& dxTry) const"
) << "Integration steps greater than maximum " << maxSteps_
FatalErrorInFunction
<< "Integration steps greater than maximum " << maxSteps_
<< "xStart = " << xStart << ", xEnd = " << xEnd
<< ", x = " << x << ", dxDid = " << step.dxDid
<< exit(FatalError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,11 +41,8 @@ Foam::autoPtr<Foam::ODESolver> Foam::ODESolver::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"ODESolver::New"
"(const dictionary& dict, const ODESystem& odes)"
) << "Unknown ODESolver type "
FatalErrorInFunction
<< "Unknown ODESolver type "
<< ODESolverTypeName << nl << nl
<< "Valid ODESolvers are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -145,7 +145,7 @@ void Foam::SIBS::solve
if (xNew_ == x)
{
FatalErrorIn("ODES::SIBS")
FatalErrorInFunction
<< "step size underflow"
<< exit(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -74,7 +74,7 @@ void Foam::adaptiveSolver::solve
if (dx < VSMALL)
{
FatalErrorIn("adaptiveSolver::solve")
FatalErrorInFunction
<< "stepsize underflow"
<< exit(FatalError);
}

View File

@ -252,7 +252,7 @@ void Foam::seulex::solve
if (mag(dx) <= mag(x)*sqr(SMALL))
{
WarningIn("seulex::solve(scalar& x, scalarField& y, stepState&")
WarningInFunction
<< "step size underflow :" << dx << endl;
}

View File

@ -253,7 +253,7 @@ Foam::fileName Foam::cwd()
}
else
{
FatalErrorIn("Foam::cwd()")
FatalErrorInFunction
<< "Couldn't get the current working directory"
<< exit(FatalError);
@ -437,7 +437,7 @@ bool Foam::mkDir(const fileName& pathName, mode_t mode)
{
case EPERM:
{
FatalErrorIn("Foam::mkDir(const fileName&, mode_t)")
FatalErrorInFunction
<< "The filesystem containing " << pathName
<< " does not support the creation of directories."
<< exit(FatalError);
@ -453,7 +453,7 @@ bool Foam::mkDir(const fileName& pathName, mode_t mode)
case EFAULT:
{
FatalErrorIn("Foam::mkDir(const fileName&, mode_t)")
FatalErrorInFunction
<< "" << pathName
<< " points outside your accessible address space."
<< exit(FatalError);
@ -463,7 +463,7 @@ bool Foam::mkDir(const fileName& pathName, mode_t mode)
case EACCES:
{
FatalErrorIn("Foam::mkDir(const fileName&, mode_t)")
FatalErrorInFunction
<< "The parent directory does not allow write "
"permission to the process,"<< nl
<< "or one of the directories in " << pathName
@ -475,7 +475,7 @@ bool Foam::mkDir(const fileName& pathName, mode_t mode)
case ENAMETOOLONG:
{
FatalErrorIn("Foam::mkDir(const fileName&, mode_t)")
FatalErrorInFunction
<< "" << pathName << " is too long."
<< exit(FatalError);
@ -491,7 +491,7 @@ bool Foam::mkDir(const fileName& pathName, mode_t mode)
}
else
{
FatalErrorIn("Foam::mkDir(const fileName&, mode_t)")
FatalErrorInFunction
<< "Couldn't create directory " << pathName
<< exit(FatalError);
@ -501,7 +501,7 @@ bool Foam::mkDir(const fileName& pathName, mode_t mode)
case ENOTDIR:
{
FatalErrorIn("Foam::mkDir(const fileName&, mode_t)")
FatalErrorInFunction
<< "A component used as a directory in " << pathName
<< " is not, in fact, a directory."
<< exit(FatalError);
@ -511,7 +511,7 @@ bool Foam::mkDir(const fileName& pathName, mode_t mode)
case ENOMEM:
{
FatalErrorIn("Foam::mkDir(const fileName&, mode_t)")
FatalErrorInFunction
<< "Insufficient kernel memory was available to make "
"directory " << pathName << '.'
<< exit(FatalError);
@ -521,7 +521,7 @@ bool Foam::mkDir(const fileName& pathName, mode_t mode)
case EROFS:
{
FatalErrorIn("Foam::mkDir(const fileName&, mode_t)")
FatalErrorInFunction
<< "" << pathName
<< " refers to a file on a read-only filesystem."
<< exit(FatalError);
@ -531,7 +531,7 @@ bool Foam::mkDir(const fileName& pathName, mode_t mode)
case ELOOP:
{
FatalErrorIn("Foam::mkDir(const fileName&, mode_t)")
FatalErrorInFunction
<< "Too many symbolic links were encountered in resolving "
<< pathName << '.'
<< exit(FatalError);
@ -541,7 +541,7 @@ bool Foam::mkDir(const fileName& pathName, mode_t mode)
case ENOSPC:
{
FatalErrorIn("Foam::mkDir(const fileName&, mode_t)")
FatalErrorInFunction
<< "The device containing " << pathName
<< " has no room for the new directory or "
<< "the user's disk quota is exhausted."
@ -552,7 +552,7 @@ bool Foam::mkDir(const fileName& pathName, mode_t mode)
default:
{
FatalErrorIn("Foam::mkDir(const fileName&, mode_t)")
FatalErrorInFunction
<< "Couldn't create directory " << pathName
<< exit(FatalError);
@ -862,7 +862,7 @@ bool Foam::ln(const fileName& src, const fileName& dst)
if (exists(dst))
{
WarningIn("ln(const fileName&, const fileName&)")
WarningInFunction
<< "destination " << dst << " already exists. Not linking."
<< endl;
return false;
@ -870,7 +870,7 @@ bool Foam::ln(const fileName& src, const fileName& dst)
if (src.isAbsolute() && !exists(src))
{
WarningIn("ln(const fileName&, const fileName&)")
WarningInFunction
<< "source " << src << " does not exist." << endl;
return false;
}
@ -881,7 +881,7 @@ bool Foam::ln(const fileName& src, const fileName& dst)
}
else
{
WarningIn("ln(const fileName&, const fileName&)")
WarningInFunction
<< "symlink from " << src << " to " << dst << " failed." << endl;
return false;
}
@ -987,7 +987,7 @@ bool Foam::rmDir(const fileName& directory)
// Attempt to open directory and set the structure pointer
if ((source = ::opendir(directory.c_str())) == NULL)
{
WarningIn("rmDir(const fileName&)")
WarningInFunction
<< "cannot open directory " << directory << endl;
return false;
@ -1007,7 +1007,7 @@ bool Foam::rmDir(const fileName& directory)
{
if (!rmDir(path))
{
WarningIn("rmDir(const fileName&)")
WarningInFunction
<< "failed to remove directory " << fName
<< " while removing directory " << directory
<< endl;
@ -1021,7 +1021,7 @@ bool Foam::rmDir(const fileName& directory)
{
if (!rm(path))
{
WarningIn("rmDir(const fileName&)")
WarningInFunction
<< "failed to remove file " << fName
<< " while removing directory " << directory
<< endl;
@ -1037,7 +1037,7 @@ bool Foam::rmDir(const fileName& directory)
if (!rm(directory))
{
WarningIn("rmDir(const fileName&)")
WarningInFunction
<< "failed to remove directory " << directory << endl;
::closedir(source);
@ -1062,10 +1062,8 @@ void Foam::fdClose(const int fd)
{
if (close(fd) != 0)
{
FatalErrorIn
(
"fdClose(const int fd)"
) << "close error on " << fd << endl
FatalErrorInFunction
<< "close error on " << fd << endl
<< abort(FatalError);
}
}
@ -1085,10 +1083,8 @@ bool Foam::ping
if ((hostPtr = ::gethostbyname(destName.c_str())) == NULL)
{
FatalErrorIn
(
"Foam::ping(const string&, ...)"
) << "gethostbyname error " << h_errno << " for host " << destName
FatalErrorInFunction
<< "gethostbyname error " << h_errno << " for host " << destName
<< abort(FatalError);
}
@ -1099,10 +1095,8 @@ bool Foam::ping
sockfd = ::socket(AF_INET, SOCK_STREAM, 0);
if (sockfd < 0)
{
FatalErrorIn
(
"Foam::ping(const string&, const label)"
) << "socket error"
FatalErrorInFunction
<< "socket error"
<< abort(FatalError);
}
@ -1176,7 +1170,7 @@ void* Foam::dlOpen(const fileName& lib, const bool check)
if (!handle && check)
{
WarningIn("dlOpen(const fileName&, const bool)")
WarningInFunction
<< "dlopen error : " << ::dlerror()
<< endl;
}
@ -1224,7 +1218,7 @@ void* Foam::dlSym(void* handle, const std::string& symbol)
if (error)
{
WarningIn("dlSym(void*, const std::string&)")
WarningInFunction
<< "Cannot lookup symbol " << symbol << " : " << error
<< endl;
}

View File

@ -149,7 +149,7 @@ namespace Foam
if (!hasWarned)
{
hasWarned = true;
WarningIn("fileMonitorWatcher(const bool, const label)")
WarningInFunction
<< "Failed allocating an inotify descriptor : "
<< string(strerror(errno)) << endl
<< " Please increase the number of allowable "
@ -166,7 +166,7 @@ namespace Foam
}
}
#else
FatalErrorIn("fileMonitorWatcher(const bool, const label)")
FatalErrorInFunction
<< "You selected inotify but this file was compiled"
<< " without FOAM_USE_INOTIFY"
<< " Please select another fileModification test method"
@ -191,7 +191,7 @@ namespace Foam
{
if (inotify_rm_watch(inotifyFd_, int(dirWatches_[i])))
{
WarningIn("fileMonitor::~fileMonitor()")
WarningInFunction
<< "Failed deleting directory watch "
<< dirWatches_[i] << endl;
}
@ -229,7 +229,7 @@ namespace Foam
if (dirWatchID < 0)
{
FatalErrorIn("addWatch(const label, const fileName&)")
FatalErrorInFunction
<< "Failed adding watch " << watchFd
<< " to directory " << fName << " due to "
<< string(strerror(errno))
@ -240,7 +240,7 @@ namespace Foam
if (watchFd < dirWatches_.size() && dirWatches_[watchFd] != -1)
{
// Reuse of watchFd : should have dir watchID set to -1.
FatalErrorIn("addWatch(const label, const fileName&)")
FatalErrorInFunction
<< "Problem adding watch " << watchFd
<< " to file " << fName
<< abort(FatalError);
@ -255,7 +255,7 @@ namespace Foam
if (watchFd < lastMod_.size() && lastMod_[watchFd] != 0)
{
// Reuse of watchFd : should have lastMod set to 0.
FatalErrorIn("addWatch(const label, const fileName&)")
FatalErrorInFunction
<< "Problem adding watch " << watchFd
<< " to file " << fName
<< abort(FatalError);
@ -320,7 +320,7 @@ void Foam::fileMonitor::checkFiles() const
if (ready < 0)
{
FatalErrorIn("fileMonitor::checkFiles()")
FatalErrorInFunction
<< "Problem in issuing select."
<< abort(FatalError);
}
@ -336,7 +336,7 @@ void Foam::fileMonitor::checkFiles() const
if (nBytes < 0)
{
FatalErrorIn("fileMonitor::checkFiles()")
FatalErrorInFunction
<< "read of " << watcher_->inotifyFd_
<< " failed with " << label(nBytes)
<< abort(FatalError);
@ -473,7 +473,7 @@ Foam::label Foam::fileMonitor::addWatch(const fileName& fName)
if (watchFd < 0)
{
WarningIn("fileMonitor::addWatch(const fileName&)")
WarningInFunction
<< "could not add watch for file " << fName << endl;
}
else
@ -593,11 +593,8 @@ void Foam::fileMonitor::updateStates
<< endl;
}
WarningIn
(
"fileMonitor::updateStates"
"(const bool, const bool) const"
) << "Delaying reading " << watchFile_[watchFd]
WarningInFunction
<< "Delaying reading " << watchFile_[watchFd]
<< " due to inconsistent "
"file time-stamps between processors" << endl;
}

View File

@ -151,10 +151,8 @@ void Foam::regExp::set(const char* pattern, const bool ignoreCase) const
char errbuf[200];
regerror(err, preg_, errbuf, sizeof(errbuf));
FatalErrorIn
(
"regExp::set(const char*, const bool ignoreCase)"
) << "Failed to compile regular expression '" << pattern << "'"
FatalErrorInFunction
<< "Failed to compile regular expression '" << pattern << "'"
<< nl << errbuf
<< exit(FatalError);
}

View File

@ -92,10 +92,8 @@ void Foam::sigFpe::sigHandler(int)
// Reset old handling
if (sigaction(SIGFPE, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::sigSegv::sigHandler()"
) << "Cannot reset SIGFPE trapping"
FatalErrorInFunction
<< "Cannot reset SIGFPE trapping"
<< abort(FatalError);
}
@ -128,10 +126,8 @@ Foam::sigFpe::~sigFpe()
// Reset signal
if (oldAction_.sa_handler && sigaction(SIGFPE, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::sigFpe::~sigFpe()"
) << "Cannot reset SIGFPE trapping"
FatalErrorInFunction
<< "Cannot reset SIGFPE trapping"
<< abort(FatalError);
}
#endif
@ -153,10 +149,8 @@ void Foam::sigFpe::set(const bool verbose)
{
if (oldAction_.sa_handler)
{
FatalErrorIn
(
"Foam::sigFpe::set()"
) << "Cannot call sigFpe::set() more than once"
FatalErrorInFunction
<< "Cannot call sigFpe::set() more than once"
<< abort(FatalError);
}
@ -180,10 +174,8 @@ void Foam::sigFpe::set(const bool verbose)
sigemptyset(&newAction.sa_mask);
if (sigaction(SIGFPE, &newAction, &oldAction_) < 0)
{
FatalErrorIn
(
"Foam::sigFpe::set()"
) << "Cannot set SIGFPE trapping"
FatalErrorInFunction
<< "Cannot set SIGFPE trapping"
<< abort(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,10 +40,8 @@ void Foam::sigInt::sigHandler(int)
// Reset old handling
if (sigaction(SIGINT, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::sigInt::sigHandler()"
) << "Cannot reset SIGINT trapping"
FatalErrorInFunction
<< "Cannot reset SIGINT trapping"
<< abort(FatalError);
}
@ -70,10 +68,8 @@ Foam::sigInt::~sigInt()
// Reset old handling
if (sigaction(SIGINT, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::sigInt::~sigInt()"
) << "Cannot reset SIGINT trapping"
FatalErrorInFunction
<< "Cannot reset SIGINT trapping"
<< abort(FatalError);
}
}
@ -85,10 +81,8 @@ void Foam::sigInt::set(const bool)
{
if (oldAction_.sa_handler)
{
FatalErrorIn
(
"Foam::sigInt::set()"
) << "Cannot call sigInt::set() more than once"
FatalErrorInFunction
<< "Cannot call sigInt::set() more than once"
<< abort(FatalError);
}
@ -98,10 +92,8 @@ void Foam::sigInt::set(const bool)
sigemptyset(&newAction.sa_mask);
if (sigaction(SIGINT, &newAction, &oldAction_) < 0)
{
FatalErrorIn
(
"Foam::sigInt::set()"
) << "Cannot set SIGINT trapping"
FatalErrorInFunction
<< "Cannot set SIGINT trapping"
<< abort(FatalError);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,10 +40,8 @@ void Foam::sigQuit::sigHandler(int)
// Reset old handling
if (sigaction(SIGQUIT, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::sigQuit::sigHandler()"
) << "Cannot reset SIGQUIT trapping"
FatalErrorInFunction
<< "Cannot reset SIGQUIT trapping"
<< abort(FatalError);
}
@ -72,10 +70,8 @@ Foam::sigQuit::~sigQuit()
// Reset old handling
if (oldAction_.sa_handler && sigaction(SIGQUIT, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::sigQuit::~sigQuit()"
) << "Cannot reset SIGQUIT trapping"
FatalErrorInFunction
<< "Cannot reset SIGQUIT trapping"
<< abort(FatalError);
}
}
@ -87,10 +83,8 @@ void Foam::sigQuit::set(const bool verbose)
{
if (oldAction_.sa_handler)
{
FatalErrorIn
(
"Foam::sigQuit::set()"
) << "Cannot call sigQuit::set() more than once"
FatalErrorInFunction
<< "Cannot call sigQuit::set() more than once"
<< abort(FatalError);
}
@ -100,10 +94,8 @@ void Foam::sigQuit::set(const bool verbose)
sigemptyset(&newAction.sa_mask);
if (sigaction(SIGQUIT, &newAction, &oldAction_) < 0)
{
FatalErrorIn
(
"Foam::sigQuit::set()"
) << "Cannot set SIGQUIT trapping"
FatalErrorInFunction
<< "Cannot set SIGQUIT trapping"
<< abort(FatalError);
}
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -40,10 +40,8 @@ void Foam::sigSegv::sigHandler(int)
// Reset old handling
if (sigaction(SIGSEGV, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::sigSegv::sigHandler()"
) << "Cannot reset SIGSEGV trapping"
FatalErrorInFunction
<< "Cannot reset SIGSEGV trapping"
<< abort(FatalError);
}
@ -72,10 +70,8 @@ Foam::sigSegv::~sigSegv()
// Reset old handling
if (sigaction(SIGSEGV, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::sigSegv::~sigSegv()"
) << "Cannot reset SIGSEGV trapping"
FatalErrorInFunction
<< "Cannot reset SIGSEGV trapping"
<< abort(FatalError);
}
}
@ -87,10 +83,8 @@ void Foam::sigSegv::set(const bool)
{
if (oldAction_.sa_handler)
{
FatalErrorIn
(
"Foam::sigSegv::set()"
) << "Cannot call sigSegv::set() more than once"
FatalErrorInFunction
<< "Cannot call sigSegv::set() more than once"
<< abort(FatalError);
}
@ -100,10 +94,8 @@ void Foam::sigSegv::set(const bool)
sigemptyset(&newAction.sa_mask);
if (sigaction(SIGSEGV, &newAction, &oldAction_) < 0)
{
FatalErrorIn
(
"Foam::sigSegv::set()"
) << "Cannot set SIGSEGV trapping"
FatalErrorInFunction
<< "Cannot set SIGSEGV trapping"
<< abort(FatalError);
}
}

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -80,10 +80,8 @@ void Foam::sigStopAtWriteNow::sigHandler(int)
// Reset old handling
if (sigaction(signal_, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::sigStopAtWriteNow::sigHandler(int)"
) << "Cannot reset " << signal_ << " trapping"
FatalErrorInFunction
<< "Cannot reset " << signal_ << " trapping"
<< abort(FatalError);
}
@ -127,10 +125,8 @@ Foam::sigStopAtWriteNow::~sigStopAtWriteNow()
{
if (sigaction(signal_, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::sigStopAtWriteNow::~sigStopAtWriteNow()"
) << "Cannot reset " << signal_ << " trapping"
FatalErrorInFunction
<< "Cannot reset " << signal_ << " trapping"
<< abort(FatalError);
}
}
@ -146,11 +142,8 @@ void Foam::sigStopAtWriteNow::set(const bool verbose)
// Check that the signal is different from the writeNowSignal
if (sigWriteNow::signal_ == signal_)
{
FatalErrorIn
(
"Foam::sigStopAtWriteNow::sigStopAtWriteNow"
"(const bool, const Time&)"
) << "stopAtWriteNowSignal : " << signal_
FatalErrorInFunction
<< "stopAtWriteNowSignal : " << signal_
<< " cannot be the same as the writeNowSignal."
<< " Please change this in the controlDict ("
<< findEtcFile("controlDict", false) << ")."
@ -164,11 +157,8 @@ void Foam::sigStopAtWriteNow::set(const bool verbose)
sigemptyset(&newAction.sa_mask);
if (sigaction(signal_, &newAction, &oldAction_) < 0)
{
FatalErrorIn
(
"Foam::sigStopAtWriteNow::sigStopAtWriteNow"
"(const bool, const Time&)"
) << "Cannot set " << signal_ << " trapping"
FatalErrorInFunction
<< "Cannot set " << signal_ << " trapping"
<< abort(FatalError);
}

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -108,10 +108,8 @@ Foam::sigWriteNow::~sigWriteNow()
{
if (sigaction(signal_, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::sigWriteNow::~sigWriteNow()"
) << "Cannot reset " << signal_ << " trapping"
FatalErrorInFunction
<< "Cannot reset " << signal_ << " trapping"
<< abort(FatalError);
}
}
@ -130,10 +128,8 @@ void Foam::sigWriteNow::set(const bool verbose)
sigemptyset(&newAction.sa_mask);
if (sigaction(signal_, &newAction, &oldAction_) < 0)
{
FatalErrorIn
(
"Foam::sigWriteNow::sigWriteNow(const bool, const Time&)"
) << "Cannot set " << signal_ << " trapping"
FatalErrorInFunction
<< "Cannot set " << signal_ << " trapping"
<< abort(FatalError);
}

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,10 +67,8 @@ Foam::timer::timer(const unsigned int newTimeOut)
// Is singleton since handler is static function
if (oldTimeOut_ != 0)
{
FatalErrorIn
(
"Foam::timer::timer(const unsigned int)"
) << "timer already used."
FatalErrorInFunction
<< "timer already used."
<< abort(FatalError);
}
@ -84,10 +82,8 @@ Foam::timer::timer(const unsigned int newTimeOut)
if (sigaction(SIGALRM, &newAction, &oldAction_) < 0)
{
FatalErrorIn
(
"Foam::timer::timer(const unsigned int)"
) << "sigaction(SIGALRM) error"
FatalErrorInFunction
<< "sigaction(SIGALRM) error"
<< abort(FatalError);
}
@ -125,11 +121,8 @@ Foam::timer::~timer()
// Restore signal handler
if (sigaction(SIGALRM, &oldAction_, NULL) < 0)
{
FatalErrorIn
(
"Foam::timer::~timer(const struct sigaction&"
"const struct sigaction&)"
) << "sigaction(SIGALRM) error"
FatalErrorInFunction
<< "sigaction(SIGALRM) error"
<< abort(FatalError);
}
}

View File

@ -638,7 +638,7 @@ bool Foam::GAMGAgglomeration::checkRestriction
if (nNewCoarse > nCoarse)
{
//WarningIn("GAMGAgglomeration::checkRestriction(..)")
//WarningInFunction
// << "Have " << nCoarse
// << " agglomerated cells but " << nNewCoarse
// << " disconnected regions" << endl;

View File

@ -34,7 +34,7 @@ void Foam::UPstream::addValidParOptions(HashTable<string>& validParOptions)
bool Foam::UPstream::init(int& argc, char**& argv)
{
FatalErrorIn("UPstream::init(int& argc, char**& argv)")
FatalErrorInFunction
<< "Trying to use the dummy Pstream library." << nl
<< "This dummy library cannot be used in parallel mode"
<< Foam::exit(FatalError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -76,10 +76,8 @@ void PstreamGlobals::checkCommunicator
|| comm >= PstreamGlobals::MPICommunicators_.size()
)
{
FatalErrorIn
(
"PstreamGlobals::checkCommunicator(const label, const label)"
) << "otherProcNo:" << otherProcNo << " : illegal communicator "
FatalErrorInFunction
<< "otherProcNo:" << otherProcNo << " : illegal communicator "
<< comm << endl
<< "Communicator should be within range 0.."
<< PstreamGlobals::MPICommunicators_.size()-1 << abort(FatalError);

View File

@ -137,7 +137,7 @@ Foam::UIPstream::UIPstream(const int fromProcNo, PstreamBuffers& buffers)
{
if (commsType() != UPstream::scheduled && !buffers.finishedSendsCalled_)
{
FatalErrorIn("UIPstream::UIPstream(const int, PstreamBuffers&)")
FatalErrorInFunction
<< "PstreamBuffers::finishedSends() never called." << endl
<< "Please call PstreamBuffers::finishedSends() after doing"
<< " all your sends (using UOPstream) and before doing any"
@ -269,11 +269,8 @@ Foam::label Foam::UIPstream::read
)
)
{
FatalErrorIn
(
"UIPstream::read"
"(const int fromProcNo, char* buf, std::streamsize bufSize)"
) << "MPI_Recv cannot receive incomming message"
FatalErrorInFunction
<< "MPI_Recv cannot receive incomming message"
<< Foam::abort(FatalError);
return 0;
@ -295,11 +292,8 @@ Foam::label Foam::UIPstream::read
if (messageSize > bufSize)
{
FatalErrorIn
(
"UIPstream::read"
"(const int fromProcNo, char* buf, std::streamsize bufSize)"
) << "buffer (" << label(bufSize)
FatalErrorInFunction
<< "buffer (" << label(bufSize)
<< ") not large enough for incomming message ("
<< messageSize << ')'
<< Foam::abort(FatalError);
@ -325,11 +319,8 @@ Foam::label Foam::UIPstream::read
)
)
{
FatalErrorIn
(
"UIPstream::read"
"(const int fromProcNo, char* buf, std::streamsize bufSize)"
) << "MPI_Recv cannot start non-blocking receive"
FatalErrorInFunction
<< "MPI_Recv cannot start non-blocking receive"
<< Foam::abort(FatalError);
return 0;
@ -351,11 +342,8 @@ Foam::label Foam::UIPstream::read
}
else
{
FatalErrorIn
(
"UIPstream::read"
"(const int fromProcNo, char* buf, std::streamsize bufSize)"
) << "Unsupported communications type "
FatalErrorInFunction
<< "Unsupported communications type "
<< commsType
<< Foam::abort(FatalError);

View File

@ -136,12 +136,8 @@ bool Foam::UOPstream::write
}
else
{
FatalErrorIn
(
"UOPstream::write"
"(const int fromProcNo, char* buf, std::streamsize bufSize"
", const int)"
) << "Unsupported communications type "
FatalErrorInFunction
<< "Unsupported communications type "
<< UPstream::commsTypeNames[commsType]
<< Foam::abort(FatalError);
}

View File

@ -76,7 +76,7 @@ bool Foam::UPstream::init(int& argc, char**& argv)
if (numprocs <= 1)
{
FatalErrorIn("UPstream::init(int& argc, char**& argv)")
FatalErrorInFunction
<< "bool IPstream::init(int& argc, char**& argv) : "
"attempt to run parallel on 1 processor"
<< Foam::abort(FatalError);
@ -100,7 +100,7 @@ bool Foam::UPstream::init(int& argc, char**& argv)
}
else
{
FatalErrorIn("UPstream::init(int& argc, char**& argv)")
FatalErrorInFunction
<< "UPstream::init(int& argc, char**& argv) : "
<< "environment variable MPI_BUFFER_SIZE not defined"
<< Foam::abort(FatalError);
@ -137,7 +137,7 @@ void Foam::UPstream::exit(int errnum)
label n = PstreamGlobals::outstandingRequests_.size();
PstreamGlobals::outstandingRequests_.clear();
WarningIn("UPstream::exit(int)")
WarningInFunction
<< "There are still " << n << " outstanding MPI_Requests." << endl
<< "This means that your code exited before doing a"
<< " UPstream::waitRequests()." << endl
@ -311,14 +311,8 @@ void Foam::UPstream::allocatePstreamCommunicator
}
else if (index > PstreamGlobals::MPIGroups_.size())
{
FatalErrorIn
(
"UPstream::allocatePstreamCommunicator\n"
"(\n"
" const label parentIndex,\n"
" const labelList& subRanks\n"
")\n"
) << "PstreamGlobals out of sync with UPstream data. Problem."
FatalErrorInFunction
<< "PstreamGlobals out of sync with UPstream data. Problem."
<< Foam::exit(FatalError);
}
@ -329,14 +323,8 @@ void Foam::UPstream::allocatePstreamCommunicator
if (index != UPstream::worldComm)
{
FatalErrorIn
(
"UPstream::allocateCommunicator\n"
"(\n"
" const label parentIndex,\n"
" const labelList& subRanks\n"
")\n"
) << "world communicator should always be index "
FatalErrorInFunction
<< "world communicator should always be index "
<< UPstream::worldComm << Foam::exit(FatalError);
}
@ -393,14 +381,8 @@ void Foam::UPstream::allocatePstreamCommunicator
)
)
{
FatalErrorIn
(
"UPstream::allocatePstreamCommunicator\n"
"(\n"
" const label,\n"
" const labelList&\n"
")\n"
) << "Problem :"
FatalErrorInFunction
<< "Problem :"
<< " when allocating communicator at " << index
<< " from ranks " << procIDs_[index]
<< " of parent " << parentIndex
@ -473,10 +455,8 @@ void Foam::UPstream::waitRequests(const label start)
)
)
{
FatalErrorIn
(
"UPstream::waitRequests()"
) << "MPI_Waitall returned with error" << Foam::endl;
FatalErrorInFunction
<< "MPI_Waitall returned with error" << Foam::endl;
}
resetRequests(start);
@ -499,10 +479,8 @@ void Foam::UPstream::waitRequest(const label i)
if (i >= PstreamGlobals::outstandingRequests_.size())
{
FatalErrorIn
(
"UPstream::waitRequest(const label)"
) << "There are " << PstreamGlobals::outstandingRequests_.size()
FatalErrorInFunction
<< "There are " << PstreamGlobals::outstandingRequests_.size()
<< " outstanding send requests and you are asking for i=" << i
<< nl
<< "Maybe you are mixing blocking/non-blocking comms?"
@ -518,10 +496,8 @@ void Foam::UPstream::waitRequest(const label i)
)
)
{
FatalErrorIn
(
"UPstream::waitRequest()"
) << "MPI_Wait returned with error" << Foam::endl;
FatalErrorInFunction
<< "MPI_Wait returned with error" << Foam::endl;
}
if (debug)
@ -542,10 +518,8 @@ bool Foam::UPstream::finishedRequest(const label i)
if (i >= PstreamGlobals::outstandingRequests_.size())
{
FatalErrorIn
(
"UPstream::finishedRequest(const label)"
) << "There are " << PstreamGlobals::outstandingRequests_.size()
FatalErrorInFunction
<< "There are " << PstreamGlobals::outstandingRequests_.size()
<< " outstanding send requests and you are asking for i=" << i
<< nl
<< "Maybe you are mixing blocking/non-blocking comms?"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2012-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2012-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -71,18 +71,8 @@ void Foam::allReduce
)
)
{
FatalErrorIn
(
"void Foam::allReduce\n"
"(\n"
" Type&,\n"
" int,\n"
" MPI_Datatype,\n"
" MPI_Op,\n"
" const BinaryOp&,\n"
" const int\n"
")\n"
) << "MPI_Recv failed"
FatalErrorInFunction
<< "MPI_Recv failed"
<< Foam::abort(FatalError);
}
@ -104,18 +94,8 @@ void Foam::allReduce
)
)
{
FatalErrorIn
(
"void Foam::allReduce\n"
"(\n"
" Type&,\n"
" int,\n"
" MPI_Datatype,\n"
" MPI_Op,\n"
" const BinaryOp&,\n"
" const int\n"
")\n"
) << "MPI_Send failed"
FatalErrorInFunction
<< "MPI_Send failed"
<< Foam::abort(FatalError);
}
}
@ -143,18 +123,8 @@ void Foam::allReduce
)
)
{
FatalErrorIn
(
"void Foam::allReduce\n"
"(\n"
" Type&,\n"
" int,\n"
" MPI_Datatype,\n"
" MPI_Op,\n"
" const BinaryOp&,\n"
" const int\n"
")\n"
) << "MPI_Send failed"
FatalErrorInFunction
<< "MPI_Send failed"
<< Foam::abort(FatalError);
}
}
@ -175,18 +145,8 @@ void Foam::allReduce
)
)
{
FatalErrorIn
(
"void Foam::allReduce\n"
"(\n"
" Type&,\n"
" int,\n"
" MPI_Datatype,\n"
" MPI_Op,\n"
" const BinaryOp&,\n"
" const int\n"
")\n"
) << "MPI_Recv failed"
FatalErrorInFunction
<< "MPI_Recv failed"
<< Foam::abort(FatalError);
}
}

View File

@ -160,14 +160,8 @@ void Foam::externalCoupledTemperatureMixedFvPatchScalarField::transferData
}
else
{
FatalErrorIn
(
"void Foam::externalCoupledTemperatureMixedFvPatchScalarField::"
"transferData"
"("
"OFstream&"
") const"
) << "Condition requires either compressible turbulence and/or "
FatalErrorInFunction
<< "Condition requires either compressible turbulence and/or "
<< "thermo model to be available" << exit(FatalError);
}

View File

@ -143,16 +143,8 @@ externalWallHeatFluxTemperatureFvPatchScalarField
}
else
{
FatalErrorIn
(
"externalWallHeatFluxTemperatureFvPatchScalarField::"
"externalWallHeatFluxTemperatureFvPatchScalarField\n"
"(\n"
" const fvPatch& p,\n"
" const DimensionedField<scalar, volMesh>& iF,\n"
" const dictionary& dict\n"
")\n"
) << "\n patch type '" << p.type()
FatalErrorInFunction
<< "\n patch type '" << p.type()
<< "' either q or h and Ta were not found '"
<< "\n for patch " << p.name()
<< " of field " << dimensionedInternalField().name()
@ -311,11 +303,8 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
}
default:
{
FatalErrorIn
(
"externalWallHeatFluxTemperatureFvPatchScalarField"
"::updateCoeffs()"
) << "Illegal heat flux mode " << operationModeNames[mode_]
FatalErrorInFunction
<< "Illegal heat flux mode " << operationModeNames[mode_]
<< exit(FatalError);
}
}
@ -370,13 +359,8 @@ void Foam::externalWallHeatFluxTemperatureFvPatchScalarField::write
}
default:
{
FatalErrorIn
(
"void externalWallHeatFluxTemperatureFvPatchScalarField::write"
"("
"Ostream& os"
") const"
) << "Illegal heat flux mode " << operationModeNames[mode_]
FatalErrorInFunction
<< "Illegal heat flux mode " << operationModeNames[mode_]
<< abort(FatalError);
}
}

View File

@ -132,10 +132,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
}
else
{
FatalErrorIn
(
"temperatureCoupledBase::kappa(const scalarField&) const"
)
FatalErrorInFunction
<< "Kappa defined to employ " << KMethodTypeNames_[method_]
<< " method, but thermo package not available"
<< exit(FatalError);
@ -196,10 +193,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
}
else
{
FatalErrorIn
(
"temperatureCoupledBase::kappa(const scalarField&) const"
)
FatalErrorInFunction
<< "Did not find field " << kappaName_
<< " on mesh " << mesh.name() << " patch " << patch_.name()
<< nl
@ -215,10 +209,7 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa
default:
{
FatalErrorIn
(
"temperatureCoupledBase::kappa(const scalarField&) const"
)
FatalErrorInFunction
<< "Unimplemented method " << KMethodTypeNames_[method_] << nl
<< "Please set 'kappa' to one of " << KMethodTypeNames_.toc()
<< " and 'kappaName' to the name of the volScalar"

View File

@ -231,11 +231,8 @@ baffleThickness() const
{
if (thickness_.size() != patch().size())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
" template<class solidType>"
" tmp<scalarField> thermalBaffle1DFvPatchScalarField<solidType>"
" baffleThickness() const",
solidDict_
)<< " Field thickness has not been specified "
<< " for patch " << this->patch().name()

View File

@ -219,10 +219,8 @@ void turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs()
}
default:
{
FatalErrorIn
(
"turbulentHeatFluxTemperatureFvPatchScalarField::updateCoeffs()"
) << "Unknown heat source type. Valid types are: "
FatalErrorInFunction
<< "Unknown heat source type. Valid types are: "
<< heatSourceTypeNames_ << nl << exit(FatalError);
}
}

View File

@ -93,16 +93,7 @@ turbulentTemperatureCoupledBaffleMixedFvPatchScalarField
{
if (!isA<mappedPatchBase>(this->patch().patch()))
{
FatalErrorIn
(
"turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::"
"turbulentTemperatureCoupledBaffleMixedFvPatchScalarField\n"
"(\n"
" const fvPatch& p,\n"
" const DimensionedField<scalar, volMesh>& iF,\n"
" const dictionary& dict\n"
")\n"
) << "\n patch type '" << p.type()
FatalErrorInFunction
<< "' not type '" << mappedPatchBase::typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << dimensionedInternalField().name()

View File

@ -99,16 +99,7 @@ turbulentTemperatureRadCoupledMixedFvPatchScalarField
{
if (!isA<mappedPatchBase>(this->patch().patch()))
{
FatalErrorIn
(
"turbulentTemperatureRadCoupledMixedFvPatchScalarField::"
"turbulentTemperatureRadCoupledMixedFvPatchScalarField\n"
"(\n"
" const fvPatch& p,\n"
" const DimensionedField<scalar, volMesh>& iF,\n"
" const dictionary& dict\n"
")\n"
) << "\n patch type '" << p.type()
FatalErrorInFunction
<< "' not type '" << mappedPatchBase::typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << dimensionedInternalField().name()

View File

@ -49,10 +49,7 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::checkType()
{
if (!isA<wallFvPatch>(patch()))
{
FatalErrorIn
(
"alphatJayatillekeWallFunctionFvPatchScalarField::checkType()"
)
FatalErrorInFunction
<< "Patch type for patch " << patch().name() << " must be wall\n"
<< "Current patch type is " << patch().type() << nl
<< exit(FatalError);

View File

@ -48,10 +48,8 @@ void alphatJayatillekeWallFunctionFvPatchScalarField::checkType()
{
if (!isA<wallFvPatch>(patch()))
{
FatalErrorIn
(
"alphatJayatillekeWallFunctionFvPatchScalarField::checkType()"
) << "Invalid wall function specification" << nl
FatalErrorInFunction
<< "Invalid wall function specification" << nl
<< " Patch type for patch " << patch().name()
<< " must be wall" << nl
<< " Current patch type is " << patch().type() << nl << endl

View File

@ -136,17 +136,8 @@ Foam::LESModel<BasicTurbulenceModel>::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"LESModel::New"
"("
"const volScalarField&, "
"const volVectorField&, "
"const surfaceScalarField&, "
"transportModel&, "
"const word&"
")"
) << "Unknown LESModel type "
FatalErrorInFunction
<< "Unknown LESModel type "
<< modelType << nl << nl
<< "Valid LESModel types:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -103,13 +103,13 @@ void Foam::LESModels::IDDESDelta::calcDelta()
if (nD == 2)
{
WarningIn("IDDESDelta::calcDelta()")
WarningInFunction
<< "Case is 2D, LES is not strictly applicable" << nl
<< endl;
}
else if (nD != 3)
{
FatalErrorIn("IDDESDelta::calcDelta()")
FatalErrorInFunction
<< "Case must be either 2D or 3D" << exit(FatalError);
}

View File

@ -78,10 +78,8 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"LESdelta::New(const word& name, const turbulenceModel& turbulence)"
) << "Unknown LESdelta type "
FatalErrorInFunction
<< "Unknown LESdelta type "
<< deltaType << nl << nl
<< "Valid LESdelta types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()
@ -119,12 +117,8 @@ Foam::autoPtr<Foam::LESdelta> Foam::LESdelta::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"LESdelta::New(const word& name, "
"const turbulenceModel& turbulence, "
"const dictionaryConstructorTable&)"
) << "Unknown LESdelta type "
FatalErrorInFunction
<< "Unknown LESdelta type "
<< deltaType << nl << nl
<< "Valid LESdelta types are :" << endl
<< additionalConstructors.sortedToc()

View File

@ -52,7 +52,7 @@ void Foam::LESModels::cubeRootVolDelta::calcDelta()
}
else if (nD == 2)
{
WarningIn("cubeRootVolDelta::calcDelta()")
WarningInFunction
<< "Case is 2D, LES is not strictly applicable\n"
<< endl;
@ -72,7 +72,7 @@ void Foam::LESModels::cubeRootVolDelta::calcDelta()
}
else
{
FatalErrorIn("cubeRootVolDelta::calcDelta()")
FatalErrorInFunction
<< "Case is not 3D or 2D, LES is not applicable"
<< exit(FatalError);
}

View File

@ -90,7 +90,7 @@ void Foam::LESModels::maxDeltaxyz::calcDelta()
}
else if (nD == 2)
{
WarningIn("maxDeltaxyz::calcDelta()")
WarningInFunction
<< "Case is 2D, LES is not strictly applicable\n"
<< endl;
@ -98,7 +98,7 @@ void Foam::LESModels::maxDeltaxyz::calcDelta()
}
else
{
FatalErrorIn("maxDeltaxyz::calcDelta()")
FatalErrorInFunction
<< "Case is not 3D or 2D, LES is not applicable"
<< exit(FatalError);
}

View File

@ -51,10 +51,8 @@ Foam::autoPtr<Foam::LESfilter> Foam::LESfilter::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"LESfilter::New(const fvMesh&, const dictionary&)"
) << "Unknown LESfilter type "
FatalErrorInFunction
<< "Unknown LESfilter type "
<< filterType << nl << nl
<< "Valid LESfilter types are :" << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -148,17 +148,8 @@ Foam::RASModel<BasicTurbulenceModel>::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"RASModel::New"
"("
"const volScalarField&, "
"const volVectorField&, "
"const surfaceScalarField&, "
"transportModel&, "
"const word&"
")"
) << "Unknown RASModel type "
FatalErrorInFunction
<< "Unknown RASModel type "
<< modelType << nl << nl
<< "Valid RASModel types:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -321,7 +321,7 @@ tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::k() const
template<class BasicTurbulenceModel>
tmp<volScalarField> SpalartAllmaras<BasicTurbulenceModel>::epsilon() const
{
WarningIn("tmp<volScalarField> SpalartAllmaras::epsilon() const")
WarningInFunction
<< "Turbulence kinetic energy dissipation rate not defined for "
<< "Spalart-Allmaras model. Returning zero field"
<< endl;

View File

@ -60,10 +60,8 @@ atmBoundaryLayer::atmBoundaryLayer(const vectorField& p, const dictionary& dict)
{
if (mag(flowDir_) < SMALL || mag(zDir_) < SMALL)
{
FatalErrorIn
(
"atmBoundaryLayer(const dictionary&)"
) << "magnitude of n or z must be greater than zero"
FatalErrorInFunction
<< "magnitude of n or z must be greater than zero"
<< abort(FatalError);
}

View File

@ -168,10 +168,8 @@ Foam::ReynoldsStress<BasicTurbulenceModel>::ReynoldsStress
{
if (couplingFactor_.value() < 0.0 || couplingFactor_.value() > 1.0)
{
FatalErrorIn
(
"ReynoldsStress::ReynoldsStress"
) << "couplingFactor = " << couplingFactor_
FatalErrorInFunction
<< "couplingFactor = " << couplingFactor_
<< " is not in range 0 - 1" << nl
<< exit(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2013-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -110,13 +110,8 @@ Foam::TurbulenceModel<Alpha, Rho, BasicTurbulenceModel, TransportModel>::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"TurbulenceModel::New"
"(const alphaField&, const rhoField&, "
"const volVectorField&, const surfaceScalarField&, "
"transportModel&, const word&)"
) << "Unknown TurbulenceModel type "
FatalErrorInFunction
<< "Unknown TurbulenceModel type "
<< modelType << nl << nl
<< "Valid TurbulenceModel types:" << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -41,7 +41,7 @@ void Foam::epsilonWallFunctionFvPatchScalarField::checkType()
{
if (!isA<wallFvPatch>(patch()))
{
FatalErrorIn("epsilonWallFunctionFvPatchScalarField::checkType()")
FatalErrorInFunction
<< "Invalid wall function specification" << nl
<< " Patch type for patch " << patch().name()
<< " must be wall" << nl

View File

@ -43,7 +43,7 @@ void fWallFunctionFvPatchScalarField::checkType()
{
if (!isA<wallFvPatch>(patch()))
{
FatalErrorIn("fWallFunctionFvPatchScalarField::checkType()")
FatalErrorInFunction
<< "Invalid wall function specification" << nl
<< " Patch type for patch " << patch().name()
<< " must be wall" << nl

View File

@ -41,7 +41,7 @@ void kLowReWallFunctionFvPatchScalarField::checkType()
{
if (!isA<wallFvPatch>(patch()))
{
FatalErrorIn("kLowReWallFunctionFvPatchScalarField::checkType()")
FatalErrorInFunction
<< "Invalid wall function specification" << nl
<< " Patch type for patch " << patch().name()
<< " must be wall" << nl

View File

@ -40,7 +40,7 @@ void kqRWallFunctionFvPatchField<Type>::checkType()
{
if (!isA<wallFvPatch>(this->patch()))
{
FatalErrorIn("kqRWallFunctionFvPatchField::checkType()")
FatalErrorInFunction
<< "Invalid wall function specification" << nl
<< " Patch type for patch " << this->patch().name()
<< " must be wall" << nl

View File

@ -45,7 +45,7 @@ void nutWallFunctionFvPatchScalarField::checkType()
{
if (!isA<wallFvPatch>(patch()))
{
FatalErrorIn("nutWallFunctionFvPatchScalarField::checkType()")
FatalErrorInFunction
<< "Invalid wall function specification" << nl
<< " Patch type for patch " << patch().name()
<< " must be wall" << nl

View File

@ -47,7 +47,7 @@ void omegaWallFunctionFvPatchScalarField::checkType()
{
if (!isA<wallFvPatch>(patch()))
{
FatalErrorIn("omegaWallFunctionFvPatchScalarField::checkType()")
FatalErrorInFunction
<< "Invalid wall function specification" << nl
<< " Patch type for patch " << patch().name()
<< " must be wall" << nl

View File

@ -43,7 +43,7 @@ void v2WallFunctionFvPatchScalarField::checkType()
{
if (!isA<wallFvPatch>(patch()))
{
FatalErrorIn("v2WallFunctionFvPatchScalarField::checkType()")
FatalErrorInFunction
<< "Invalid wall function specification" << nl
<< " Patch type for patch " << patch().name()
<< " must be wall" << nl

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,9 +47,8 @@ Foam::autoPtr<Foam::reactionRateFlameArea> Foam::reactionRateFlameArea::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"reactionRateFlameArea::New(const psiReactionThermo&)",
dict
) << "Unknown reactionRateFlameArea type "
<< reactionRateFlameAreaType << endl << endl

View File

@ -39,11 +39,8 @@ inline const Foam::surfaceScalarField& Foam::combustionModel::phi() const
}
else
{
FatalErrorIn
(
"const Foam::compressibleTurbulenceModel& "
"Foam::combustionModel::turbulence() const "
) << "turbulencePtr_ is empty. Please use "
FatalErrorInFunction
<< "turbulencePtr_ is empty. Please use "
<< "combustionModel::setTurbulence "
<< "(compressibleTurbulenceModel& )"
<< abort(FatalError);
@ -62,11 +59,8 @@ Foam::combustionModel::turbulence() const
}
else
{
FatalErrorIn
(
"const Foam::compressibleTurbulenceModel& "
"Foam::combustionModel::turbulence() const "
) << "turbulencePtr_ is empty. Please use "
FatalErrorInFunction
<< "turbulencePtr_ is empty. Please use "
<< "combustionModel::setTurbulence "
<< "(compressibleTurbulenceModel& )"
<< abort(FatalError);

View File

@ -57,10 +57,8 @@ Foam::combustionModels::psiCombustionModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"psiCombustionModel::New"
) << "Unknown psiCombustionModel type "
FatalErrorInFunction
<< "Unknown psiCombustionModel type "
<< combModelName << endl << endl
<< "Valid combustionModels are : " << endl
<< dictionaryConstructorTablePtr_->toc()

View File

@ -57,10 +57,8 @@ Foam::combustionModels::rhoCombustionModel::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"rhoCombustionModel::New"
) << "Unknown rhoCombustionModel type "
FatalErrorInFunction
<< "Unknown rhoCombustionModel type "
<< combTypeName << endl << endl
<< "Valid combustionModels are : " << endl
<< dictionaryConstructorTablePtr_->toc()

View File

@ -68,16 +68,7 @@ singleStepCombustion<CombThermoType, ThermoType>::singleStepCombustion
}
else
{
FatalErrorIn
(
"singleStepCombustion<CombThermoType, ThermoType>::"
"singleStepCombustion"
"("
"const word&, "
"const fvMesh& "
"const word&"
")"
)
FatalErrorInFunction
<< "Inconsistent thermo package for " << this->type() << " model:\n"
<< " " << this->thermo().type() << nl << nl
<< "Please select a thermo package based on "

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -136,9 +136,8 @@ Foam::autoPtr<Foam::ensightPart> Foam::ensightPart::New(Istream& is)
if (cstrIter == istreamConstructorTablePtr_->end())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"ensightPart::New(Istream&)",
is
) << "unknown ensightPart type "
<< partType << nl << nl

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -37,7 +37,7 @@ void Foam::meshReader::calcPointCells() const
if (pointCellsPtr_)
{
FatalErrorIn("meshReader::calcPointCells() const")
FatalErrorInFunction
<< "pointCells already calculated"
<< abort(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -310,7 +310,7 @@ void Foam::meshReader::createPolyCells()
}
else
{
FatalErrorIn("meshReader::createPolyCells()")
FatalErrorInFunction
<< "Error in internal face insertion"
<< abort(FatalError);
}

View File

@ -69,8 +69,7 @@ bool Foam::meshReaders::STARCD::readHeader(IFstream& is, word fileSignature)
{
if (!is.good())
{
FatalErrorIn("meshReaders::STARCD::readHeader()")
<< "cannot read " << fileSignature << " " << is.name()
FatalErrorInFunction
<< abort(FatalError);
}
@ -194,7 +193,7 @@ void Foam::meshReaders::STARCD::readPoints
}
else
{
FatalErrorIn("meshReaders::STARCD::readPoints()")
FatalErrorInFunction
<< "no points in file " << inputName
<< abort(FatalError);
}
@ -366,7 +365,7 @@ void Foam::meshReaders::STARCD::readCells(const fileName& inputName)
// construct cellFaces_ and possibly cellShapes_
if (nCells <= 0)
{
FatalErrorIn("meshReaders::STARCD::readCells()")
FatalErrorInFunction
<< "no cells in file " << inputName
<< abort(FatalError);
}
@ -533,7 +532,7 @@ void Foam::meshReaders::STARCD::readCells(const fileName& inputName)
if (nFaces < 4)
{
FatalErrorIn("meshReaders::STARCD::readCells()")
FatalErrorInFunction
<< "star cell " << starCellId << " has " << nFaces
<< abort(FatalError);
}
@ -597,7 +596,7 @@ void Foam::meshReaders::STARCD::readCells(const fileName& inputName)
if (unknownVertices)
{
FatalErrorIn("meshReaders::STARCD::readCells()")
FatalErrorInFunction
<< "cells with unknown vertices"
<< abort(FatalError);
}

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -98,7 +98,7 @@ void Foam::meshWriters::STARCD::getCellTable()
}
else
{
WarningIn("STARCD::getCellTable()")
WarningInFunction
<< ioList.objectPath() << " has incorrect number of cells "
<< " - use cellZone information"
<< endl;

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -125,11 +125,8 @@ Foam::labelList Foam::polyDualMesh::getFaceOrder
{
if (oldToNew[faceI] == -1)
{
FatalErrorIn
(
"polyDualMesh::getFaceOrder"
"(const labelList&, const labelList&, const label) const"
) << "Did not determine new position"
FatalErrorInFunction
<< "Did not determine new position"
<< " for face " << faceI
<< abort(FatalError);
}
@ -205,7 +202,7 @@ void Foam::polyDualMesh::getPointEdges
}
}
FatalErrorIn("getPointEdges") << "Cannot find two edges on face:" << faceI
FatalErrorInFunction
<< " vertices:" << patch.localFaces()[faceI]
<< " that uses point:" << pointI
<< abort(FatalError);
@ -247,7 +244,7 @@ Foam::labelList Foam::polyDualMesh::collectPatchSideFace
// Store dual vertex for starting edge.
if (edgeToDualPoint[patch.meshEdges()[edgeI]] < 0)
{
FatalErrorIn("polyDualMesh::collectPatchSideFace") << edgeI
FatalErrorInFunction
<< abort(FatalError);
}
@ -761,11 +758,8 @@ void Foam::polyDualMesh::calcDual
{
nonManifoldPoints.write();
FatalErrorIn
(
"polyDualMesh::calcDual(const polyMesh&, const labelList&"
", const labelList&)"
) << "There are " << nonManifoldPoints.size() << " points where"
FatalErrorInFunction
<< "There are " << nonManifoldPoints.size() << " points where"
<< " the outside of the mesh is non-manifold." << nl
<< "Such a mesh cannot be converted to a dual." << nl
<< "Writing points at non-manifold sites to pointSet "
@ -918,7 +912,7 @@ void Foam::polyDualMesh::calcDual
if (patchFaces.size() != 2)
{
FatalErrorIn("polyDualMesh::calcDual")
FatalErrorInFunction
<< "Cannot handle edges with " << patchFaces.size()
<< " connected boundary faces."
<< abort(FatalError);
@ -1018,7 +1012,7 @@ void Foam::polyDualMesh::calcDual
vector n = f.normal(dualPoints);
if (((mesh.points()[owner] - dualPoints[f[0]]) & n) > 0)
{
WarningIn("calcDual") << "Incorrect orientation"
WarningInFunction
<< " on boundary edge:" << edgeI
<< mesh.points()[mesh.edges()[edgeI][0]]
<< mesh.points()[mesh.edges()[edgeI][1]]
@ -1133,7 +1127,7 @@ void Foam::polyDualMesh::calcDual
vector n = f.normal(dualPoints);
if (((mesh.points()[owner] - dualPoints[f[0]]) & n) > 0)
{
WarningIn("calcDual") << "Incorrect orientation"
WarningInFunction
<< " on internal edge:" << edgeI
<< mesh.points()[mesh.edges()[edgeI][0]]
<< mesh.points()[mesh.edges()[edgeI][1]]
@ -1537,7 +1531,7 @@ void Foam::polyDualMesh::calcFeatures
// Non-manifold. Problem?
const edge& e = allBoundary.edges()[edgeI];
WarningIn("polyDualMesh::calcFeatures") << "Edge "
WarningInFunction
<< meshPoints[e[0]] << ' ' << meshPoints[e[1]]
<< " coords:" << mesh.points()[meshPoints[e[0]]]
<< mesh.points()[meshPoints[e[1]]]

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -49,7 +49,7 @@ extern "C"
void MGridGen(int, idxtype *, realtype *, realtype *, idxtype *, realtype *,
int, int, int *, int *, int *, idxtype *)
{
FatalErrorIn("MGridGen(..)")
FatalErrorInFunction
<< notImplementedMessage
<< Foam::exit(Foam::FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,16 +63,8 @@ Foam::label Foam::metisDecomp::decompose
List<label>& finalDecomp
)
{
FatalErrorIn
(
"labelList metisDecomp::decompose"
"("
"const List<label>&, "
"const List<label>&, "
"const scalarField&, "
"List<label>&"
")"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return -1;
}
@ -98,14 +90,8 @@ Foam::labelList Foam::metisDecomp::decompose
const scalarField& pointWeights
)
{
FatalErrorIn
(
"labelList metisDecomp::decompose"
"("
"const pointField&, "
"const scalarField&"
")"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return labelList();
}
@ -119,15 +105,8 @@ Foam::labelList Foam::metisDecomp::decompose
const scalarField& agglomWeights
)
{
FatalErrorIn
(
"labelList metisDecomp::decompose"
"("
"const labelList&, "
"const pointField&, "
"const scalarField&"
")"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return labelList();
}
@ -140,15 +119,8 @@ Foam::labelList Foam::metisDecomp::decompose
const scalarField& cellWeights
)
{
FatalErrorIn
(
"labelList metisDecomp::decompose"
"("
"const labelListList&, "
"const pointField&, "
"const scalarField&"
")"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return labelList();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -68,17 +68,8 @@ Foam::label Foam::ptscotchDecomp::decompose
List<label>& finalDecomp
) const
{
FatalErrorIn
(
"label ptscotchDecomp::decompose"
"("
"onst fileName&,"
"const List<label>&, "
"const List<label>&, "
"const scalarField&, "
"List<label>&"
")"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return -1;
}
@ -95,19 +86,8 @@ Foam::label Foam::ptscotchDecomp::decompose
List<label>& finalDecomp
) const
{
FatalErrorIn
(
"label ptscotchDecomp::decompose"
"("
"const fileName&,"
"const int,"
"const int,"
"const int,"
"const int,"
"const scalarField&,"
"List<label>&"
")"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return -1;
}
@ -133,14 +113,8 @@ Foam::labelList Foam::ptscotchDecomp::decompose
const scalarField& pointWeights
)
{
FatalErrorIn
(
"labelList ptscotchDecomp::decompose"
"("
"const pointField&, "
"const scalarField&"
")"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return labelList::null();
}
@ -154,15 +128,8 @@ Foam::labelList Foam::ptscotchDecomp::decompose
const scalarField& pointWeights
)
{
FatalErrorIn
(
"labelList ptscotchDecomp::decompose"
"("
"const labelList&, "
"const pointField&, "
"const scalarField&"
")"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return labelList::null();
}
@ -175,15 +142,8 @@ Foam::labelList Foam::ptscotchDecomp::decompose
const scalarField& cWeights
)
{
FatalErrorIn
(
"labelList ptscotchDecomp::decompose"
"("
"const labelListList&, "
"const pointField&, "
"const scalarField&"
")"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return labelList::null();
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -67,17 +67,8 @@ Foam::label Foam::scotchDecomp::decompose
List<label>& finalDecomp
)
{
FatalErrorIn
(
"label scotchDecomp::decompose\n"
"(\n"
"const fileName& meshPath,\n"
"const List<label>&,\n"
"const List<label>&,\n"
"const scalarField&,\n"
"List<label>&\n"
")\n"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return -1;
}
@ -103,14 +94,8 @@ Foam::labelList Foam::scotchDecomp::decompose
const scalarField& pointWeights
)
{
FatalErrorIn
(
"labelList scotchDecomp::decompose"
"("
"const pointField&, "
"const scalarField&"
")"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return labelList::null();
}
@ -124,15 +109,8 @@ Foam::labelList Foam::scotchDecomp::decompose
const scalarField& pointWeights
)
{
FatalErrorIn
(
"labelList scotchDecomp::decompose"
"("
"const labelList&, "
"const pointField&, "
"const scalarField&"
")"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return labelList::null();
}
@ -145,15 +123,8 @@ Foam::labelList Foam::scotchDecomp::decompose
const scalarField& cWeights
)
{
FatalErrorIn
(
"labelList scotchDecomp::decompose"
"("
"const labelListList&, "
"const pointField&, "
"const scalarField&"
")"
) << notImplementedMessage << exit(FatalError);
FatalErrorInFunction
<< notImplementedMessage << exit(FatalError);
return labelList::null();
}

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,10 +63,8 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
if (!IOobjectConstructorTablePtr_)
{
FatalErrorIn
(
"dynamicFvMesh::New(const IOobject&)"
) << "dynamicFvMesh table is empty"
FatalErrorInFunction
<< "dynamicFvMesh table is empty"
<< exit(FatalError);
}
@ -75,10 +73,8 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
if (cstrIter == IOobjectConstructorTablePtr_->end())
{
FatalErrorIn
(
"dynamicFvMesh::New(const IOobject&)"
) << "Unknown dynamicFvMesh type "
FatalErrorInFunction
<< "Unknown dynamicFvMesh type "
<< dynamicFvMeshTypeName << nl << nl
<< "Valid dynamicFvMesh types are :" << endl
<< IOobjectConstructorTablePtr_->sortedToc()

View File

@ -241,7 +241,7 @@ Foam::dynamicRefineFvMesh::refine
if (oldFaceI >= nInternalFaces())
{
FatalErrorIn("dynamicRefineFvMesh::refine(const labelList&)")
FatalErrorInFunction
<< "New internal face:" << faceI
<< " fc:" << faceCentres()[faceI]
<< " originates from boundary oldFace:" << oldFaceI
@ -294,10 +294,8 @@ Foam::dynamicRefineFvMesh::refine
if (masterFaceI < 0)
{
FatalErrorIn
(
"dynamicRefineFvMesh::refine(const labelList&)"
) << "Problem: should not have removed faces"
FatalErrorInFunction
<< "Problem: should not have removed faces"
<< " when refining."
<< nl << "face:" << faceI << abort(FatalError);
}
@ -320,7 +318,7 @@ Foam::dynamicRefineFvMesh::refine
{
if (!correctFluxes_.found(iter.key()))
{
WarningIn("dynamicRefineFvMesh::refine(const labelList&)")
WarningInFunction
<< "Cannot find surfaceScalarField " << iter.key()
<< " in user-provided flux mapping table "
<< correctFluxes_ << endl
@ -549,7 +547,7 @@ Foam::dynamicRefineFvMesh::unrefine
{
if (!correctFluxes_.found(iter.key()))
{
WarningIn("dynamicRefineFvMesh::refine(const labelList&)")
WarningInFunction
<< "Cannot find surfaceScalarField " << iter.key()
<< " in user-provided flux mapping table "
<< correctFluxes_ << endl
@ -1227,7 +1225,7 @@ bool Foam::dynamicRefineFvMesh::update()
}
else if (refineInterval < 0)
{
FatalErrorIn("dynamicRefineFvMesh::update()")
FatalErrorInFunction
<< "Illegal refineInterval " << refineInterval << nl
<< "The refineInterval setting in the dynamicMeshDict should"
<< " be >= 1." << nl
@ -1246,7 +1244,7 @@ bool Foam::dynamicRefineFvMesh::update()
if (maxCells <= 0)
{
FatalErrorIn("dynamicRefineFvMesh::update()")
FatalErrorInFunction
<< "Illegal maximum number of cells " << maxCells << nl
<< "The maxCells setting in the dynamicMeshDict should"
<< " be > 0." << nl
@ -1257,7 +1255,7 @@ bool Foam::dynamicRefineFvMesh::update()
if (maxRefinement <= 0)
{
FatalErrorIn("dynamicRefineFvMesh::update()")
FatalErrorInFunction
<< "Illegal maximum refinement level " << maxRefinement << nl
<< "The maxCells setting in the dynamicMeshDict should"
<< " be > 0." << nl

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -81,10 +81,8 @@ Foam::multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(const IOobject& io)
{
if (undisplacedPoints_.size() != nPoints())
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh"
"(const IOobject&)",
dynamicMeshCoeffs_
) << "Read " << undisplacedPoints_.size()
<< " undisplaced points from " << undisplacedPoints_.objectPath()
@ -106,10 +104,8 @@ Foam::multiSolidBodyMotionFvMesh::multiSolidBodyMotionFvMesh(const IOobject& io)
if (zoneIDs_[zoneI] == -1)
{
FatalIOErrorIn
FatalIOErrorInFunction
(
"multiSolidBodyMotionFvMesh::"
"multiSolidBodyMotionFvMesh(const IOobject&)",
dynamicMeshCoeffs_
) << "Cannot find cellZone named " << iter().keyword()
<< ". Valid zones are " << cellZones().names()
@ -207,7 +203,7 @@ bool Foam::multiSolidBodyMotionFvMesh::update()
{
hasWarned = true;
WarningIn("multiSolidBodyMotionFvMesh::update()")
WarningInFunction
<< "Did not find volVectorField U."
<< " Not updating U boundary conditions." << endl;
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -42,14 +42,8 @@ Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalErrorIn
(
"solidBodyMotionFunction::New"
"("
" const dictionary& SBMFCoeffs,"
" const Time& runTime"
")"
) << "Unknown solidBodyMotionFunction type "
FatalErrorInFunction
<< "Unknown solidBodyMotionFunction type "
<< motionType << nl << nl
<< "Valid solidBodyMotionFunctions are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()

View File

@ -78,10 +78,8 @@ Foam::solidBodyMotionFunctions::tabulated6DoFMotion::transformation() const
if (t < times_[0])
{
FatalErrorIn
(
"solidBodyMotionFunctions::tabulated6DoFMotion::transformation()"
) << "current time (" << t
FatalErrorInFunction
<< "current time (" << t
<< ") is less than the minimum in the data table ("
<< times_[0] << ')'
<< exit(FatalError);
@ -89,10 +87,8 @@ Foam::solidBodyMotionFunctions::tabulated6DoFMotion::transformation() const
if (t > times_.last())
{
FatalErrorIn
(
"solidBodyMotionFunctions::tabulated6DoFMotion::transformation()"
) << "current time (" << t
FatalErrorInFunction
<< "current time (" << t
<< ") is greater than the maximum in the data table ("
<< times_.last() << ')'
<< exit(FatalError);
@ -156,11 +152,8 @@ bool Foam::solidBodyMotionFunctions::tabulated6DoFMotion::read
}
else
{
FatalErrorIn
(
"solidBodyMotionFunctions::tabulated6DoFMotion::read"
"(const dictionary&)"
) << "Cannot open time data file " << timeDataFileName_
FatalErrorInFunction
<< "Cannot open time data file " << timeDataFileName_
<< exit(FatalError);
}
}

View File

@ -81,11 +81,8 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
{
if (undisplacedPoints_.size() != nPoints())
{
FatalIOErrorIn
(
"solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject&)",
dynamicMeshCoeffs_
) << "Read " << undisplacedPoints_.size()
FatalIOErrorInFunction(dynamicMeshCoeffs_)
<< "Read " << undisplacedPoints_.size()
<< " undisplaced points from " << undisplacedPoints_.objectPath()
<< " but the current mesh has " << nPoints()
<< exit(FatalIOError);
@ -99,11 +96,7 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
if ((cellZoneName != "none") && (cellSetName != "none"))
{
FatalIOErrorIn
(
"solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject&)",
dynamicMeshCoeffs_
)
FatalIOErrorInFunction(dynamicMeshCoeffs_)
<< "Either cellZone OR cellSet can be supplied, but not both. "
<< "If neither is supplied, all cells will be included"
<< exit(FatalIOError);
@ -120,10 +113,8 @@ Foam::solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject& io)
if (zoneID == -1)
{
FatalErrorIn
(
"solidBodyMotionFvMesh::solidBodyMotionFvMesh(const IOobject&)"
) << "Unable to find cellZone " << cellZoneName
FatalErrorInFunction
<< "Unable to find cellZone " << cellZoneName
<< ". Valid cellZones are:"
<< cellZones().names()
<< exit(FatalError);
@ -234,7 +225,7 @@ bool Foam::solidBodyMotionFvMesh::update()
{
hasWarned = true;
WarningIn("solidBodyMotionFvMesh::update()")
WarningInFunction
<< "Did not find volVectorField " << UName_
<< " Not updating " << UName_ << "boundary conditions."
<< endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -61,10 +61,8 @@ void Foam::attachDetach::checkDefinition()
|| !slavePatchID_.active()
)
{
FatalErrorIn
(
"void Foam::attachDetach::checkDefinition()"
) << "Not all zones and patches needed in the definition "
FatalErrorInFunction
<< "Not all zones and patches needed in the definition "
<< "have been found. Please check your mesh definition."
<< abort(FatalError);
}
@ -97,10 +95,7 @@ void Foam::attachDetach::checkDefinition()
// Check if there are faces in the master zone
if (mesh.faceZones()[faceZoneID_.index()].empty())
{
FatalErrorIn
(
"void Foam::attachDetach::checkDefinition()"
) << "Attach/detach zone contains no faces. Please check your "
FatalErrorInFunction
<< "mesh definition."
<< abort(FatalError);
}
@ -122,10 +117,8 @@ void Foam::attachDetach::checkDefinition()
if (bouFacesInZone.size())
{
FatalErrorIn
(
"void Foam::attachDetach::checkDefinition()"
) << "Found boundary faces in the zone defining "
FatalErrorInFunction
<< "Found boundary faces in the zone defining "
<< "attach/detach boundary "
<< " for object " << name()
<< " : . This is not allowed." << nl
@ -158,10 +151,8 @@ void Foam::attachDetach::checkDefinition()
)
)
{
FatalErrorIn
(
"void Foam::attachDetach::checkDefinition()"
) << "Problem with sizes in mesh modifier. The face zone,"
FatalErrorInFunction
<< "Problem with sizes in mesh modifier. The face zone,"
<< " master and slave patch should have the same size"
<< " for object " << name() << ". " << nl
<< "Zone size: "
@ -197,10 +188,8 @@ void Foam::attachDetach::checkDefinition()
if (zoneProblemFaces.size())
{
FatalErrorIn
(
"void Foam::attachDetach::checkDefinition()"
) << "Found faces in the zone defining "
FatalErrorInFunction
<< "Found faces in the zone defining "
<< "attach/detach boundary which do not belong to "
<< "either master or slave patch. "
<< "This is not allowed." << nl
@ -224,10 +213,8 @@ void Foam::attachDetach::checkDefinition()
|| (triggerTimes_.empty() && !manualTrigger())
)
{
FatalErrorIn
(
"void Foam::attachDetach::checkDefinition()"
) << "Problem with definition of trigger times: "
FatalErrorInFunction
<< "Problem with definition of trigger times: "
<< triggerTimes_
<< abort(FatalError);
}
@ -439,10 +426,8 @@ void Foam::attachDetach::setRefinement(polyTopoChange& ref) const
}
else
{
FatalErrorIn
(
"void attachDetach::setRefinement(polyTopoChange&) const"
) << "Requested attach/detach event and currect state "
FatalErrorInFunction
<< "Requested attach/detach event and currect state "
<< "is not known."
<< abort(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -54,10 +54,8 @@ void Foam::attachDetach::calcPointMatchMap() const
if (pointMatchMapPtr_)
{
FatalErrorIn
(
"void attachDetach::calcPointMatchMap() const"
) << "Point match map already calculated for object " << name()
FatalErrorInFunction
<< "Point match map already calculated for object " << name()
<< abort(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -84,11 +84,8 @@ void Foam::attachDetach::detachInterface
{
if (faceLabels[i] <= faceLabels[i-1])
{
FatalErrorIn
(
"attachDetach::detachInterface"
"(polyTopoChange&) const"
) << "faceZone " << zoneMesh[faceZoneID_.index()].name()
FatalErrorInFunction
<< "faceZone " << zoneMesh[faceZoneID_.index()].name()
<< " does not have mesh face labels in"
<< " increasing order." << endl
<< "Face label " << faceLabels[i]

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -157,7 +157,7 @@ Foam::labelList Foam::boundaryMesh::collectSegment
if (featI == -1)
{
FatalErrorIn("boundaryMesh::collectSegment")
FatalErrorInFunction
<< "Problem" << abort(FatalError);
}
featLabels[featLabelI++] = featI;
@ -1544,7 +1544,7 @@ Foam::label Foam::boundaryMesh::whichPatch(const label faceI) const
}
}
FatalErrorIn("boundaryMesh::whichPatch(const label)")
FatalErrorInFunction
<< "Cannot find face " << faceI << " in list of boundaryPatches "
<< patches_
<< abort(FatalError);
@ -1610,14 +1610,14 @@ void Foam::boundaryMesh::deletePatch(const word& patchName)
if (delPatchI == -1)
{
FatalErrorIn("boundaryMesh::deletePatch(const word&")
FatalErrorInFunction
<< "Can't find patch named " << patchName
<< abort(FatalError);
}
if (patches_[delPatchI].size())
{
FatalErrorIn("boundaryMesh::deletePatch(const word&")
FatalErrorInFunction
<< "Trying to delete non-empty patch " << patchName
<< endl << "Current size:" << patches_[delPatchI].size()
<< abort(FatalError);
@ -1669,7 +1669,7 @@ void Foam::boundaryMesh::changePatchType
if (changeI == -1)
{
FatalErrorIn("boundaryMesh::changePatchType(const word&, const word&)")
FatalErrorInFunction
<< "Can't find patch named " << patchName
<< abort(FatalError);
}
@ -1718,7 +1718,7 @@ void Foam::boundaryMesh::changeFaces
{
if (patchIDs.size() != mesh().size())
{
FatalErrorIn("boundaryMesh::changeFaces(const labelList& patchIDs)")
FatalErrorInFunction
<< "List of patchIDs not equal to number of faces." << endl
<< "PatchIDs size:" << patchIDs.size()
<< " nFaces::" << mesh().size()
@ -1735,7 +1735,7 @@ void Foam::boundaryMesh::changeFaces
if (patchID < 0 || patchID >= patches_.size())
{
FatalErrorIn("boundaryMesh::changeFaces(const labelList&)")
FatalErrorInFunction
<< "PatchID " << patchID << " out of range"
<< abort(FatalError);
}

View File

@ -204,7 +204,7 @@ public:
{
if (!meshPtr_)
{
FatalErrorIn("boundaryMesh::mesh()")
FatalErrorInFunction
<< "No mesh available. Probably mesh not yet"
<< " read." << abort(FatalError);
}

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -432,7 +432,7 @@ Foam::createShellMesh::createShellMesh
{
if (pointRegions_.size() != patch_.size())
{
FatalErrorIn("createShellMesh::createShellMesh(..)")
FatalErrorInFunction
<< "nFaces:" << patch_.size()
<< " pointRegions:" << pointRegions.size()
<< exit(FatalError);
@ -455,7 +455,7 @@ void Foam::createShellMesh::setRefinement
{
if (firstLayerDisp.size() != regionPoints_.size())
{
FatalErrorIn("createShellMesh::setRefinement(..)")
FatalErrorInFunction
<< "nRegions:" << regionPoints_.size()
<< " firstLayerDisp:" << firstLayerDisp.size()
<< exit(FatalError);
@ -467,7 +467,7 @@ void Foam::createShellMesh::setRefinement
&& bottomPatchID.size() != patch_.size()
)
{
FatalErrorIn("createShellMesh::setRefinement(..)")
FatalErrorInFunction
<< "nFaces:" << patch_.size()
<< " topPatchID:" << topPatchID.size()
<< " bottomPatchID:" << bottomPatchID.size()
@ -476,7 +476,7 @@ void Foam::createShellMesh::setRefinement
if (extrudeEdgePatches.size() != patch_.nEdges())
{
FatalErrorIn("createShellMesh::setRefinement(..)")
FatalErrorInFunction
<< "nEdges:" << patch_.nEdges()
<< " extrudeEdgePatches:" << extrudeEdgePatches.size()
<< exit(FatalError);
@ -672,7 +672,7 @@ void Foam::createShellMesh::setRefinement
// Internal face
if (eFaces.size() != 2)
{
FatalErrorIn("createShellMesh::setRefinement(..)")
FatalErrorInFunction
<< "edge:" << edgeI
<< " not internal but does not have side-patches defined."
<< exit(FatalError);
@ -682,7 +682,7 @@ void Foam::createShellMesh::setRefinement
{
if (eFaces.size() != ePatches.size())
{
FatalErrorIn("createShellMesh::setRefinement(..)")
FatalErrorInFunction
<< "external/feature edge:" << edgeI
<< " has " << eFaces.size() << " connected extruded faces "
<< " but only " << ePatches.size()

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -308,7 +308,7 @@ void Foam::fvMeshAdder::MapVolFields
}
else
{
WarningIn("fvMeshAdder::MapVolFields(..)")
WarningInFunction
<< "Not mapping field " << fld.name()
<< " since not present on mesh to add"
<< endl;
@ -608,7 +608,7 @@ void Foam::fvMeshAdder::MapSurfaceFields
}
else
{
WarningIn("fvMeshAdder::MapSurfaceFields(..)")
WarningInFunction
<< "Not mapping field " << fld.name()
<< " since not present on mesh to add"
<< endl;

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -98,7 +98,7 @@ void Foam::fvMeshDistribute::checkEqualWordList
{
if (allNames[procI] != allNames[0])
{
FatalErrorIn("fvMeshDistribute::checkEqualWordList(..)")
FatalErrorInFunction
<< "When checking for equal " << msg.c_str() << " :" << endl
<< "processor0 has:" << allNames[0] << endl
<< "processor" << procI << " has:" << allNames[procI] << endl
@ -235,7 +235,7 @@ Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const
if (nonEmptyPatchI == -1)
{
FatalErrorIn("fvMeshDistribute::findNonEmptyPatch() const")
FatalErrorInFunction
<< "Cannot find a patch which is neither of type empty nor"
<< " coupled in patches " << patches.names() << endl
<< "There has to be at least one such patch for"
@ -263,7 +263,7 @@ Foam::label Foam::fvMeshDistribute::findNonEmptyPatch() const
}
else if (procPatchI != -1)
{
FatalErrorIn("fvMeshDistribute::findNonEmptyPatch() const")
FatalErrorInFunction
<< "Processor patches should be at end of patch list."
<< endl
<< "Have processor patch " << procPatchI
@ -443,10 +443,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::repatch
if (index != -1)
{
FatalErrorIn
(
"fvMeshDistribute::repatch(const labelList&, labelListList&)"
) << "reverseFaceMap contains -1 at index:"
FatalErrorInFunction
<< "reverseFaceMap contains -1 at index:"
<< index << endl
<< "This means that the repatch operation was not just"
<< " a shuffle?" << abort(FatalError);
@ -520,7 +518,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::fvMeshDistribute::mergeSharedPoints
}
else
{
FatalErrorIn("fvMeshDistribute::mergeSharedPoints()")
FatalErrorInFunction
<< "Problem. oldPointI:" << oldPointI
<< " newPointI:" << newPointI << abort(FatalError);
}
@ -1340,7 +1338,7 @@ Foam::labelList Foam::fvMeshDistribute::countCells
if (newProc < 0 || newProc >= Pstream::nProcs())
{
FatalErrorIn("fvMeshDistribute::distribute(const labelList&)")
FatalErrorInFunction
<< "Distribution should be in range 0.." << Pstream::nProcs()-1
<< endl
<< "At index " << cellI << " distribution:" << newProc
@ -1360,7 +1358,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
// Some checks on distribution
if (distribution.size() != mesh_.nCells())
{
FatalErrorIn("fvMeshDistribute::distribute(const labelList&)")
FatalErrorInFunction
<< "Size of distribution:"
<< distribution.size() << " mesh nCells:" << mesh_.nCells()
<< abort(FatalError);
@ -1372,7 +1370,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::fvMeshDistribute::distribute
// Check all processors have same non-proc patches in same order.
if (patches.checkParallelSync(true))
{
FatalErrorIn("fvMeshDistribute::distribute(const labelList&)")
FatalErrorInFunction
<< "This application requires all non-processor patches"
<< " to be present in the same order on all patches" << nl
<< "followed by the processor patches (which of course are unique)."

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -104,7 +104,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields
if (flds.size() != oldBflds.size())
{
FatalErrorIn("fvMeshDistribute::mapBoundaryFields(..)") << "problem"
FatalErrorInFunction
<< abort(FatalError);
}

View 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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -282,7 +282,7 @@ void Foam::fvMeshTools::trimPatches(fvMesh& mesh, const label nPatches)
if (polyPatches.empty())
{
FatalErrorIn("fvMeshTools::trimPatches(fvMesh&, const label)")
FatalErrorInFunction
<< "No patches in mesh"
<< abort(FatalError);
}
@ -296,7 +296,7 @@ void Foam::fvMeshTools::trimPatches(fvMesh& mesh, const label nPatches)
if (nFaces)
{
FatalErrorIn("fvMeshTools::trimPatches(fvMesh&, const label)")
FatalErrorInFunction
<< "There are still " << nFaces
<< " faces in " << polyPatches.size()-nPatches
<< " patches to be deleted" << abort(FatalError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -442,11 +442,8 @@ void Foam::layerAdditionRemoval::addCellLayer
if (patchID < 0)
{
FatalErrorIn
(
"void Foam::layerAdditionRemoval::setRefinement("
"polyTopoChange& ref)"
) << "Cannot find patch for edge " << meshEdges[curEdgeID]
FatalErrorInFunction
<< "Cannot find patch for edge " << meshEdges[curEdgeID]
<< ". Edge: " << mesh.edges()[meshEdges[curEdgeID]]
<< abort(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -58,7 +58,7 @@ void Foam::layerAdditionRemoval::checkDefinition()
{
if (!faceZoneID_.active())
{
FatalErrorIn("void Foam::layerAdditionRemoval::checkDefinition()")
FatalErrorInFunction
<< "Master face zone named " << faceZoneID_.name()
<< " cannot be found."
<< abort(FatalError);
@ -70,10 +70,8 @@ void Foam::layerAdditionRemoval::checkDefinition()
|| maxLayerThickness_ < minLayerThickness_
)
{
FatalErrorIn
(
"void Foam::layerAdditionRemoval::checkDefinition()"
) << "Incorrect layer thickness definition."
FatalErrorInFunction
<< "Incorrect layer thickness definition."
<< abort(FatalError);
}
@ -83,7 +81,7 @@ void Foam::layerAdditionRemoval::checkDefinition()
if (nFaces == 0)
{
FatalErrorIn("void Foam::layerAdditionRemoval::checkDefinition()")
FatalErrorInFunction
<< "Face extrusion zone contains no faces. "
<< "Please check your mesh definition."
<< abort(FatalError);
@ -222,7 +220,7 @@ bool Foam::layerAdditionRemoval::changeTopology() const
if (min(V) < -VSMALL)
{
FatalErrorIn("bool layerAdditionRemoval::changeTopology() const")
FatalErrorInFunction
<< "negative cell volume. Error in mesh motion before "
<< "topological change.\n V: " << V
<< abort(FatalError);
@ -462,13 +460,8 @@ void Foam::layerAdditionRemoval::setMinLayerThickness(const scalar t) const
{
if (t < VSMALL || maxLayerThickness_ < t)
{
FatalErrorIn
(
"void layerAdditionRemoval::setMinLayerThickness"
"("
"const scalar"
") const"
) << "Incorrect layer thickness definition."
FatalErrorInFunction
<< "Incorrect layer thickness definition."
<< abort(FatalError);
}
@ -480,13 +473,8 @@ void Foam::layerAdditionRemoval::setMaxLayerThickness(const scalar t) const
{
if (t < minLayerThickness_)
{
FatalErrorIn
(
"void layerAdditionRemoval::setMaxLayerThickness"
"("
"const scalar"
") const"
) << "Incorrect layer thickness definition."
FatalErrorInFunction
<< "Incorrect layer thickness definition."
<< abort(FatalError);
}

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -76,10 +76,8 @@ bool Foam::layerAdditionRemoval::setLayerPairing() const
// the master patch
if (pointsPairingPtr_ || facesPairingPtr_)
{
FatalErrorIn
(
"void Foam::layerAdditionRemoval::setLayerPairing() const"
) << "Problem with layer pairing data"
FatalErrorInFunction
<< "Problem with layer pairing data"
<< abort(FatalError);
}
@ -189,10 +187,8 @@ const Foam::labelList& Foam::layerAdditionRemoval::pointsPairing() const
{
if (!pointsPairingPtr_)
{
FatalErrorIn
(
"const labelList& layerAdditionRemoval::pointsPairing() const"
) << "Problem with layer pairing data for object " << name()
FatalErrorInFunction
<< "Problem with layer pairing data for object " << name()
<< abort(FatalError);
}
@ -203,10 +199,8 @@ const Foam::labelList& Foam::layerAdditionRemoval::facesPairing() const
{
if (!facesPairingPtr_)
{
FatalErrorIn
(
"const labelList& layerAdditionRemoval::facesPairing() const"
) << "Problem with layer pairing data for object " << name()
FatalErrorInFunction
<< "Problem with layer pairing data for object " << name()
<< abort(FatalError);
}

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -252,12 +252,8 @@ Foam::label Foam::cellCuts::edgeEdgeToFace
// Coming here means the loop is illegal since the two edges
// are not shared by a face. We just mark loop as invalid and continue.
WarningIn
(
"Foam::cellCuts::edgeEdgeToFace"
"(const label cellI, const label edgeA,"
"const label edgeB) const"
) << "cellCuts : Cannot find face on cell "
WarningInFunction
<< "cellCuts : Cannot find face on cell "
<< cellI << " that has both edges " << edgeA << ' ' << edgeB << endl
<< "faces : " << cFaces << endl
<< "edgeA : " << mesh().edges()[edgeA] << endl
@ -296,12 +292,8 @@ Foam::label Foam::cellCuts::edgeVertexToFace
}
}
WarningIn
(
"Foam::cellCuts::edgeVertexToFace"
"(const label cellI, const label edgeI, "
"const label vertI) const"
) << "cellCuts : Cannot find face on cell "
WarningInFunction
<< "cellCuts : Cannot find face on cell "
<< cellI << " that has both edge " << edgeI << " and vertex "
<< vertI << endl
<< "faces : " << cFaces << endl
@ -338,7 +330,7 @@ Foam::label Foam::cellCuts::vertexVertexToFace
}
}
WarningIn("Foam::cellCuts::vertexVertexToFace")
WarningInFunction
<< "cellCuts : Cannot find face on cell "
<< cellI << " that has vertex " << vertA << " and vertex "
<< vertB << endl
@ -353,7 +345,7 @@ void Foam::cellCuts::calcFaceCuts() const
{
if (faceCutsPtr_)
{
FatalErrorIn("cellCuts::calcFaceCuts()")
FatalErrorInFunction
<< "faceCuts already calculated" << abort(FatalError);
}
@ -468,7 +460,7 @@ void Foam::cellCuts::calcFaceCuts() const
if (allVerticesCut)
{
WarningIn("Foam::cellCuts::calcFaceCuts() const")
WarningInFunction
<< "Face " << faceI << " vertices " << f
<< " has all its vertices cut. Not cutting face." << endl;
@ -783,7 +775,7 @@ bool Foam::cellCuts::walkFace
}
else
{
WarningIn("Foam::cellCuts::walkFace")
WarningInFunction
<< "In middle of cut. cell:" << cellI << " face:" << faceI
<< " cuts:" << fCuts << " current cut:" << cut << endl;
@ -1314,7 +1306,7 @@ bool Foam::cellCuts::calcAnchors
if (uncutIndex == -1)
{
WarningIn("Foam::cellCuts::calcAnchors")
WarningInFunction
<< "Invalid loop " << loop << " for cell " << cellI << endl
<< "Can not find point on cell which is not cut by loop."
<< endl;
@ -1334,7 +1326,7 @@ bool Foam::cellCuts::calcAnchors
{
// All vertices either in loop or in anchor. So split is along single
// face.
WarningIn("Foam::cellCuts::calcAnchors")
WarningInFunction
<< "Invalid loop " << loop << " for cell " << cellI << endl
<< "All vertices of cell are either in loop or in anchor set"
<< endl;
@ -1371,7 +1363,7 @@ bool Foam::cellCuts::calcAnchors
if (uncutIndex != -1)
{
WarningIn("Foam::cellCuts::calcAnchors")
WarningInFunction
<< "Invalid loop " << loop << " for cell " << cellI
<< " since it splits the cell into more than two cells" << endl;
@ -1415,7 +1407,7 @@ bool Foam::cellCuts::calcAnchors
if (connectedFaces.size() < 3)
{
WarningIn("Foam::cellCuts::calcAnchors")
WarningInFunction
<< "Invalid loop " << loop << " for cell " << cellI
<< " since would have too few faces on one side." << nl
<< "All faces:" << cFaces << endl;
@ -1427,7 +1419,7 @@ bool Foam::cellCuts::calcAnchors
if (otherFaces.size() < 3)
{
WarningIn("Foam::cellCuts::calcAnchors")
WarningInFunction
<< "Invalid loop " << loop << " for cell " << cellI
<< " since would have too few faces on one side." << nl
<< "All faces:" << cFaces << endl;
@ -1471,7 +1463,7 @@ bool Foam::cellCuts::calcAnchors
if (hasSet1)
{
// Second occurence of set1.
WarningIn("Foam::cellCuts::calcAnchors")
WarningInFunction
<< "Invalid loop " << loop << " for cell " << cellI
<< " since face " << f << " would be split into"
<< " more than two faces" << endl;
@ -1488,7 +1480,7 @@ bool Foam::cellCuts::calcAnchors
if (hasSet2)
{
// Second occurence of set1.
WarningIn("Foam::cellCuts::calcAnchors")
WarningInFunction
<< "Invalid loop " << loop << " for cell " << cellI
<< " since face " << f << " would be split into"
<< " more than two faces" << endl;
@ -1502,7 +1494,7 @@ bool Foam::cellCuts::calcAnchors
}
else
{
FatalErrorIn("Foam::cellCuts::calcAnchors")
FatalErrorInFunction
<< abort(FatalError);
}
@ -1526,7 +1518,7 @@ bool Foam::cellCuts::calcAnchors
if (hasSet1)
{
// Second occurence of set1.
WarningIn("Foam::cellCuts::calcAnchors")
WarningInFunction
<< "Invalid loop " << loop << " for cell " << cellI
<< " since face " << f << " would be split into"
<< " more than two faces" << endl;
@ -1543,7 +1535,7 @@ bool Foam::cellCuts::calcAnchors
if (hasSet2)
{
// Second occurence of set1.
WarningIn("Foam::cellCuts::calcAnchors")
WarningInFunction
<< "Invalid loop " << loop << " for cell " << cellI
<< " since face " << f << " would be split into"
<< " more than two faces" << endl;
@ -1576,7 +1568,7 @@ bool Foam::cellCuts::calcAnchors
// Both sets of points are supposedly on the same side as the
// loop normal. Oops.
WarningIn("Foam::cellCuts::calcAnchors")
WarningInFunction
<< " For cell:" << cellI
<< " achorpoints and nonanchorpoints are geometrically"
<< " on same side!" << endl
@ -1971,7 +1963,7 @@ bool Foam::cellCuts::validLoop
if (faceContainingLoop != -1)
{
WarningIn("Foam::cellCuts::validLoop")
WarningInFunction
<< "Found loop on cell " << cellI << " with all points"
<< " on face " << faceContainingLoop << endl;
@ -2029,13 +2021,11 @@ void Foam::cellCuts::setFromCellLoops()
{
//writeOBJ(".", cellI, loopPoints(cellI), anchorPoints);
//FatalErrorIn("cellCuts::setFromCellLoops()")
WarningIn("cellCuts::setFromCellLoops")
WarningInFunction
<< "Illegal loop " << loop
<< " when recreating cut-addressing"
<< " from existing cellLoops for cell " << cellI
<< endl;
//<< abort(FatalError);
cellLoops_[cellI].setSize(0);
cellAnchorPoints_[cellI].setSize(0);
@ -2477,7 +2467,7 @@ void Foam::cellCuts::orientPlanesAndLoops()
{
if (cellAnchorPoints_[cellI].empty())
{
FatalErrorIn("orientPlanesAndLoops()")
FatalErrorInFunction
<< "No anchor points for cut cell " << cellI << endl
<< "cellLoop:" << cellLoops_[cellI] << abort(FatalError);
}
@ -2515,10 +2505,8 @@ void Foam::cellCuts::calcLoopsAndAddressing(const labelList& cutCells)
if (weight < 0 || weight > 1)
{
FatalErrorIn
(
"cellCuts::calcLoopsAndAddressing(const labelList&)"
) << "Weight out of range [0,1]. Edge " << edgeI
FatalErrorInFunction
<< "Weight out of range [0,1]. Edge " << edgeI
<< " verts:" << mesh().edges()[edgeI]
<< " weight:" << weight << abort(FatalError);
}
@ -2570,13 +2558,11 @@ void Foam::cellCuts::check() const
)
{
// Should have been snapped.
//FatalErrorIn("cellCuts::check()")
WarningIn("cellCuts::check()")
WarningInFunction
<< "edge:" << edgeI << " vertices:"
<< mesh().edges()[edgeI]
<< " weight:" << edgeWeight_[edgeI] << " should have been"
<< " snapped to one of its endpoints"
//<< abort(FatalError);
<< endl;
}
}
@ -2584,7 +2570,7 @@ void Foam::cellCuts::check() const
{
if (edgeWeight_[edgeI] > - 1)
{
FatalErrorIn("cellCuts::check()")
FatalErrorInFunction
<< "edge:" << edgeI << " vertices:"
<< mesh().edges()[edgeI]
<< " weight:" << edgeWeight_[edgeI] << " is not cut but"
@ -2612,7 +2598,7 @@ void Foam::cellCuts::check() const
labelList cuts(1, cut);
writeCuts(Pout, cuts, loopWeights(cuts));
FatalErrorIn("cellCuts::check()")
FatalErrorInFunction
<< "cell:" << cellI << " loop:"
<< loop
<< " cut:" << cut << " is not marked as cut"
@ -2630,7 +2616,7 @@ void Foam::cellCuts::check() const
if (loop.size() && anchors.empty())
{
FatalErrorIn("cellCuts::check()")
FatalErrorInFunction
<< "cell:" << cellI << " loop:" << loop
<< " has no anchor points"
<< abort(FatalError);
@ -2647,7 +2633,7 @@ void Foam::cellCuts::check() const
&& findIndex(anchors, getVertex(cut)) != -1
)
{
FatalErrorIn("cellCuts::check()")
FatalErrorInFunction
<< "cell:" << cellI << " loop:" << loop
<< " anchor points:" << anchors
<< " anchor:" << getVertex(cut) << " is part of loop"
@ -2669,7 +2655,7 @@ void Foam::cellCuts::check() const
if (cellLoops_[own].empty() && cellLoops_[nei].empty())
{
FatalErrorIn("cellCuts::check()")
FatalErrorInFunction
<< "Internal face:" << faceI << " cut by " << iter()
<< " has owner:" << own
<< " and neighbour:" << nei
@ -2683,7 +2669,7 @@ void Foam::cellCuts::check() const
if (cellLoops_[own].empty())
{
FatalErrorIn("cellCuts::check()")
FatalErrorInFunction
<< "Boundary face:" << faceI << " cut by " << iter()
<< " has owner:" << own
<< " that is uncut"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -50,10 +50,8 @@ Foam::autoPtr<Foam::cellLooper> Foam::cellLooper::New
if (cstrIter == wordConstructorTablePtr_->end())
{
FatalErrorIn
(
"cellLooper::New(const word&, const polyMesh&)"
) << "Unknown set type "
FatalErrorInFunction
<< "Unknown set type "
<< type << nl << nl
<< "Valid cellLooper types : " << endl
<< wordConstructorTablePtr_->sortedToc()
@ -124,10 +122,8 @@ Foam::label Foam::cellLooper::getFirstVertEdge
}
}
FatalErrorIn
(
"getFirstVertEdge(const label, const label)"
) << "Can not find edge on face " << faceI
FatalErrorInFunction
<< "Can not find edge on face " << faceI
<< " using vertex " << vertI
<< abort(FatalError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -215,7 +215,7 @@ bool Foam::hexCellLooper::cut
{
if (loop.empty())
{
WarningIn("hexCellLooper")
WarningInFunction
<< "could not cut cell " << cellI << endl;
fileName cutsFile("hexCellLooper_" + name(cellI) + ".obj");
@ -245,7 +245,7 @@ bool Foam::hexCellLooper::cut
if (loopSet.found(elem))
{
FatalErrorIn("hexCellLooper::walkHex") << " duplicate cut"
FatalErrorInFunction
<< abort(FatalError);
}
loopSet.insert(elem);
@ -259,7 +259,7 @@ bool Foam::hexCellLooper::cut
if ((faceVerts.mag(facePoints) < SMALL) || (loop.size() < 3))
{
FatalErrorIn("hexCellLooper::walkHex") << "Face:" << faceVerts
FatalErrorInFunction
<< " on points:" << facePoints << endl
<< UIndirectList<point>(facePoints, faceVerts)()
<< abort(FatalError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -63,8 +63,7 @@ void Foam::topoCellLooper::subsetList
// changed)
if (freeI < 0)
{
FatalErrorIn("topoCellLooper::subsetList")
<< "startI:" << startI << " freeI:" << freeI
FatalErrorInFunction
<< " lst:" << lst << abort(FatalError);
}
lst.setCapacity(freeI);
@ -80,8 +79,7 @@ void Foam::topoCellLooper::subsetList
if ((freeI - startI) < 0)
{
FatalErrorIn("topoCellLooper::subsetList")
<< "startI:" << startI << " freeI:" << freeI
FatalErrorInFunction
<< " lst:" << lst << abort(FatalError);
}
@ -460,7 +458,7 @@ void Foam::topoCellLooper::walkSplitHex
// On edge
if (edgeI == -1)
{
FatalErrorIn("walkSplitHex") << "Illegal edge and vert"
FatalErrorInFunction
<< abort(FatalError);
}
@ -651,7 +649,7 @@ void Foam::topoCellLooper::walkSplitHex
}
else
{
FatalErrorIn("walkFromVert") << "Not yet implemented"
FatalErrorInFunction
<< "Choosing from more than "
<< "two candidates:" << nextFaces
<< " when coming from vertex " << vertI << " on cell "

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -47,7 +47,7 @@ Foam::label Foam::directionInfo::findEdge
}
}
FatalErrorIn("directionInfo::findEdge")
FatalErrorInFunction
<< "Cannot find an edge among " << edgeLabels << endl
<< "that uses vertices " << v0
<< " and " << v1
@ -77,7 +77,7 @@ Foam::label Foam::directionInfo::lowest
if (b1 != a)
{
FatalErrorIn("directionInfo::lowest")
FatalErrorInFunction
<< "Problem : a:" << a << " b:" << b << " size:" << size
<< abort(FatalError);
}
@ -99,7 +99,7 @@ Foam::label Foam::directionInfo::edgeToFaceIndex
{
if ((edgeI < 0) || (edgeI >= mesh.nEdges()))
{
FatalErrorIn("directionInfo::edgeToFaceIndex")
FatalErrorInFunction
<< "Illegal edge label:" << edgeI
<< " when projecting cut edge from cell " << cellI
<< " to face " << faceI
@ -184,7 +184,7 @@ Foam::label Foam::directionInfo::edgeToFaceIndex
return lowest(f.size(), fpA, fpB);
}
FatalErrorIn("directionInfo::edgeToFaceIndex")
FatalErrorInFunction
<< "Found connected faces " << mesh.faces()[f0I] << " and "
<< mesh.faces()[f1I] << " sharing edge " << edgeI << endl
<< "But none seems to be connected to face " << faceI

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -127,7 +127,7 @@ void Foam::directions::check2D
{
if (mag(correct2DPtr->planeNormal() & vec) > 1e-6)
{
FatalErrorIn("check2D") << "Specified vector " << vec
FatalErrorInFunction
<< "is not normal to plane defined in dynamicMeshDict."
<< endl
<< "Either make case 3D or adjust vector."
@ -161,7 +161,7 @@ Foam::vectorField Foam::directions::propagateDirection
if (!hexMatcher().isA(mesh, cellI))
{
FatalErrorIn("propagateDirection")
FatalErrorInFunction
<< "useHexTopology specified but cell " << cellI
<< " on face " << patchFaceI << " of patch " << pp.name()
<< " is not a hex" << exit(FatalError);
@ -229,7 +229,7 @@ Foam::vectorField Foam::directions::propagateDirection
if (index == -3)
{
// Never visited
WarningIn("propagateDirection")
WarningInFunction
<< "Cell " << cellI << " never visited to determine "
<< "local coordinate system" << endl
<< "Using direction " << defaultDir << " instead" << endl;
@ -247,7 +247,7 @@ Foam::vectorField Foam::directions::propagateDirection
}
else if (index == -1)
{
FatalErrorIn("propagateDirection")
FatalErrorInFunction
<< "Illegal index " << index << endl
<< "Value is only allowed on faces" << abort(FatalError);
}
@ -353,11 +353,8 @@ Foam::directions::directions
if (patchI == -1)
{
FatalErrorIn
(
"directions::directions(const polyMesh&, const dictionary&,"
"const twoDPointCorrector*)"
) << "Cannot find patch "
FatalErrorInFunction
<< "Cannot find patch "
<< patchName
<< exit(FatalError);
}
@ -373,11 +370,8 @@ Foam::directions::directions
{
tan1 = correct2DPtr->planeNormal() ^ n0;
WarningIn
(
"directions::directions(const polyMesh&, const dictionary&,"
"const twoDPointCorrector*)"
) << "Discarding user specified tan1 since 2D case." << endl
WarningInFunction
<< "Discarding user specified tan1 since 2D case." << endl
<< "Recalculated tan1 from face normal and planeNormal as "
<< tan1 << endl << endl;
}
@ -432,11 +426,8 @@ Foam::directions::directions
}
else
{
FatalErrorIn
(
"directions::directions(const polyMesh&, const dictionary&,"
"const twoDPointCorrector*)"
) << "Unknown coordinate system "
FatalErrorInFunction
<< "Unknown coordinate system "
<< coordSystem << endl
<< "Known types are global and patchLocal"
<< exit(FatalError);

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -105,11 +105,8 @@ void Foam::edgeVertex::updateLabels
if (newMaster == -1)
{
WarningIn
(
"edgeVertex::updateLabels(const labelList&, "
"Map<label>&)"
) << "master cell:" << iter.key()
WarningInFunction
<< "master cell:" << iter.key()
<< " has disappeared" << endl;
}
else

View File

@ -109,10 +109,8 @@ public:
{
if (eVert < 0 || eVert >= (mesh.nPoints() + mesh.nEdges()))
{
FatalErrorIn
(
"edgeVertex::isEdge(const primitiveMesh&, const label)"
) << "EdgeVertex " << eVert << " out of range "
FatalErrorInFunction
<< "EdgeVertex " << eVert << " out of range "
<< mesh.nPoints() << " to "
<< (mesh.nPoints() + mesh.nEdges() - 1)
<< abort(FatalError);
@ -130,10 +128,8 @@ public:
{
if (!isEdge(mesh, eVert))
{
FatalErrorIn
(
"edgeVertex::getEdge(const primitiveMesh&, const label)"
) << "EdgeVertex " << eVert << " not an edge"
FatalErrorInFunction
<< "EdgeVertex " << eVert << " not an edge"
<< abort(FatalError);
}
return eVert - mesh.nPoints();
@ -148,10 +144,8 @@ public:
{
if (isEdge(mesh, eVert) || (eVert < 0))
{
FatalErrorIn
(
"edgeVertex::getVertex(const primitiveMesh&, const label)"
) << "EdgeVertex " << eVert << " not a vertex"
FatalErrorInFunction
<< "EdgeVertex " << eVert << " not a vertex"
<< abort(FatalError);
}
return eVert;
@ -166,10 +160,8 @@ public:
{
if ((vertI < 0) || (vertI >= mesh.nPoints()))
{
FatalErrorIn
(
"edgeVertex::vertToEVert(const primitiveMesh&, const label)"
) << "Illegal vertex number " << vertI
FatalErrorInFunction
<< "Illegal vertex number " << vertI
<< abort(FatalError);
}
return vertI;
@ -184,10 +176,8 @@ public:
{
if ((edgeI < 0) || (edgeI >= mesh.nEdges()))
{
FatalErrorIn
(
"edgeVertex::edgeToEVert(const primitiveMesh&const label)"
) << "Illegal edge number " << edgeI
FatalErrorInFunction
<< "Illegal edge number " << edgeI
<< abort(FatalError);
}
return mesh.nPoints() + edgeI;

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -248,7 +248,7 @@ bool Foam::boundaryCutter::splitFace
if (nSplitEdges == 0 && nModPoints == 0)
{
FatalErrorIn("boundaryCutter::splitFace") << "Problem : face:" << faceI
FatalErrorInFunction
<< " nSplitEdges:" << nSplitEdges
<< " nTotalSplits:" << nTotalSplits
<< abort(FatalError);
@ -302,7 +302,7 @@ bool Foam::boundaryCutter::splitFace
if (startFp == -1)
{
FatalErrorIn("boundaryCutter::splitFace")
FatalErrorInFunction
<< "Problem" << abort(FatalError);
}
@ -508,7 +508,7 @@ void Foam::boundaryCutter::setRefinement
if (faceToSplit.found(faceI))
{
FatalErrorIn("boundaryCutter::setRefinement")
FatalErrorInFunction
<< "Face " << faceI << " vertices " << f
<< " is both marked for face-centre decomposition and"
<< " diagonal splitting."
@ -517,7 +517,7 @@ void Foam::boundaryCutter::setRefinement
if (mesh_.isInternalFace(faceI))
{
FatalErrorIn("boundaryCutter::setRefinement")
FatalErrorInFunction
<< "Face " << faceI << " vertices " << f
<< " is not an external face. Cannot split it"
<< abort(FatalError);
@ -637,7 +637,7 @@ void Foam::boundaryCutter::setRefinement
if (faceAddedPoint_.found(faceI))
{
FatalErrorIn("boundaryCutter::setRefinement")
FatalErrorInFunction
<< "Face " << faceI << " vertices " << f
<< " is both marked for face-centre decomposition and"
<< " diagonal splitting."
@ -662,7 +662,7 @@ void Foam::boundaryCutter::setRefinement
if (fp0 == -1 || fp1 == -1 || fp0 == fp1)
{
FatalErrorIn("boundaryCutter::setRefinement")
FatalErrorInFunction
<< "Problem : Face " << faceI << " vertices " << f
<< " newFace:" << newFace << " diagonal:" << f[diag[0]]
<< ' ' << f[diag[1]]

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -137,10 +137,7 @@ Foam::label Foam::meshCutAndRemove::findInternalFacePoint
if (pointLabels.empty())
{
FatalErrorIn
(
"meshCutAndRemove::findInternalFacePoint(const labelList&)"
)
FatalErrorInFunction
<< "Empty pointLabels" << abort(FatalError);
}
@ -452,11 +449,8 @@ void Foam::meshCutAndRemove::splitFace
if (startFp == -1)
{
FatalErrorIn
(
"meshCutAndRemove::splitFace"
", const face&, const label, const label, face&, face&)"
) << "Cannot find vertex (new numbering) " << v0
FatalErrorInFunction
<< "Cannot find vertex (new numbering) " << v0
<< " on face " << f
<< abort(FatalError);
}
@ -465,11 +459,8 @@ void Foam::meshCutAndRemove::splitFace
if (endFp == -1)
{
FatalErrorIn
(
"meshCutAndRemove::splitFace("
", const face&, const label, const label, face&, face&)"
) << "Cannot find vertex (new numbering) " << v1
FatalErrorInFunction
<< "Cannot find vertex (new numbering) " << v1
<< " on face " << f
<< abort(FatalError);
}
@ -619,12 +610,8 @@ void Foam::meshCutAndRemove::setRefinement
if (exposedPatchI < 0 || exposedPatchI >= patches.size())
{
FatalErrorIn
(
"meshCutAndRemove::setRefinement("
", const label, const cellCuts&, const labelList&"
", polyTopoChange&)"
) << "Illegal exposed patch " << exposedPatchI
FatalErrorInFunction
<< "Illegal exposed patch " << exposedPatchI
<< abort(FatalError);
}
@ -642,12 +629,8 @@ void Foam::meshCutAndRemove::setRefinement
// Check if there is any cell using this edge.
if (debug && findCutCell(cuts, mesh().edgeCells()[edgeI]) == -1)
{
FatalErrorIn
(
"meshCutAndRemove::setRefinement("
", const label, const cellCuts&, const labelList&"
", polyTopoChange&)"
) << "Problem: cut edge but none of the cells using it is\n"
FatalErrorInFunction
<< "Problem: cut edge but none of the cells using it is\n"
<< "edge:" << edgeI << " verts:" << e
<< abort(FatalError);
}
@ -748,12 +731,8 @@ void Foam::meshCutAndRemove::setRefinement
if (!usedPoint[pointI])
{
FatalErrorIn
(
"meshCutAndRemove::setRefinement("
", const label, const cellCuts&, const labelList&"
", polyTopoChange&)"
) << "Problem: faceSplitCut not used by any loop"
FatalErrorInFunction
<< "Problem: faceSplitCut not used by any loop"
<< " or cell anchor point"
<< "face:" << iter.key() << " point:" << pointI
<< " coord:" << mesh().points()[pointI]
@ -769,12 +748,8 @@ void Foam::meshCutAndRemove::setRefinement
{
if (!usedPoint[pointI])
{
FatalErrorIn
(
"meshCutAndRemove::setRefinement("
", const label, const cellCuts&, const labelList&"
", polyTopoChange&)"
) << "Problem: point is marked as cut but"
FatalErrorInFunction
<< "Problem: point is marked as cut but"
<< " not used by any loop"
<< " or cell anchor point"
<< "point:" << pointI
@ -813,12 +788,8 @@ void Foam::meshCutAndRemove::setRefinement
{
if (cutPatch[cellI] < 0 || cutPatch[cellI] >= patches.size())
{
FatalErrorIn
(
"meshCutAndRemove::setRefinement("
", const label, const cellCuts&, const labelList&"
", polyTopoChange&)"
) << "Illegal patch " << cutPatch[cellI]
FatalErrorInFunction
<< "Illegal patch " << cutPatch[cellI]
<< " provided for cut cell " << cellI
<< abort(FatalError);
}

View File

@ -123,7 +123,7 @@ Foam::label Foam::meshCutter::findInternalFacePoint
if (pointLabels.empty())
{
FatalErrorIn("meshCutter::findInternalFacePoint(const labelList&)")
FatalErrorInFunction
<< "Empty pointLabels" << abort(FatalError);
}
@ -383,11 +383,8 @@ void Foam::meshCutter::splitFace
if (startFp == -1)
{
FatalErrorIn
(
"meshCutter::splitFace"
", const face&, const label, const label, face&, face&)"
) << "Cannot find vertex (new numbering) " << v0
FatalErrorInFunction
<< "Cannot find vertex (new numbering) " << v0
<< " on face " << f
<< abort(FatalError);
}
@ -396,11 +393,8 @@ void Foam::meshCutter::splitFace
if (endFp == -1)
{
FatalErrorIn
(
"meshCutter::splitFace("
", const face&, const label, const label, face&, face&)"
) << "Cannot find vertex (new numbering) " << v1
FatalErrorInFunction
<< "Cannot find vertex (new numbering) " << v1
<< " on face " << f
<< abort(FatalError);
}
@ -563,11 +557,8 @@ void Foam::meshCutter::setRefinement
// Check if there is any cell using this edge.
if (debug && findCutCell(cuts, mesh().edgeCells()[edgeI]) == -1)
{
FatalErrorIn
(
"meshCutter::setRefinement(const cellCuts&"
", polyTopoChange&)"
) << "Problem: cut edge but none of the cells using it is\n"
FatalErrorInFunction
<< "Problem: cut edge but none of the cells using it is\n"
<< "edge:" << edgeI << " verts:" << e
<< abort(FatalError);
}
@ -939,11 +930,8 @@ void Foam::meshCutter::setRefinement
if (debug && (f != addEdgeCutsToFace(faceI)))
{
FatalErrorIn
(
"meshCutter::setRefinement(const cellCuts&"
", polyTopoChange&)"
) << "Problem: edges added to face which does "
FatalErrorInFunction
<< "Problem: edges added to face which does "
<< " not use a marked cut" << endl
<< "faceI:" << faceI << endl
<< "face:" << f << endl

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -70,11 +70,8 @@ void Foam::multiDirRefinement::addCells
if (iter == splitMap.end())
{
FatalErrorIn
(
"multiDirRefinement::addCells(const Map<label>&"
", List<refineCell>&)"
) << "Problem : cannot find added cell for cell "
FatalErrorInFunction
<< "Problem : cannot find added cell for cell "
<< refCell.cellNo() << abort(FatalError);
}
@ -143,11 +140,8 @@ void Foam::multiDirRefinement::addCells
}
else if (origCell[slave] != cellI)
{
FatalErrorIn
(
"multiDirRefinement::addCells(const primitiveMesh&"
", const Map<label>&"
) << "Added cell " << slave << " has two different masters:"
FatalErrorInFunction
<< "Added cell " << slave << " has two different masters:"
<< origCell[slave] << " , " << cellI
<< abort(FatalError);
}
@ -167,11 +161,8 @@ void Foam::multiDirRefinement::addCells
if (masterI >= addedCells_.size())
{
FatalErrorIn
(
"multiDirRefinement::addCells(const primitiveMesh&"
", const Map<label>&"
) << "Map of added cells contains master cell " << masterI
FatalErrorInFunction
<< "Map of added cells contains master cell " << masterI
<< " which is not a valid cell number" << endl
<< "This means that the mesh is not consistent with the"
<< " done refinement" << endl
@ -298,11 +289,8 @@ void Foam::multiDirRefinement::refineHex8
if (iter == hexCellSet.end())
{
FatalErrorIn
(
"multiDirRefinement::refineHex8"
"(polyMesh&, const labelList&, const bool)"
) << "Resulting mesh would not satisfy 2:1 ratio"
FatalErrorInFunction
<< "Resulting mesh would not satisfy 2:1 ratio"
<< " when refining cell " << cellI << abort(FatalError);
}
else
@ -317,11 +305,8 @@ void Foam::multiDirRefinement::refineHex8
{
if (iter() != 2)
{
FatalErrorIn
(
"multiDirRefinement::refineHex8"
"(polyMesh&, const labelList&, const bool)"
) << "Resulting mesh would not satisfy 2:1 ratio"
FatalErrorInFunction
<< "Resulting mesh would not satisfy 2:1 ratio"
<< " when refining cell " << iter.key()
<< abort(FatalError);
}

View File

@ -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-2015 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -214,7 +214,7 @@ Foam::Map<Foam::label> Foam::refinementIterator::setRefinement
{
if (!addedCells.insert(iter.key(), iter()))
{
FatalErrorIn("refinementIterator")
FatalErrorInFunction
<< "Master cell " << iter.key()
<< " already has been refined" << endl
<< "Added cell:" << iter() << abort(FatalError);
@ -272,7 +272,7 @@ Foam::Map<Foam::label> Foam::refinementIterator::setRefinement
if (nRefCells == oldRefCells)
{
WarningIn("refinementIterator")
WarningInFunction
<< "stopped refining."
<< "Did not manage to refine a single cell" << endl
<< "Wanted :" << oldRefCells << endl;

Some files were not shown because too many files have changed in this diff Show More