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


C++ TetrahedralMesh::ConstructCuboid方法代码示例

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


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

示例1: TestExtendedBidomainTissueParameters

    void TestExtendedBidomainTissueParameters() throw (Exception)
    {
        HeartConfig::Instance()->Reset();

        TetrahedralMesh<3,3> mesh;
        mesh.ConstructCuboid(2,2,2);

        StimulatedCellFactory stimulated_cell_factory;
        UnStimulatedCellFactory unstimulated_cell_factory;
        ExtracellularStimulusFactory extracellular_stimulus_factory;

        stimulated_cell_factory.SetMesh(&mesh);
        unstimulated_cell_factory.SetMesh(&mesh);
        extracellular_stimulus_factory.SetMesh(&mesh);

        ExtendedBidomainTissue<3>  extended_bidomain_tissue( &stimulated_cell_factory,  &unstimulated_cell_factory, &extracellular_stimulus_factory);

        //cover the set and get method for the flag about the extracellular stimulus
        TS_ASSERT_EQUALS(extended_bidomain_tissue.HasTheUserSuppliedExtracellularStimulus(), false);
        extended_bidomain_tissue.SetUserSuppliedExtracellularStimulus(true);
        TS_ASSERT_EQUALS(extended_bidomain_tissue.HasTheUserSuppliedExtracellularStimulus(), true);

        //set some values
        extended_bidomain_tissue.SetAmFirstCell(1.0);
        extended_bidomain_tissue.SetAmSecondCell(2.0);
        extended_bidomain_tissue.SetAmGap(3.0);
        extended_bidomain_tissue.SetCmFirstCell(4.0);
        extended_bidomain_tissue.SetCmSecondCell(5.0);
        extended_bidomain_tissue.SetGGap(6.0);

        //and pick them up
        TS_ASSERT_EQUALS(extended_bidomain_tissue.GetAmFirstCell(), 1.0);
        TS_ASSERT_EQUALS(extended_bidomain_tissue.GetAmSecondCell(), 2.0);
        TS_ASSERT_EQUALS(extended_bidomain_tissue.GetAmGap(), 3.0);
        TS_ASSERT_EQUALS(extended_bidomain_tissue.GetCmFirstCell(), 4.0);
        TS_ASSERT_EQUALS(extended_bidomain_tissue.GetCmSecondCell(), 5.0);
        TS_ASSERT_EQUALS(extended_bidomain_tissue.GetGGap(), 6.0);
    }
开发者ID:Chaste,项目名称:Old-Chaste-svn-mirror,代码行数:38,代码来源:TestExtendedBidomainTissue.hpp


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