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 #include "boundaryPatch.H"
00027 #include <OpenFOAM/dictionary.H>
00028 #include <OpenFOAM/Ostream.H>
00029 
00030 
00031 
00032 Foam::boundaryPatch::boundaryPatch
00033 (
00034     const word& name,
00035     const label index,
00036     const label size,
00037     const label start,
00038     const word& physicalType
00039 )
00040 :
00041     patchIdentifier(name, index, physicalType),
00042     size_(size),
00043     start_(start)
00044 {}
00045 
00046 
00047 Foam::boundaryPatch::boundaryPatch
00048 (
00049     const word& name,
00050     const dictionary& dict,
00051     const label index
00052 )
00053 :
00054     patchIdentifier(name, dict, index),
00055     size_(readLabel(dict.lookup("nFaces"))),
00056     start_(readLabel(dict.lookup("startFace")))
00057 {}
00058 
00059 
00060 Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p)
00061 :
00062     patchIdentifier(p.name(), p.index(), p.physicalType()),
00063     size_(p.size()),
00064     start_(p.start())
00065 {}
00066 
00067 
00068 Foam::boundaryPatch::boundaryPatch(const boundaryPatch& p, const label index)
00069 :
00070     patchIdentifier(p.name(), index, p.physicalType()),
00071     size_(p.size()),
00072     start_(p.start())
00073 {}
00074 
00075 
00076 Foam::autoPtr<Foam::boundaryPatch> Foam::boundaryPatch::clone() const
00077 {
00078     return autoPtr<boundaryPatch>(new boundaryPatch(*this));
00079 }
00080 
00081 
00082 
00083 
00084 Foam::boundaryPatch::~boundaryPatch()
00085 {}
00086 
00087 
00088 
00089 
00090 void Foam::boundaryPatch::write(Ostream& os) const
00091 {
00092     patchIdentifier::write(os);
00093     os.writeKeyword("nFaces") << size_ << token::END_STATEMENT << nl;
00094     os.writeKeyword("startFace") << start_ << token::END_STATEMENT << nl;
00095 }
00096 
00097 
00098 
00099 
00100 Foam::Ostream& Foam::operator<<(Ostream& os, const boundaryPatch& p)
00101 {
00102     p.write(os);
00103     os.check("Ostream& operator<<(Ostream& f, const boundaryPatch&)");
00104     return os;
00105 }
00106 
00107 
00108