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 "procLduInterface.H"
00027 #include <OpenFOAM/lduInterfaceField.H>
00028 #include <OpenFOAM/cyclicLduInterface.H>
00029 #include <OpenFOAM/processorLduInterface.H>
00030 
00031 
00032 
00033 Foam::procLduInterface::procLduInterface
00034 (
00035     const lduInterfaceField& interface,
00036     const scalarField& coeffs
00037 )
00038 :
00039     faceCells_(interface.interface().faceCells()),
00040     coeffs_(coeffs),
00041     myProcNo_(-1),
00042     neighbProcNo_(-1)
00043 {
00044     if (isA<processorLduInterface>(interface.interface()))
00045     {
00046         const processorLduInterface& pldui =
00047             refCast<const processorLduInterface>(interface.interface());
00048 
00049         myProcNo_ = pldui.myProcNo();
00050         neighbProcNo_ = pldui.neighbProcNo();
00051     }
00052     else if (isA<cyclicLduInterface>(interface.interface()))
00053     {
00054     }
00055     else
00056     {
00057         FatalErrorIn
00058         (
00059             "procLduInterface::procLduInterface"
00060             "(const lduInterfaceField&, const scalarField&"
00061         )   << "unknown lduInterface type " << interface.interface().type()
00062             << exit(FatalError);
00063     }
00064 }
00065 
00066 
00067 Foam::procLduInterface::procLduInterface(Istream& is)
00068 :
00069     faceCells_(is),
00070     coeffs_(is),
00071     myProcNo_(readLabel(is)),
00072     neighbProcNo_(readLabel(is))
00073 {}
00074 
00075 
00076 
00077 
00078 Foam::Ostream& Foam::operator<<(Ostream& os, const procLduInterface& cldui)
00079 {
00080     os  << cldui.faceCells_
00081         << cldui.coeffs_
00082         << cldui.myProcNo_
00083         << cldui.neighbProcNo_;
00084 
00085     return os;
00086 }
00087 
00088 
00089