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 "GAMGInterface.H"
00027 #include <OpenFOAM/lduMatrix.H>
00028
00029
00030
00031
00032 Foam::autoPtr<Foam::GAMGInterface> Foam::GAMGInterface::New
00033 (
00034 const lduInterface& fineInterface,
00035 const labelField& localRestrictAddressing,
00036 const labelField& neighbourRestrictAddressing
00037 )
00038 {
00039 word coupleType(fineInterface.type());
00040
00041 lduInterfaceConstructorTable::iterator cstrIter =
00042 lduInterfaceConstructorTablePtr_->find(coupleType);
00043
00044 if (cstrIter == lduInterfaceConstructorTablePtr_->end())
00045 {
00046 FatalErrorIn
00047 (
00048 "GAMGInterface::New"
00049 "(const lduInterface& fineInterface, "
00050 "const labelField& localRestrictAddressing, "
00051 "const labelField& neighbourRestrictAddressing)"
00052 ) << "Unknown GAMGInterface type " << coupleType << ".\n"
00053 << "Valid GAMGInterface types are :"
00054 << lduInterfaceConstructorTablePtr_->sortedToc()
00055 << exit(FatalError);
00056 }
00057
00058 return autoPtr<GAMGInterface>
00059 (
00060 cstrIter()
00061 (
00062 fineInterface,
00063 localRestrictAddressing,
00064 neighbourRestrictAddressing
00065 )
00066 );
00067 }
00068
00069
00070