boundaryPatch.C
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "boundaryPatch.H"
00028 #include "dictionary.H"
00029 #include "Ostream.H"
00030
00031
00032
00033 Foam::boundaryPatch::boundaryPatch
00034 (
00035 const word& name,
00036 const label index,
00037 const label size,
00038 const label start,
00039 const word& physicalType
00040 )
00041 :
00042 patchIdentifier(name, index, physicalType),
00043 size_(size),
00044 start_(start)
00045 {}
00046
00047
00048 Foam::boundaryPatch::boundaryPatch
00049 (
00050 const word& name,
00051 const dictionary& dict,
00052 const label index
00053 )
00054 :
00055 patchIdentifier(name, dict, index),
00056 size_(readLabel(dict.lookup("nFaces"))),
00057 start_(readLabel(dict.lookup("startFace")))
00058 {}
00059
00060
00061 Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p)
00062 :
00063 patchIdentifier(p.name(), p.index(), p.physicalType()),
00064 size_(p.size()),
00065 start_(p.start())
00066 {}
00067
00068
00069 Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p, const label index)
00070 :
00071 patchIdentifier(p.name(), index, p.physicalType()),
00072 size_(p.size()),
00073 start_(p.start())
00074 {}
00075
00076
00077 Foam::autoPtr<Foam::boundaryPatch> Foam::boundaryPatch::clone() const
00078 {
00079 return autoPtr<boundaryPatch>(new boundaryPatch(*this));
00080 }
00081
00082
00083
00084
00085 Foam::boundaryPatch::~boundaryPatch()
00086 {}
00087
00088
00089
00090
00091 void Foam::boundaryPatch::write(Ostream& os) const
00092 {
00093 patchIdentifier::write(os);
00094 os.writeKeyword("nFaces") << size_ << token::END_STATEMENT << nl;
00095 os.writeKeyword("startFace") << start_ << token::END_STATEMENT << nl;
00096 }
00097
00098
00099
00100
00101 Foam::Ostream& Foam::operator<<(Ostream& os, const boundaryPatch& p)
00102 {
00103 p.write(os);
00104 os.check("Ostream& operator<<(Ostream& f, const boundaryPatch&)");
00105 return os;
00106 }
00107
00108
00109
Copyright © 2000-2009 OpenCFD Ltd