いわて駐在研究日誌

OpenCAE、電子工作、R/C等、徒然なるままに

メモ:dictionary中のsubDictionaryへのアクセスの仕方

    // read patches for torque calculation from dynamicMeshDict    
    IOdictionary dynamicMeshDict
    (
        IOobject
        (
        "dynamicMeshDict",
        runTime.constant(),
        mesh,
        IOobject::MUST_READ_IF_MODIFIED,
        IOobject::NO_WRITE
        )
    );
        // access subdict of dynamicMeshDict
        dictionary SubDict(dynamicMeshDict.subDict("solidBodyMotionFvMeshCoeffs"));    
        dictionary SubSubDict(SubDict.subDict("DirectEulerAngleRotatingMotionCoeffs"));

    // Patch list for the names of the patches to consider from calculateTorqueDict
        const wordList torquePatches(SubSubDict.lookup("torquePatches"));