当前位置: 首页>>代码示例>>C++>>正文


C++ EngngModel::setParallelMode方法代码示例

本文整理汇总了C++中EngngModel::setParallelMode方法的典型用法代码示例。如果您正苦于以下问题:C++ EngngModel::setParallelMode方法的具体用法?C++ EngngModel::setParallelMode怎么用?C++ EngngModel::setParallelMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EngngModel的用法示例。


在下文中一共展示了EngngModel::setParallelMode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: fail

EngngModel *InstanciateProblem(DataReader *dr, problemMode mode, int contextFlag, EngngModel *_master, bool parallelFlag)
{
    const char *__proc = "InstanciateProblem"; // Required by IR_GIVE_FIELD macro
    IRResultType result;                       // Required by IR_GIVE_FIELD macro
    EngngModel *problem;
    std::string problemName, dataOutputFileName, desc;

    dataOutputFileName = dr->giveOutputFileName();
    desc = dr->giveDescription();

    /* here we need copy of input record. The pointer returned by dr->giveInputRecord can (and will)
     * be updated as reading e-model components (nodes, etc). But we need this record being available
     * through the whole e-model instanciation
     */
    InputRecord *emodelir = dr->giveInputRecord(DataReader :: IR_emodelRec, 1)->GiveCopy();
    result = emodelir->giveRecordKeywordField(problemName); ///@todo Make this function robust, it can't be allowed to fail (the record keyword is not a normal field-id)
    if ( result != IRRT_OK ) {
        IR_IOERR("", __proc, "", emodelir, result);
    }

    problem = classFactory.createEngngModel(problemName.c_str(), 1, _master);
    if (!problem) {
        OOFEM_ERROR2("EngngModel::InstanciateProblem - Failed to construct engineering model if type \"%s\".\n", problemName.c_str());
    }
    problem->setProblemMode(mode);
    problem->setParallelMode(parallelFlag);

    if ( contextFlag ) {
        problem->setContextOutputMode(COM_Always);
    }

    problem->instanciateYourself(dr, emodelir, dataOutputFileName.c_str(), desc.c_str());

    delete emodelir;

    return problem;
}
开发者ID:Benjamin-git,项目名称:OOFEM_LargeDef,代码行数:37,代码来源:util.C


注:本文中的EngngModel::setParallelMode方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。