newSolidBodyMotionFunction.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 "solidBodyMotionFunction.H"
00028
00029
00030
00031 Foam::autoPtr<Foam::solidBodyMotionFunction> Foam::solidBodyMotionFunction::New
00032 (
00033 const dictionary& SBMFCoeffs,
00034 const Time& runTime
00035 )
00036 {
00037 word solidBodyMotionFunctionTypeName =
00038 SBMFCoeffs.lookup("solidBodyMotionFunction");
00039
00040 Info<< "Selecting solid-body motion function "
00041 << solidBodyMotionFunctionTypeName << endl;
00042
00043 dictionaryConstructorTable::iterator cstrIter =
00044 dictionaryConstructorTablePtr_->find(solidBodyMotionFunctionTypeName);
00045
00046 if (cstrIter == dictionaryConstructorTablePtr_->end())
00047 {
00048 FatalErrorIn
00049 (
00050 "solidBodyMotionFunction::New"
00051 "("
00052 " const dictionary& SBMFCoeffs,"
00053 " const Time& runTime"
00054 ")"
00055 ) << "Unknown solidBodyMotionFunction type "
00056 << solidBodyMotionFunctionTypeName << endl << endl
00057 << "Valid solidBodyMotionFunctions are : " << endl
00058 << dictionaryConstructorTablePtr_->toc()
00059 << exit(FatalError);
00060 }
00061
00062 return autoPtr<solidBodyMotionFunction>(cstrIter()(SBMFCoeffs, runTime));
00063 }
00064
00065
00066
Copyright © 2000-2009 OpenCFD Ltd