Commit 071065df authored by mattijs's avatar mattijs
Browse files

Merge branch 'master' of /home/noisy3/OpenFOAM/OpenFOAM-dev

parents 00913099 344a43fd
......@@ -139,10 +139,7 @@ void Foam::IOerror::exit(const int)
if (abort_)
{
Perr<< endl << *this << endl
<< "\nFOAM aborting (FOAM_ABORT set)\n" << endl;
printStack(Perr);
::abort();
abort();
}
if (Pstream::parRun())
......@@ -155,7 +152,13 @@ void Foam::IOerror::exit(const int)
{
if (throwExceptions_)
{
throw *this;
// Make a copy of the error to throw
IOerror errorException(*this);
// Rewind the message buffer for the next error message
messageStreamPtr_->rewind();
throw errorException;
}
else
{
......@@ -194,7 +197,13 @@ void Foam::IOerror::abort()
{
if (throwExceptions_)
{
throw *this;
// Make a copy of the error to throw
IOerror errorException(*this);
// Rewind the message buffer for the next error message
messageStreamPtr_->rewind();
throw errorException;
}
else
{
......@@ -209,7 +218,9 @@ void Foam::IOerror::abort()
Foam::Ostream& Foam::operator<<(Ostream& os, const IOerror& ioErr)
{
os << endl << ioErr.message().c_str() << endl << endl;
os << endl
<< ioErr.title().c_str() << endl
<< ioErr.message().c_str() << endl << endl;
os << "file: " << ioErr.ioFileName().c_str();
......@@ -238,6 +249,6 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const IOerror& ioErr)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Global error definitions
Foam::IOerror Foam::FatalIOError("--> FOAM FATAL IO ERROR : ");
Foam::IOerror Foam::FatalIOError("--> FOAM FATAL IO ERROR: ");
// ************************************************************************* //
......@@ -105,7 +105,6 @@ Foam::OSstream& Foam::error::operator()
const int sourceFileLineNumber
)
{
messageStreamPtr_->rewind();
functionName_ = functionName;
sourceFileName_ = sourceFileName;
sourceFileLineNumber_ = sourceFileLineNumber;
......@@ -137,7 +136,6 @@ Foam::error::operator OSstream&()
Perr<< endl
<< "error::operator OSstream&() : error stream has failed"
<< endl;
printStack(Perr);
abort();
}
......@@ -178,9 +176,6 @@ void Foam::error::exit(const int errNo)
if (abort_)
{
printStack(*this);
Perr<< endl << *this << endl
<< "\nFOAM aborting (FOAM_ABORT set)\n" << endl;
abort();
}
......@@ -194,7 +189,13 @@ void Foam::error::exit(const int errNo)
{
if (throwExceptions_)
{
throw *this;
// Make a copy of the error to throw
error errorException(*this);
// Rewind the message buffer for the next error message
messageStreamPtr_->rewind();
throw errorException;
}
else
{
......@@ -216,30 +217,36 @@ void Foam::error::abort()
if (abort_)
{
printStack(*this);
Perr<< endl << *this << endl
<< "\nFOAM aborting (FOAM_ABORT set)\n" << endl;
printStack(Perr);
::abort();
}
if (Pstream::parRun())
{
printStack(*this);
Perr<< endl << *this << endl
<< "\nFOAM parallel run aborting\n" << endl;
printStack(Perr);
Pstream::abort();
}
else
{
if (throwExceptions_)
{
throw *this;
// Make a copy of the error to throw
error errorException(*this);
// Rewind the message buffer for the next error message
messageStreamPtr_->rewind();
throw errorException;
}
else
{
printStack(*this);
Perr<< endl << *this << endl
<< "\nFOAM aborting\n" << endl;
printStack(Perr);
::abort();
}
}
......@@ -248,7 +255,9 @@ void Foam::error::abort()
Foam::Ostream& Foam::operator<<(Ostream& os, const error& fErr)
{
os << endl << fErr.message().c_str();
os << endl
<< fErr.title().c_str() << endl
<< fErr.message().c_str();
if (error::level >= 2 && fErr.sourceFileLineNumber())
{
......@@ -265,6 +274,6 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const error& fErr)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Global error definitions
Foam::error Foam::FatalError("--> FOAM FATAL ERROR : ");
Foam::error Foam::FatalError("--> FOAM FATAL ERROR: ");
// ************************************************************************* //
......@@ -35,7 +35,6 @@ int Foam::messageStream::level(Foam::debug::debugSwitch("level", 2));
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// Construct from components
Foam::messageStream::messageStream
(
const string& title,
......@@ -50,7 +49,6 @@ Foam::messageStream::messageStream
{}
//- Construct from dictionary
Foam::messageStream::messageStream(const dictionary& dict)
:
title_(dict.lookup("title")),
......
......@@ -61,7 +61,7 @@ void Foam::fanFvPatchField<Foam::scalar>::updateCoeffs()
(
scalarField::subField(phip, size()/2)
/scalarField::subField(patch().magSf(), size()/2),
0.0
scalar(0)
);
if (phi.dimensions() == dimDensity*dimVelocity*dimArea)
......@@ -79,7 +79,7 @@ void Foam::fanFvPatchField<Foam::scalar>::updateCoeffs()
jump_ += f_[i]*pow(Un, i);
}
jump_ = max(jump_, 0.0);
jump_ = max(jump_, scalar(0));
}
jumpCyclicFvPatchField<scalar>::updateCoeffs();
......
......@@ -142,7 +142,7 @@ LaunderSharmaKE::LaunderSharmaKE
"k",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh_
......@@ -155,7 +155,7 @@ LaunderSharmaKE::LaunderSharmaKE
"epsilon",
runTime_.timeName(),
mesh_,
IOobject::NO_READ,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh_
......
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
| \\ / O peration | Version: dev |
| \\ / A nd | Web: www.OpenFOAM.org |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
......
......@@ -7,7 +7,7 @@ CC = g++ -mabi=64
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = -G0 $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
......
......@@ -6,7 +6,7 @@ CC = g++ -m64
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
......
......@@ -6,7 +6,7 @@ CC = g++ -m64
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
......
......@@ -6,7 +6,7 @@ CC = g++ -m64
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
......
......@@ -6,7 +6,7 @@ CC = g++ -m64
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
......
......@@ -6,7 +6,7 @@ CC = g++ -m64
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
......
......@@ -6,7 +6,7 @@ CC = g++ -m32
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
......
......@@ -6,7 +6,7 @@ CC = g++ -m32
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC -pthread
......
......@@ -6,7 +6,7 @@ CC = g++ -m32
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
......
......@@ -6,7 +6,7 @@ CC = g++ -m32
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
......
......@@ -6,7 +6,7 @@ CC = g++
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-30
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
......
......@@ -6,7 +6,7 @@ CC = g++ -m64 -mcpu=power5+
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
......
......@@ -6,7 +6,7 @@ CC = mingw32-g++
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-40
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS)
......
......@@ -6,7 +6,7 @@ CC = g++
include $(RULES)/c++$(WM_COMPILE_OPTION)
ptFLAGS = -DNoRepository -ftemplate-depth-30
ptFLAGS = -DNoRepository -ftemplate-depth-60
c++FLAGS = $(GFLAGS) $(c++WARN) $(c++OPT) $(c++DBUG) $(ptFLAGS) $(LIB_HEADER_DIRS) -fPIC
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment