本文整理汇总了C++中FatalIOErrorIn函数的典型用法代码示例。如果您正苦于以下问题:C++ FatalIOErrorIn函数的具体用法?C++ FatalIOErrorIn怎么用?C++ FatalIOErrorIn使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FatalIOErrorIn函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: procPatch_
processorFaPatchField<Type>::processorFaPatchField
(
const faPatch& p,
const DimensionedField<Type, areaMesh>& iF,
const dictionary& dict
)
:
coupledFaPatchField<Type>(p, iF, dict),
procPatch_(refCast<const processorFaPatch>(p))
{
if (!isType<processorFaPatch>(p))
{
FatalIOErrorIn
(
"processorFaPatchField<Type>::processorFaPatchField\n"
"(\n"
" const faPatch& p,\n"
" const Field<Type>& field,\n"
" const dictionary& dict\n"
")\n",
dict
) << "\n patch type '" << p.type()
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->dimensionedInternalField().name()
<< " in file " << this->dimensionedInternalField().objectPath()
<< exit(FatalIOError);
}
}
示例2: exit
wedgeFvPatchField<Type>::wedgeFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
)
:
transformFvPatchField<Type>(p, iF, dict)
{
if (!isType<wedgeFvPatch>(p))
{
FatalIOErrorIn
(
"wedgeFvPatchField<Type>::wedgeFvPatchField\n"
"(\n"
" const fvPatch& p,\n"
" const Field<Type>& field,\n"
" dictionary& dict\n"
")\n",
dict
) << "\n patch type '" << p.type()
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->dimensionedInternalField().name()
<< " in file " << this->dimensionedInternalField().objectPath()
<< exit(FatalIOError);
}
evaluate();
}
示例3: exit
wedgeFaPatchField<Type>::wedgeFaPatchField
(
const faPatch& p,
const DimensionedField<Type, areaMesh>& iF,
const dictionary& dict
)
:
transformFaPatchField<Type>(p, iF, dict)
{
if (!isType<wedgeFaPatch>(p))
{
FatalIOErrorIn
(
"wedgeFaPatchField<Type>::wedgeFaPatchField\n"
"(\n"
" const faPatch& p,\n"
" const Field<Type>& field,\n"
" dictionary& dict\n"
")\n",
dict
) << "patch " << this->patch().index() << " not wedge type. "
<< "Patch type = " << p.type()
<< exit(FatalIOError);
}
this->evaluate();
}
示例4: fName
bool Foam::functionEntries::includeEntry::execute
(
dictionary& parentDict,
Istream& is
)
{
const fileName fName(includeFileName(is));
IFstream ifs(fName);
if (ifs)
{
if (Foam::functionEntries::includeEntry::report)
{
Info<< fName << endl;
}
parentDict.read(ifs);
return true;
}
else
{
FatalIOErrorIn
(
"functionEntries::includeEntry::includeEntry"
"(dictionary& parentDict, Istream&)",
is
) << "Cannot open include file " << ifs.name()
<< " while reading dictionary " << parentDict.name()
<< exit(FatalIOError);
return false;
}
}
示例5: toupper
unsigned char Foam::SHA1Digest::readHexDigit(Istream& is)
{
// Takes into account that 'a' (or 'A') is 10
static const int alphaOffset = toupper('A') - 10;
// Takes into account that '0' is 0
static const int zeroOffset = int('0');
// silently ignore leading or intermediate '_'
char c = 0;
do
{
is.read(c);
}
while (c == '_');
if (!isxdigit(c))
{
FatalIOErrorIn("SHA1Digest::readHexDigit(Istream&)", is)
<< "Illegal hex digit: '" << c << "'"
<< exit(FatalIOError);
}
if (isdigit(c))
{
return int(c) - zeroOffset;
}
else
{
return toupper(c) - alphaOffset;
}
}
示例6: cyclicAMIPatch_
Foam::cyclicAMIPointPatchField<Type>::cyclicAMIPointPatchField
(
const pointPatch& p,
const DimensionedField<Type, pointMesh>& iF,
const dictionary& dict
)
:
coupledPointPatchField<Type>(p, iF, dict),
cyclicAMIPatch_(refCast<const cyclicAMIPointPatch>(p)),
ppiPtr_(NULL),
nbrPpiPtr_(NULL)
{
if (!isType<cyclicAMIPointPatch>(p))
{
FatalIOErrorIn
(
"cyclicAMIPointPatchField<Type>::cyclicAMIPointPatchField\n"
"(\n"
" const pointPatch&,\n"
" const DimensionedField<Type, pointMesh>&,\n"
" const dictionary&\n"
")\n",
dict
) << "patch " << this->patch().index() << " not cyclicAMI type. "
<< "Patch type = " << p.type()
<< exit(FatalIOError);
}
}
示例7: patch_
fvsPatchField<Type>::fvsPatchField
(
const fvPatch& p,
const DimensionedField<Type, surfaceMesh>& iF,
const dictionary& dict
)
:
Field<Type>(p.size()),
patch_(p),
internalField_(iF)
{
if (dict.found("value"))
{
fvsPatchField<Type>::operator=
(
Field<Type>("value", dict, p.size())
);
}
else
{
FatalIOErrorIn
(
"fvsPatchField<Type>::fvsPatchField\n"
"(\n"
" const fvPatch& p,\n"
" const DimensionedField<Type, surfaceMesh>& iF,\n"
" const dictionary& dict\n"
")\n",
dict
) << "essential value entry not provided"
<< exit(FatalIOError);
}
}
示例8: domainScalingLduInterfaceField
domainScalingFvPatchField<Type>::domainScalingFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
)
:
domainScalingLduInterfaceField(),
coupledFvPatchField<Type>(p, iF, dict),
domainScalingPatch_(refCast<const domainScalingFvPatch>(p)),
fieldName_(iF.name())
{
if (!isType<domainScalingFvPatch>(p))
{
FatalIOErrorIn
(
"domainScalingFvPatchField<Type>::domainScalingFvPatchField\n"
"(\n"
" const fvPatch& p,\n"
" const DimensionedField<Type, volMesh>& iF,\n"
" const dictionary& dict\n"
")\n",
dict
) << "patch " << this->patch().index() << " not domainScalingFvPatchField type. "
<< "Patch type = " << p.type()
<< exit(FatalIOError);
}
// Same as in the cyclic interface
this->evaluate();
}
示例9: name
Foam::Istream& Foam::regIOobject::readStream(const word& expectName)
{
if (IFstream::debug)
{
Info<< "regIOobject::readStream(const word&) : "
<< "reading object " << name()
<< " from file " << objectPath()
<< endl;
}
// Construct IFstream if not already constructed
if (!isPtr_)
{
readStream();
// Check the className of the regIOobject
// dictionary is an allowable name in case the actual class
// instantiated is a dictionary
if
(
expectName.size()
&& headerClassName() != expectName
&& headerClassName() != "dictionary"
)
{
FatalIOErrorIn("regIOobject::readStream(const word&)", *isPtr_)
<< "unexpected class name " << headerClassName()
<< " expected " << expectName << endl
<< " while reading object " << name()
<< exit(FatalIOError);
}
}
return *isPtr_;
}
示例10: symmetryPlanePatch_
Foam::symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField
(
const fvPatch& p,
const DimensionedField<Type, volMesh>& iF,
const dictionary& dict
)
:
basicSymmetryFvPatchField<Type>(p, iF, dict),
symmetryPlanePatch_(refCast<const symmetryPlaneFvPatch>(p))
{
if (!isType<symmetryPlaneFvPatch>(p))
{
FatalIOErrorIn
(
"symmetryPlaneFvPatchField<Type>::symmetryPlaneFvPatchField\n"
"(\n"
" const fvPatch& p,\n"
" const Field<Type>& field,\n"
" const dictionary& dict\n"
")\n",
dict
) << "\n patch type '" << p.type()
<< "' not constraint type '" << typeName << "'"
<< "\n for patch " << p.name()
<< " of field " << this->dimensionedInternalField().name()
<< " in file " << this->dimensionedInternalField().objectPath()
<< exit(FatalIOError);
}
}
示例11: cstrIter
autoPtr<externalRadiationSource> externalRadiationSource::New
(
const word& name,
const dictionary& dict,
const fvPatch& p
)
{
word ersTypeName = dict.lookup("type");
Info<< "Selecting external radiation source " << ersTypeName << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(ersTypeName);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"externalRadiationSource::New(\n"
" const word& name,\n"
" const dictionary& dict,\n"
" const fvPatch& p\n"
")",
dict
) << "Unknown externalRadiationSource type "
<< ersTypeName << endl << endl
<< "Valid externalRadiationSource are : " << endl
<< dictionaryConstructorTablePtr_->toc()
<< exit(FatalIOError);
}
Info << "Here 2" << endl;
return cstrIter()(name, dict, p);
}
示例12: exit
SymmetryPointPatchField
<PatchField, Mesh, PointPatch, SymmetryPointPatch, MatrixType, Type>::
SymmetryPointPatchField
(
const PointPatch& p,
const DimensionedField<Type, Mesh>& iF,
const dictionary& dict
)
:
BasicSymmetryPointPatchField
<PatchField, Mesh, PointPatch, MatrixType, Type>(p, iF)
{
if (!isType<SymmetryPointPatch>(p))
{
FatalIOErrorIn
(
"SymmetryPointPatchField"
"<PatchField, Mesh, PointPatch, SymmetryPointPatch, "
"MatrixType, Type>::SymmetryPointPatchField\n"
"(\n"
" const PointPatch& p,\n"
" const DimensionedField<Type, Mesh>& iF,\n"
" const dictionary& dict\n"
")\n",
dict
) << "patch " << this->patch().index() << " not symmetry type. "
<< "Patch type = " << p.type()
<< exit(FatalIOError);
}
}
示例13: exit
autoPtr<thermalLaw> thermalLaw::New
(
const word& name,
const volScalarField& T,
const dictionary& dict
)
{
word rheoTypeName = dict.lookup("type");
Info<< "Selecting thermal model " << rheoTypeName << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(rheoTypeName);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"thermalLaw::New(\n"
" const word& name,\n"
" const volScalarField& T,\n"
" const dictionary& dict\n"
")",
dict
) << "Unknown thermalLaw type "
<< rheoTypeName << endl << endl
<< "Valid thermalLaws are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
}
return autoPtr<thermalLaw>(cstrIter()(name, T, dict));
}
开发者ID:Unofficial-Extend-Project-Mirror,项目名称:foam-extend-foam-extend-3.2,代码行数:33,代码来源:newThermalLaw.C
示例14: exit
Foam::autoPtr<Foam::PODODE> Foam::PODODE::New
(
const fvMesh& mesh,
const dictionary& dict
)
{
word PODTypeName = dict.lookup("type");
Info<< "Selecting POD ODE model " << PODTypeName << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(PODTypeName);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"PODODE::New\n"
"(\n"
" const fvMesh& mesh\n"
" const dictionary& dict\n"
")",
dict
) << "Unknown PODODE type "
<< PODTypeName << endl << endl
<< "Valid POD ODEs are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
}
return autoPtr<PODODE>
(cstrIter()(mesh, dict.subDict(PODTypeName + "Coeffs")));
}
示例15: exit
autoPtr<rheologyLaw> rheologyLaw::New
(
const word& name,
const volSymmTensorField& sigma,
const dictionary& dict
)
{
word rheoTypeName = dict.lookup("type");
Info<< "Selecting rheology model " << rheoTypeName << endl;
dictionaryConstructorTable::iterator cstrIter =
dictionaryConstructorTablePtr_->find(rheoTypeName);
if (cstrIter == dictionaryConstructorTablePtr_->end())
{
FatalIOErrorIn
(
"rheologyLaw::New(\n"
" const word& name,\n"
" const volSymmTensorField& sigma,\n"
" const dictionary& dict\n"
")",
dict
) << "Unknown rheologyLaw type "
<< rheoTypeName << endl << endl
<< "Valid rheologyLaws are : " << endl
<< dictionaryConstructorTablePtr_->sortedToc()
<< exit(FatalIOError);
}
return autoPtr<rheologyLaw>(cstrIter()(name, sigma, dict));
}