Foam::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)); }
autoPtr<ePatch> ePatch::New ( const word& name, const dictionary& dict, const label index, const eBoundaryMesh& bm ) { if (debug) { Info<< "ePatch::New(const word&, const dictionary&, const label, " "const eBoundaryMesh&) : constructing ePatch" << endl; } word patchType(dict.lookup("type")); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(patchType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalIOErrorIn ( "ePatch::New(const word&, const dictionary&, " "const label, const eBoundaryMesh&)", dict ) << "Unknown ePatch type " << patchType << endl << endl << "Valid ePatch types are :" << endl << dictionaryConstructorTablePtr_->toc() << exit(FatalIOError); } return autoPtr<ePatch>(cstrIter()(name, dict, index, bm)); }
Foam::noSlipFvPatchVectorField::noSlipFvPatchVectorField ( const fvPatch& p, const DimensionedField<vector, volMesh>& iF, const dictionary& dict ) : fixedValueFvPatchVectorField(p, iF, Zero) { patchType() = dict.lookupOrDefault<word>("patchType", word::null); }
Ostream& processorBoundaryPatch::operator<<(Ostream& os) const { os << patchName() << nl << token::BEGIN_BLOCK << nl << " type " << patchType() << token::END_STATEMENT << nl << " nFaces " << patchSize() << token::END_STATEMENT << nl << " startFace " << patchStart() << token::END_STATEMENT << nl << " myProcNo " << myProcNo_ << token::END_STATEMENT << nl << " neighbProcNo " << neighbProcNo_ << token::END_STATEMENT << nl << token::END_BLOCK << endl; return os; }
Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New ( const word& name, const dictionary& dict, const label index, const polyBoundaryMesh& bm ) { if (debug) { Info<< "polyPatch::New(const word&, const dictionary&, const label, " "const polyBoundaryMesh&) : constructing polyPatch" << endl; } word patchType(dict.lookup("type")); dict.readIfPresent("geometricType", patchType); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(patchType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { if (!disallowGenericPolyPatch) { cstrIter = dictionaryConstructorTablePtr_->find("genericPatch"); } if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalIOErrorIn ( "polyPatch::New(const word&, const dictionary&, " "const label, const polyBoundaryMesh&)", dict ) << "Unknown polyPatch type " << patchType << " for patch " << name << endl << endl << "Valid polyPatch types are :" << endl << dictionaryConstructorTablePtr_->toc() << exit(FatalIOError); } } return autoPtr<polyPatch>(cstrIter()(name, dict, index, bm)); }
Foam::autoPtr<Foam::polyPatch> Foam::polyPatch::New ( const word& name, const dictionary& dict, const label index, const polyBoundaryMesh& bm ) { if (debug) { InfoInFunction << "Constructing polyPatch" << endl; } word patchType(dict.lookup("type")); dict.readIfPresent("geometricType", patchType); return polyPatch::New(patchType, name, dict, index, bm); }
Foam::pressureNormalInletOutletVelocityFvPatchVectorField:: pressureNormalInletOutletVelocityFvPatchVectorField ( const fvPatch& p, const DimensionedField<vector, volMesh>& iF, const dictionary& dict ) : mixedFvPatchVectorField(p, iF), phiName_(dict.lookupOrDefault<word>("phi", "phi")), rhoName_(dict.lookupOrDefault<word>("rho", "rho")) { patchType() = dict.lookupOrDefault<word>("patchType", word::null); fvPatchVectorField::operator=(vectorField("value", dict, p.size())); refValue() = *this; refGrad() = Zero; valueFraction() = 0.0; }
Foam::uniformTotalPressureFvPatchScalarField:: uniformTotalPressureFvPatchScalarField ( const uniformTotalPressureFvPatchScalarField& ptf, const fvPatch& p, const DimensionedField<scalar, volMesh>& iF, const fvPatchFieldMapper& mapper ) : fixedValueFvPatchScalarField(p, iF), // Don't map UName_(ptf.UName_), phiName_(ptf.phiName_), rhoName_(ptf.rhoName_), psiName_(ptf.psiName_), gamma_(ptf.gamma_), pressure_(ptf.pressure_, false) { patchType() = ptf.patchType(); // Set the patch pressure to the current total pressure // This is not ideal but avoids problems with the creation of patch faces const scalar t = this->db().time().timeOutputValue(); fvPatchScalarField::operator==(pressure_->value(t)); }