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); } }
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(); }
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(); }
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; } }
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; } }
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); } }
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); } }
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(); }
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_; }
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); } }
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); }
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); } }
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)); }
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"))); }
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)); }
cyclicFvsPatchField<Type>::cyclicFvsPatchField ( const fvPatch& p, const DimensionedField<Type, surfaceMesh>& iF, const dictionary& dict ) : coupledFvsPatchField<Type>(p, iF, dict), cyclicPatch_(refCast<const cyclicFvPatch>(p)) { if (!isType<cyclicFvPatch>(p)) { FatalIOErrorIn ( "cyclicFvsPatchField<Type>::cyclicFvsPatchField\n" "(\n" " const fvPatch& p,\n" " const Field<Type>& field,\n" " const dictionary& dict\n" ")\n", dict ) << "patch " << this->patch().index() << " not cyclic type. " << "Patch type = " << p.type() << exit(FatalIOError); } }
Foam::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)) { FatalIOErrorIn ( "cyclicAMIFvPatchField<Type>::cyclicAMIFvPatchField" "(" "const fvPatch&, " "const DimensionedField<Type, volMesh>&, " "const dictionary&" ")", dict ) << " 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); } if (!dict.found("value") && this->coupled()) { this->evaluate(Pstream::blocking); } }
Foam::token::compound& Foam::token::transferCompoundToken(const Istream& is) { if (type_ == COMPOUND) { if (compoundTokenPtr_->empty()) { FatalIOErrorIn ( "token::transferCompoundToken(const Istream& is)", is ) << "compound has already been transfered from token\n " << info() << abort(FatalIOError); } else { compoundTokenPtr_->empty() = true; } return *compoundTokenPtr_; } else { parseError("compound"); return *compoundTokenPtr_; } }
emptyFvsPatchField<Type>::emptyFvsPatchField ( const fvPatch& p, const DimensionedField<Type, surfaceMesh>& iF, const dictionary& dict ) : fvsPatchField<Type>(p, iF, Field<Type>(0)) { if (!isType<emptyFvPatch>(p)) { FatalIOErrorIn ( "emptyFvsPatchField<Type>::emptyFvsPatchField\n" "(\n" " const fvPatch& p,\n" " const Field<Type>& field,\n" " const dictionary& dict\n" ")\n", dict ) << "patch " << this->patch().index() << " not empty type. " << "Patch type = " << p.type() << exit(FatalIOError); } }
Foam::cyclicAMIFvsPatchField<Type>::cyclicAMIFvsPatchField ( const fvPatch& p, const DimensionedField<Type, surfaceMesh>& iF, const dictionary& dict ) : coupledFvsPatchField<Type>(p, iF, dict), cyclicAMIPatch_(refCast<const cyclicAMIFvPatch>(p)) { if (!isA<cyclicAMIFvPatch>(p)) { FatalIOErrorIn ( "cyclicAMIFvsPatchField<Type>::cyclicAMIFvsPatchField" "(" "const fvPatch&, " "const Field<Type>&, " "const dictionary&" ")", dict ) << "patch " << this->patch().index() << " not cyclicAMI type. " << "Patch type = " << p.type() << exit(FatalIOError); } }
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)) { FatalIOErrorIn ( "processorFvPatchField<Type>::processorFvPatchField\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); } }
symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField ( const pointPatch& p, const DimensionedField<Type, pointMesh>& iF, const dictionary& dict ) : basicSymmetryPointPatchField<Type>(p, iF, dict), symmetryPlanePatch_(refCast<const symmetryPlanePointPatch>(p)) { if (!isType<symmetryPlanePointPatch>(p)) { FatalIOErrorIn ( "symmetryPlanePointPatchField<Type>::symmetryPlanePointPatchField\n" "(\n" " const pointPatch& p,\n" " const Field<Type>& field,\n" " const dictionary& dict\n" ")\n", dict ) << "patch " << this->patch().index() << " not symmetry type. " << "Patch type = " << p.type() << exit(FatalIOError); } }
emptyFaPatchField<Type>::emptyFaPatchField ( const faPatch& p, const DimensionedField<Type, areaMesh>& iF, const dictionary& dict ) : faPatchField<Type>(p, iF, Field<Type>(0)) { if (typeid(p) != typeid(emptyFaPatch)) { FatalIOErrorIn ( "emptyFaPatchField<Type>::emptyFaPatchField\n" "(\n" " const faPatch& p,\n" " const DimensionedField<Type, areaMesh>& iF,\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); } }
autoPtr<solidInterface> solidInterface::New ( const word& name, const fvMesh& mesh, const constitutiveModel& rheology ) { Info<< "Selecting solidInterface procedure " << name << endl; dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(name); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalIOErrorIn ( "solidInterface::New(\n" " const word& name,\n" " const fvMesh& mesh,\n" " const constitutiveModel& rheology" //,\n" ")", rheology ) << "Unknown solidInterfaceMethod " << name << endl << endl << "Valid solidInterfaces are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return autoPtr<solidInterface>(cstrIter()(name, mesh, rheology)); }
ggiFvsPatchField<Type>::ggiFvsPatchField ( const fvPatch& p, const DimensionedField<Type, surfaceMesh>& iF, const dictionary& dict ) : coupledFvsPatchField<Type>(p, iF, dict, true), ggiPatch_(refCast<const ggiFvPatch>(p)) { if (!isType<ggiFvPatch>(p)) { FatalIOErrorIn ( "ggiFvsPatchField<Type>::ggiFvsPatchField\n" "(\n" " const fvPatch& p,\n" " const DimensionedField<Type, surfaceMesh>& iF,\n" " const dictionary& dict\n" ")\n", dict ) << "patch " << this->patch().index() << " not ggi type. " << "Patch type = " << p.type() << exit(FatalIOError); } }
cyclicFvPatchField<Type>::cyclicFvPatchField ( const fvPatch& p, const DimensionedField<Type, volMesh>& iF, const dictionary& dict ) : coupledFvPatchField<Type>(p, iF, dict), cyclicPatch_(refCast<const cyclicFvPatch>(p)) { if (!isType<cyclicFvPatch>(p)) { FatalIOErrorIn ( "cyclicFvPatchField<Type>::cyclicFvPatchField\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); } this->evaluate(Pstream::blocking); }
Foam::wedgePointPatchField<Type>::wedgePointPatchField ( const pointPatch& p, const DimensionedField<Type, pointMesh>& iF, const dictionary& dict ) : pointPatchField<Type>(p, iF, dict) { if (!isType<wedgePointPatch>(p)) { FatalIOErrorIn ( "wedgePointPatchField<Type>::wedgePointPatchField\n" "(\n" " const pointPatch& p,\n" " const Field<Type>& field,\n" " const dictionary& dict\n" ")\n", dict ) << "patch " << this->patch().index() << " not wedge type. " << "Patch type = " << p.type() << exit(FatalIOError); } }
inviscidWallPFvPatchScalarField::inviscidWallPFvPatchScalarField ( const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, const dictionary& dict ) : fixedGradientFvPatchScalarField(p, iF), fluxFraction_(readScalar(dict.lookup("fluxFraction"))) { if (dict.found("gradient")) { gradient() = scalarField("gradient", dict, p.size()); fixedGradientFvPatchScalarField::updateCoeffs(); fixedGradientFvPatchScalarField::evaluate(); } else { fvPatchField<scalar>::operator=(patchInternalField()); gradient() = 0.0; } if (fluxFraction_<0.0 || fluxFraction_ > 1.0) { FatalIOErrorIn ( "inviscidWallPFvPatchScalarField::" "supersonicFreeStreamFvPatchVectorField" "(const fvPatch&, const scalarField&, const dictionary&)", dict ) << " unphysical fluxFraction specified (< 0.0 or > 1.0)" << exit(FatalIOError); } }
Foam::autoPtr<Foam::pointZone> Foam::pointZone::New ( const word& name, const dictionary& dict, const label index, const pointZoneMesh& zm ) { if (debug) { Info<< "pointZone::New(const word&, const dictionary&, const label, " "const pointZoneMesh&) : constructing pointZone " << name << endl; } word zoneType(dict.lookup("type")); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(zoneType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalIOErrorIn ( "pointZone::New(const word&, const dictionary&, " "const label, const pointZoneMesh&)", dict ) << "Unknown pointZone type " << zoneType << endl << endl << "Valid pointZone types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return autoPtr<pointZone>(cstrIter()(name, dict, index, zm)); }
Foam::tmp<Foam::fv::gradScheme<Type> > Foam::fv::gradScheme<Type>::New ( const fvMesh& mesh, Istream& schemeData ) { if (fv::debug) { Info<< "gradScheme<Type>::New" "(const fvMesh& mesh, Istream& schemeData) : " "constructing gradScheme<Type>" << endl; } if (schemeData.eof()) { FatalIOErrorIn ( "gradScheme<Type>::New" "(const fvMesh& mesh, Istream& schemeData)", schemeData ) << "Grad scheme not specified" << endl << endl << "Valid grad schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); } const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); if (cstrIter == IstreamConstructorTablePtr_->end()) { FatalIOErrorIn ( "gradScheme<Type>::New" "(const fvMesh& mesh, Istream& schemeData)", schemeData ) << "Unknown grad scheme " << schemeName << nl << nl << "Valid grad schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); } return cstrIter()(mesh, schemeData); }