|
Sierra Toolkit Version of the Day
|
00001 /*------------------------------------------------------------------------*/ 00002 /* Copyright 2010 Sandia Corporation. */ 00003 /* Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive */ 00004 /* license for use of this work by or on behalf of the U.S. Government. */ 00005 /* Export of this program may require a license from the */ 00006 /* United States Government. */ 00007 /*------------------------------------------------------------------------*/ 00008 00009 #include <stk_util/unit_test_support/stk_utest_macros.hpp> 00010 #include <Shards_BasicTopologies.hpp> 00011 00012 #include <stk_util/parallel/Parallel.hpp> 00013 00014 #include <stk_mesh/base/MetaData.hpp> 00015 #include <stk_mesh/base/BulkData.hpp> 00016 #include <stk_mesh/base/Entity.hpp> 00017 #include <stk_mesh/base/GetEntities.hpp> 00018 00019 #include <stk_mesh/fem/EntityRanks.hpp> 00020 #include <stk_mesh/fem/TopologyHelpers.hpp> 00021 #include <stk_mesh/fem/TopologicalMetaData.hpp> 00022 00023 STKUNIT_UNIT_TEST( UnitTestStkMeshGenerateNewEntities , testUnit ) { 00024 00025 stk::ParallelMachine pm(MPI_COMM_WORLD); 00026 00027 const int spatial_dimension = 3; 00028 stk::mesh::MetaData meta_data( stk::mesh::TopologicalMetaData::entity_rank_names(spatial_dimension) ); 00029 stk::mesh::BulkData bulk_data( meta_data , pm ); 00030 stk::mesh::TopologicalMetaData top_data( meta_data, spatial_dimension ); 00031 00032 00033 meta_data.commit(); 00034 00035 00036 const stk::mesh::PartVector no_parts; 00037 00038 bulk_data.modification_begin(); 00039 00040 bulk_data.declare_entity(top_data.node_rank, bulk_data.parallel_rank() + 1, no_parts); 00041 00042 bulk_data.modification_end(); 00043 00044 std::vector<size_t> requests(meta_data.entity_rank_count(), 0); 00045 requests[0] = 2; 00046 00047 bulk_data.modification_begin(); 00048 00049 // generate_new_entities creates new blank entities of the requested ranks 00050 stk::mesh::EntityVector new_nodes; 00051 //STKUNIT_ASSERT_NO_THROW( 00052 bulk_data.generate_new_entities(requests, new_nodes); 00053 //); 00054 00055 bulk_data.modification_end(); 00056 }