Пример #1
0
void pack_buckets_parts(const stk::mesh::BucketVector& buckets, stk::CommBuffer &buff)
{
    for(size_t i = 0; i < buckets.size(); ++i)
    {
        const stk::mesh::PartVector& parts = buckets[i]->supersets();
        std::string part_names_for_bucket = create_string_from_parts(parts);
        stk::diff::pack_string(buff, part_names_for_bucket);
    }
}
Пример #2
0
void check_parts_allowed(const stk::mesh::BucketVector &buckets, const stk::mesh::PartVector &parts_allowed)
{
    for (unsigned i = 0; i < buckets.size(); ++i)
    {
        const stk::mesh::Bucket &bucket = *buckets[i];
        const stk::mesh::PartVector &parts_found = bucket.supersets();

        for (unsigned j = 0; j < parts_found.size(); ++j)
        {
            const stk::mesh::Part *part = parts_found[j];
            bool found = (std::find(parts_allowed.begin(), parts_allowed.end(), part) != parts_allowed.end());
            EXPECT_TRUE(found);
        }
    }
}