这篇教程C++ FatalIOErrorInFunction函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中FatalIOErrorInFunction函数的典型用法代码示例。如果您正苦于以下问题:C++ FatalIOErrorInFunction函数的具体用法?C++ FatalIOErrorInFunction怎么用?C++ FatalIOErrorInFunction使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了FatalIOErrorInFunction函数的30个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: forAll // Check for any unset patches forAll(bmesh_, patchi) { if (!this->set(patchi)) { if (bmesh_[patchi].type() == cyclicPolyPatch::typeName) { FatalIOErrorInFunction ( dict ) << "Cannot find patchField entry for cyclic " << bmesh_[patchi].name() << endl << "Is your field uptodate with split cyclics?" << endl << "Run foamUpgradeCyclics to convert mesh and fields" << " to split cyclics." << exit(FatalIOError); } else { FatalIOErrorInFunction ( dict ) << "Cannot find patchField entry for " << bmesh_[patchi].name() << exit(FatalIOError); } } }
开发者ID:EricAlex,项目名称:OpenFOAM-dev,代码行数:26,
示例2: FatalIOErrorInFunctionvoid Foam::dynamicCode::checkSecurity( const char* title, const dictionary& dict){ if (isAdministrator()) { FatalIOErrorInFunction(dict) << "This code should not be executed by someone with administrator" << " rights due to security reasons." << nl << "(it writes a shared library which then gets loaded " << "using dlopen)" << exit(FatalIOError); } if (!allowSystemOperations) { FatalIOErrorInFunction(dict) << "Loading a shared library using case-supplied code is not" << " enabled by default" << nl << "because of security issues. If you trust the code you can" << " enable this" << nl << "facility be adding to the InfoSwitches setting in the system" << " controlDict:" << nl << nl << " allowSystemOperations 1" << nl << nl << "The system controlDict is either" << nl << nl << " ~/.OpenFOAM/$WM_PROJECT_VERSION/controlDict" << nl << nl << "or" << nl << nl << " $WM_PROJECT_DIR/etc/controlDict" << nl << endl << exit(FatalIOError); }}
开发者ID:rezads1,项目名称:OpenFOAM-dev,代码行数:34,
示例3: forAll forAll(patchFaces, facei) { face& f = patchFaces[facei]; // Replace (<block> <face>) face description // with the corresponding block face if (f.size() == 2) { const label bi = f[0]; const label fi = f[1]; if (bi >= size()) { FatalIOErrorInFunction(source) << "Block index out of range for patch face " << f << nl << " Number of blocks = " << size() << ", index = " << f[0] << nl << " on patch " << patchName << ", face " << facei << exit(FatalIOError); } else if (fi >= operator[](bi).blockShape().faces().size()) { FatalIOErrorInFunction(source) << "Block face index out of range for patch face " << f << nl << " Number of block faces = " << operator[](bi).blockShape().faces().size() << ", index = " << f[1] << nl << " on patch " << patchName << ", face " << facei << exit(FatalIOError); } else { f = operator[](bi).blockShape().faces()[fi]; } } else { forAll(f, fp) { if (f[fp] < 0) { FatalIOErrorInFunction(source) << "Negative point label " << f[fp] << nl << " on patch " << patchName << ", face " << facei << exit(FatalIOError); } else if (f[fp] >= points.size()) { FatalIOErrorInFunction(source) << "Point label " << f[fp] << " out of range 0.." << points.size() - 1 << nl << " on patch " << patchName << ", face " << facei << exit(FatalIOError); } } } }
开发者ID:mattijsjanssens,项目名称:OpenFOAM-dev,代码行数:58,
示例4: varWordFoam::string Foam::functionEntries::negEntry::negateVariable( const dictionary& parentDict, Istream& is){ // Read variable name as a word including the '$' const word varWord(is); if (varWord[0] != '$') { FatalIOErrorInFunction ( parentDict ) << "Expected variable name beginning with a '$' but found '" << varWord << "'" << exit(FatalIOError); return string::null; } // Strip the leading '$' from the variable name const string varName = varWord(1, varWord.size()-1); // Lookup the variable name in the parent dictionary.... const entry* ePtr = parentDict.lookupScopedEntryPtr(varName, true, false); if (ePtr && ePtr->isStream()) { const token variable(ePtr->stream()); // Convert to a string OStringStream os(is.format()); os << variable; const string str(os.str()); // Negate if (str[0] == '-') { return str(1, str.size() - 1); } else { return '-' + str; } } else { FatalIOErrorInFunction ( parentDict ) << "Illegal dictionary variable name " << varName << endl << "Valid dictionary entries are " << parentDict.toc() << exit(FatalIOError); return string::null; }}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:57,
示例5: ifFoam::string Foam::stringOps::getVariable( const word& name, const dictionary& dict, const bool allowEnvVars, const bool allowEmpty){ string value; const entry* ePtr = dict.lookupScopedEntryPtr ( name, true, false ); if (ePtr) { OStringStream buf; // Force floating point numbers to be printed with at least // some decimal digits. buf << fixed; buf.precision(IOstream::defaultPrecision()); // fail for non-primitiveEntry dynamicCast<const primitiveEntry> ( *ePtr ).write(buf, true); value = buf.str(); } else if (allowEnvVars) { value = getEnv(name); if (value.empty()) { FatalIOErrorInFunction ( dict ) << "Cannot find dictionary or environment variable " << name << exit(FatalIOError); } } else { FatalIOErrorInFunction ( dict ) << "Cannot find dictionary variable " << name << exit(FatalIOError); } return value;}
开发者ID:mattijsjanssens,项目名称:mattijs-extensions,代码行数:56,
示例6: patchFieldTypeFoam::tmp<Foam::fvsPatchField<Type>> Foam::fvsPatchField<Type>::New( const fvPatch& p, const DimensionedField<Type, surfaceMesh>& iF, const dictionary& dict){ if (debug) { InfoInFunction << "Constructing fvsPatchField<Type>" << endl; } const word patchFieldType(dict.get<word>("type")); auto cstrIter = dictionaryConstructorTablePtr_->cfind(patchFieldType); if (!cstrIter.found()) { if (!disallowGenericFvsPatchField) { cstrIter = dictionaryConstructorTablePtr_->cfind("generic"); } if (!cstrIter.found()) { FatalIOErrorInFunction(dict) << "Unknown patchField type " << patchFieldType << " for patch type " << p.type() << nl << nl << "Valid patchField types :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } } if ( !dict.found("patchType") || dict.get<word>("patchType") != p.type() ) { auto patchTypeCstrIter = dictionaryConstructorTablePtr_->cfind(p.type()); if (patchTypeCstrIter.found() && patchTypeCstrIter() != cstrIter()) { FatalIOErrorInFunction(dict) << "inconsistent patch and patchField types for /n" " patch type " << p.type() << " and patchField type " << patchFieldType << exit(FatalIOError); } } return cstrIter()(p, iF, dict);}
开发者ID:mattijsjanssens,项目名称:mattijs-extensions,代码行数:55,
示例7: libsvoid Foam::codedBase::unloadLibrary( const fileName& libPath, const string& globalFuncName, const dictionary& contextDict) const{ void* lib = 0; if (libPath.empty()) { return; } lib = libs().findLibrary(libPath); if (!lib) { return; } // provision for manual execution of code before unloading if (dlSymFound(lib, globalFuncName)) { loaderFunctionType function = reinterpret_cast<loaderFunctionType> ( dlSym(lib, globalFuncName) ); if (function) { (*function)(false); // force unload } else { FatalIOErrorInFunction ( contextDict ) << "Failed looking up symbol " << globalFuncName << nl << "from " << libPath << exit(FatalIOError); } } if (!libs().close(libPath, false)) { FatalIOErrorInFunction ( contextDict ) << "Failed unloading library " << libPath << exit(FatalIOError); }}
开发者ID:EricAlex,项目名称:OpenFOAM-dev,代码行数:53,
示例8: sampledSurfaceFoam::sampledIsoSurface::sampledIsoSurface( const word& name, const polyMesh& mesh, const dictionary& dict): sampledSurface(name, mesh, dict), isoField_(dict.lookup("isoField")), isoVal_(readScalar(dict.lookup("isoValue"))), mergeTol_(dict.lookupOrDefault("mergeTol", 1e-6)), regularise_(dict.lookupOrDefault("regularise", true)), average_(dict.lookupOrDefault("average", false)), zoneID_(dict.lookupOrDefault("zone", word::null), mesh.cellZones()), exposedPatchName_(word::null), surfPtr_(nullptr), facesPtr_(nullptr), prevTimeIndex_(-1), storedVolFieldPtr_(nullptr), volFieldPtr_(nullptr), pointFieldPtr_(nullptr){ if (!sampledSurface::interpolate()) { FatalIOErrorInFunction ( dict ) << "Non-interpolated iso surface not supported since triangles" << " span across cells." << exit(FatalIOError); } if (zoneID_.index() != -1) { dict.lookup("exposedPatchName") >> exposedPatchName_; if (mesh.boundaryMesh().findPatchID(exposedPatchName_) == -1) { FatalIOErrorInFunction ( dict ) << "Cannot find patch " << exposedPatchName_ << " in which to put exposed faces." << endl << "Valid patches are " << mesh.boundaryMesh().names() << exit(FatalIOError); } if (debug && zoneID_.index() != -1) { Info<< "Restricting to cellZone " << zoneID_.name() << " with exposed internal faces into patch " << exposedPatchName_ << endl; } }
开发者ID:petebachant,项目名称:OpenFOAM-dev,代码行数:53,
示例9: whileFoam::Istream& Foam::ISstream::readVerbatim(string& str){ static const int maxLen = 8000; static const int errLen = 80; // truncate error message for readability static char buf[maxLen]; char c; int nChar = 0; while (get(c)) { if (c == token::HASH) { char nextC; get(nextC); if (nextC == token::END_BLOCK) { buf[nChar] = '/0'; str = buf; return *this; } else { putback(nextC); } } buf[nChar++] = c; if (nChar == maxLen) { buf[errLen] = '/0'; FatalIOErrorInFunction(*this) << "string /"" << buf << ".../"/n" << " is too long (max. " << maxLen << " characters)" << exit(FatalIOError); return *this; } } // don't worry about a dangling backslash if string terminated prematurely buf[errLen] = buf[nChar] = '/0'; FatalIOErrorInFunction(*this) << "problem while reading string /"" << buf << ".../"" << exit(FatalIOError); return *this;}
开发者ID:Kiiree,项目名称:OpenFOAM-dev,代码行数:52,
示例10: exittmp<convectionScheme<Type> > convectionScheme<Type>::New( const fvMesh& mesh, const typename multivariateSurfaceInterpolationScheme<Type>:: fieldTable& fields, const surfaceScalarField& faceFlux, Istream& schemeData){ if (fv::debug) { Info<< "convectionScheme<Type>::New" "(const fvMesh&, " "const typename multivariateSurfaceInterpolationScheme<Type>" "::fieldTable&, const surfaceScalarField&, Istream&) : " "constructing convectionScheme<Type>" << endl; } if (schemeData.eof()) { FatalIOErrorInFunction ( schemeData ) << "Convection scheme not specified" << endl << endl << "Valid convection schemes are :" << endl << MultivariateConstructorTablePtr_->sortedToc() << exit(FatalIOError); } const word schemeName(schemeData); typename MultivariateConstructorTable::iterator cstrIter = MultivariateConstructorTablePtr_->find(schemeName); if (cstrIter == MultivariateConstructorTablePtr_->end()) { FatalIOErrorInFunction ( schemeData ) << "Unknown convection scheme " << schemeName << nl << nl << "Valid convection schemes are :" << endl << MultivariateConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return cstrIter()(mesh, fields, faceFlux, schemeData);}
开发者ID:hokieengr,项目名称:OpenFOAM-dev,代码行数:48,
示例11: zoneTypeFoam::autoPtr<Foam::cellZone> Foam::cellZone::New( const word& name, const dictionary& dict, const label index, const cellZoneMesh& zm){ if (debug) { Info<< "cellZone::New(const word&, const dictionary&, const label, " "const cellZoneMesh&) : constructing cellZone " << name << endl; } const word zoneType(dict.lookup("type")); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(zoneType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalIOErrorInFunction ( dict ) << "Unknown cellZone type " << zoneType << nl << nl << "Valid cellZone types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return autoPtr<cellZone>(cstrIter()(name, dict, index, zm));}
开发者ID:hokieengr,项目名称:OpenFOAM-dev,代码行数:34,
示例12: patch_Foam::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 { FatalIOErrorInFunction(dict) << "essential 'value' entry not provided" << exit(FatalIOError); }}
开发者ID:mattijsjanssens,项目名称:mattijs-extensions,代码行数:25,
示例13: procPatch_Foam::processorFvPatchField<Type>::processorFvPatchField( const fvPatch& p, const DimensionedField<Type, volMesh>& iF, const dictionary& dict): coupledFvPatchField<Type>(p, iF, dict), procPatch_(refCast<const processorFvPatch>(p)), sendBuf_(0), receiveBuf_(0), outstandingSendRequest_(-1), outstandingRecvRequest_(-1), scalarSendBuf_(0), scalarReceiveBuf_(0){ if (!isA<processorFvPatch>(p)) { FatalIOErrorInFunction ( dict ) << "/n patch type '" << p.type() << "' not constraint type '" << typeName << "'" << "/n for patch " << p.name() << " of field " << this->internalField().name() << " in file " << this->internalField().objectPath() << exit(FatalIOError); }}
开发者ID:EricAlex,项目名称:OpenFOAM-dev,代码行数:29,
示例14: rawFNamebool Foam::functionEntries::includeEntry::execute( dictionary& parentDict, Istream& is){ const fileName rawFName(is); const fileName fName ( includeFileName(is.name().path(), rawFName, parentDict) ); IFstream ifs(fName); if (ifs) { if (Foam::functionEntries::includeEntry::log) { Info<< fName << endl; } parentDict.read(ifs); return true; } else { FatalIOErrorInFunction ( is ) << "Cannot open include file " << (ifs.name().size() ? ifs.name() : rawFName) << " while reading dictionary " << parentDict.name() << exit(FatalIOError); return false; }}
开发者ID:EricAlex,项目名称:OpenFOAM-dev,代码行数:35,
示例15: exitFoam::autoPtr<Foam::coordinateRotation> Foam::coordinateRotation::New( const dictionary& dict){ if (debug) { Pout<< "coordinateRotation::New(const dictionary&) : " << "constructing coordinateRotation" << endl; } word rotType = dict.lookup("type"); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(rotType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalIOErrorInFunction ( dict ) << "Unknown coordinateRotation type " << rotType << nl << nl << "Valid coordinateRotation types are :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return autoPtr<coordinateRotation>(cstrIter()(dict));}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:31,
示例16: cyclicAMILduInterfaceFieldFoam::cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField( const fvPatch& p, const DimensionedField<Type, volMesh>& iF, const dictionary& dict): cyclicAMILduInterfaceField(), coupledFvPatchField<Type>(p, iF, dict), cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p)){ if (!isA<cyclicAMIFvPatch>(p)) { FatalIOErrorInFunction ( dict ) << " patch type '" << p.type() << "' not constraint type '" << typeName << "'" << "/n for patch " << p.name() << " of field " << this->internalField().name() << " in file " << this->internalField().objectPath() << exit(FatalIOError); } if (!dict.found("value") && this->coupled()) { this->evaluate(Pstream::blocking); }}
开发者ID:EricAlex,项目名称:OpenFOAM-dev,代码行数:29,
示例17: patchTypeFoam::autoPtr<Foam::lduInterface> Foam::lduInterface::New( const dictionary& dict, const label index){ word patchType(dict.lookup("type")); if (debug) { InfoInFunction << "Constructing lduInterface " << patchType << endl; } dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(patchType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalIOErrorInFunction ( dict ) << "Unknown lduInterface type " << patchType << nl << nl << "Valid lduInterface types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return autoPtr<lduInterface>(cstrIter()(dict, index));}
开发者ID:mattijsjanssens,项目名称:mattijs-extensions,代码行数:30,
示例18: exitFoam::autoPtr<Foam::lduInterface> Foam::lduInterface::New( const word& patchType, Istream& is){ if (debug) { InfoInFunction << "Constructing lduInterface " << patchType << endl; } IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(patchType); if (cstrIter == IstreamConstructorTablePtr_->end()) { FatalIOErrorInFunction ( is ) << "Unknown lduInterface type " << patchType << nl << nl << "Valid lduInterface types are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return autoPtr<lduInterface>(cstrIter()(is));}
开发者ID:mattijsjanssens,项目名称:mattijs-extensions,代码行数:28,
示例19: blockEdgeFoam::projectEdge::projectEdge( const dictionary& dict, const label index, const searchableSurfaces& geometry, const pointField& points, Istream& is): blockEdge(dict, index, points, is), geometry_(geometry){ wordList names(is); surfaces_.setSize(names.size()); forAll(names, i) { surfaces_[i] = geometry_.findSurfaceID(names[i]); if (surfaces_[i] == -1) { FatalIOErrorInFunction(is) << "Cannot find surface " << names[i] << " in geometry" << exit(FatalIOError); } }
开发者ID:mattijsjanssens,项目名称:OpenFOAM-dev,代码行数:25,
示例20: ifFoam::valuePointPatchField<Type>::valuePointPatchField( const pointPatch& p, const DimensionedField<Type, pointMesh>& iF, const dictionary& dict, const bool valueRequired): pointPatchField<Type>(p, iF, dict), Field<Type>(p.size()){ if (dict.found("value")) { Field<Type>::operator= ( Field<Type>("value", dict, p.size()) ); } else if (!valueRequired) { Field<Type>::operator=(Zero); } else { FatalIOErrorInFunction ( dict ) << "Essential entry 'value' missing" << exit(FatalIOError); }}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:31,
示例21: schemeNameFoam::tmp<Foam::multivariateSurfaceInterpolationScheme<Type>>Foam::multivariateSurfaceInterpolationScheme<Type>::New( const fvMesh& mesh, const multivariateSurfaceInterpolationScheme<Type>::fieldTable& vtfs, const surfaceScalarField& faceFlux, Istream& schemeData){ if (fv::debug) { InfoInFunction << "Constructing surfaceInterpolationScheme<Type>" << endl; } const word schemeName(schemeData); typename IstreamConstructorTable::iterator constructorIter = IstreamConstructorTablePtr_->find(schemeName); if (constructorIter == IstreamConstructorTablePtr_->end()) { FatalIOErrorInFunction ( schemeData ) << "Unknown discretisation scheme " << schemeName << nl << nl << "Valid schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return constructorIter()(mesh, vtfs, faceFlux, schemeData);}
开发者ID:BarisCumhur,项目名称:OpenFOAM-dev,代码行数:33,
示例22: procPatch_Foam::processorCyclicFvPatchField<Type>::processorCyclicFvPatchField( const fvPatch& p, const DimensionedField<Type, volMesh>& iF, const dictionary& dict): processorFvPatchField<Type>(p, iF, dict), procPatch_(refCast<const processorCyclicFvPatch>(p)){ if (!isType<processorCyclicFvPatch>(p)) { FatalIOErrorInFunction ( dict ) << "/n patch type '" << p.type() << "' not constraint type '" << typeName << "'" << "/n for patch " << p.name() << " of field " << this->internalField().name() << " in file " << this->internalField().objectPath() << exit(FatalIOError); } if (Pstream::defaultCommsType == Pstream::commsTypes::scheduled) { WarningInFunction << "Scheduled communication with split cyclics not supported." << endl; }}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:30,
示例23: whilevoid Foam::functionEntries::ifeqEntry::skipUntil( DynamicList<filePos>& stack, const dictionary& parentDict, const word& endWord, Istream& is){ while (!is.eof()) { token t; readToken(t, is); if (t.isWord()) { if (t.wordToken() == "#if" || t.wordToken() == "#ifeq") { stack.append(filePos(is.name(), is.lineNumber())); skipUntil(stack, parentDict, "#endif", is); stack.remove(); } else if (t.wordToken() == endWord) { return; } } } FatalIOErrorInFunction(parentDict) << "Did not find matching " << endWord << exit(FatalIOError);}
开发者ID:OpenFOAM,项目名称:OpenFOAM-dev,代码行数:30,
示例24: patch_Foam::radiationCoupledBase::radiationCoupledBase( const fvPatch& patch, const dictionary& dict): patch_(patch), method_(emissivityMethodTypeNames_.read(dict.lookup("emissivityMode"))){ switch (method_) { case SOLIDRADIATION: { if (!isA<mappedPatchBase>(patch_.patch())) { FatalIOErrorInFunction ( dict ) << "/n patch type '" << patch_.type() << "' not type '" << mappedPatchBase::typeName << "'" << "/n for patch " << patch_.name() << exit(FatalIOError); } emissivity_ = scalarField(patch_.size(), 0.0); } break; case LOOKUP: { if (!dict.found("emissivity")) { FatalIOErrorInFunction ( dict ) << "/n emissivity key does not exist for patch " << patch_.name() << exit(FatalIOError); } else { emissivity_ = scalarField("emissivity", dict, patch_.size()); } } break; }}
开发者ID:BarisCumhur,项目名称:OpenFOAM-dev,代码行数:47,
示例25: fieldTableName_Foam::timeVaryingMappedFixedValueFvPatchField<Type>::timeVaryingMappedFixedValueFvPatchField( const fvPatch& p, const DimensionedField<Type, volMesh>& iF, const dictionary& dict): fixedValueFvPatchField<Type>(p, iF), fieldTableName_(iF.name()), setAverage_(readBool(dict.lookup("setAverage"))), perturb_(dict.lookupOrDefault("perturb", 1e-5)), mapMethod_ ( dict.lookupOrDefault<word> ( "mapMethod", "planarInterpolation" ) ), mapperPtr_(NULL), sampleTimes_(0), startSampleTime_(-1), startSampledValues_(0), startAverage_(Zero), endSampleTime_(-1), endSampledValues_(0), endAverage_(Zero), offset_(Function1<Type>::New("offset", dict)){ if ( mapMethod_ != "planarInterpolation" && mapMethod_ != "nearest" ) { FatalIOErrorInFunction ( dict ) << "mapMethod should be one of 'planarInterpolation'" << ", 'nearest'" << exit(FatalIOError); } dict.readIfPresent("fieldTableName", fieldTableName_); if (dict.found("value")) { fvPatchField<Type>::operator==(Field<Type>("value", dict, p.size())); } else { // Note: we use evaluate() here to trigger updateCoeffs followed // by re-setting of fvatchfield::updated_ flag. This is // so if first use is in the next time step it retriggers // a new update. this->evaluate(Pstream::blocking); }}
开发者ID:iYohey,项目名称:OpenFOAM-dev,代码行数:59,
示例26: FatalIOErrorInFunctionvoid Foam::IOstream::fatalCheck(const char* operation) const{ if (bad()) { FatalIOErrorInFunction(*this) << "error in IOstream " << name() << " for operation " << operation << exit(FatalIOError); }}
开发者ID:BarisCumhur,项目名称:OpenFOAM-dev,代码行数:9,
示例27: forAll forAll(blockShape_, pi) { if (blockShape_[pi] < 0) { FatalIOErrorInFunction(is) << "Negative point label " << blockShape_[pi] << " in block " << *this << exit(FatalIOError); } else if (blockShape_[pi] >= vertices_.size()) { FatalIOErrorInFunction(is) << "Point label " << blockShape_[pi] << " out of range 0.." << vertices_.size() - 1 << " in block " << *this << exit(FatalIOError); } }
开发者ID:mattijsjanssens,项目名称:mattijs-extensions,代码行数:18,
示例28: firstTokenFoam::Field<Type>::Field( const word& keyword, const dictionary& dict, const label s){ if (s) { ITstream& is = dict.lookup(keyword); // Read first token token firstToken(is); if (firstToken.isWord()) { if (firstToken.wordToken() == "uniform") { this->setSize(s); operator=(pTraits<Type>(is)); } else if (firstToken.wordToken() == "nonuniform") { is >> static_cast<List<Type>&>(*this); if (this->size() != s) { FatalIOErrorInFunction ( dict ) << "size " << this->size() << " is not equal to the given value of " << s << exit(FatalIOError); } } else { FatalIOErrorInFunction ( dict ) << "expected keyword 'uniform' or 'nonuniform', found " << firstToken.wordToken() << exit(FatalIOError); } }
开发者ID:jheylmun,项目名称:OpenFOAM-dev,代码行数:44,
示例29: exittmp<snGradScheme<Type>> snGradScheme<Type>::New( const fvMesh& mesh, Istream& schemeData){ if (fv::debug) { InfoInFunction << "Constructing snGradScheme<Type>" << endl; } if (schemeData.eof()) { FatalIOErrorInFunction ( schemeData ) << "Discretisation scheme not specified" << endl << endl << "Valid schemes are :" << endl << MeshConstructorTablePtr_->sortedToc() << exit(FatalIOError); } const word schemeName(schemeData); typename MeshConstructorTable::iterator constructorIter = MeshConstructorTablePtr_->find(schemeName); if (constructorIter == MeshConstructorTablePtr_->end()) { FatalIOErrorInFunction ( schemeData ) << "Unknown discretisation scheme " << schemeName << nl << nl << "Valid schemes are :" << endl << MeshConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return constructorIter()(mesh, schemeData);}
开发者ID:BarisCumhur,项目名称:OpenFOAM-dev,代码行数:42,
示例30: firstTokenFoam::autoPtr<Foam::blockVertex> Foam::blockVertex::New( const dictionary& dict, const label index, const searchableSurfaces& geometry, Istream& is){ if (debug) { InfoInFunction << "Constructing blockVertex" << endl; } token firstToken(is); if (firstToken.isPunctuation() && firstToken.pToken() == token::BEGIN_LIST) { // Putback the opening bracket is.putBack(firstToken); return autoPtr<blockVertex> ( new blockVertices::pointVertex(dict, index, geometry, is) ); } else if (firstToken.isWord()) { const word faceType(firstToken.wordToken()); IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(faceType); if (cstrIter == IstreamConstructorTablePtr_->end()) { FatalErrorInFunction << "Unknown blockVertex type " << faceType << nl << nl << "Valid blockVertex types are" << endl << IstreamConstructorTablePtr_->sortedToc() << abort(FatalError); } return autoPtr<blockVertex>(cstrIter()(dict, index, geometry, is)); } else { FatalIOErrorInFunction(is) << "incorrect first token, expected <word> or '(', found " << firstToken.info() << exit(FatalIOError); return autoPtr<blockVertex>(nullptr); }}
开发者ID:mattijsjanssens,项目名称:mattijs-extensions,代码行数:54,
注:本文中的FatalIOErrorInFunction函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 C++ FcConfigGetCurrent函数代码示例 C++ FatalIOErrorIn函数代码示例 |