예제 #1
0
void pack_part_names(stk::CommBuffer& buf, const stk::mesh::PartVector& parts)
{
    for(size_t i=0; i<parts.size(); ++i)
    {
        pack_string(buf, parts[i]->name());
    }
}
예제 #2
0
std::string create_string_from_parts(const stk::mesh::PartVector& parts)
{
    std::string names;
    for(size_t i=0; i<parts.size(); ++i)
    {
        names += parts[i]->name() + " ";
    }
    return names;
}
예제 #3
0
void ModificationSummary::writeParts(std::ostringstream& os, const std::string &label, const stk::mesh::PartVector& parts)
{
    if(!parts.empty())
    {
        std::vector<std::string> names(parts.size());
        for(size_t i = 0; i < parts.size(); ++i)
        {
            names[i] = parts[i]->name();
        }
        std::sort(names.begin(), names.end());

        os << "\t" << label << "\n";
        for(size_t i = 0; i < names.size(); ++i)
        {
            os << "\t\t" << names[i] << std::endl;
        }
    }
}
예제 #4
0
void pack_part_names_except(stk::CommBuffer& buf, const stk::mesh::PartVector& parts, stk::mesh::Part* skipPart)
{
    for(size_t i=0; i<parts.size(); ++i)
    {
        if (skipPart==nullptr || parts[i]->mesh_meta_data_ordinal() != skipPart->mesh_meta_data_ordinal())
        {
            pack_string(buf, parts[i]->name());
        }
    }
}