// Build a FieldsContainer with "time" and "body" labels
// -----------------------------------------------------
ansys::dpf::FieldsContainer fields_container;
fields_container.addLabels({ ansys::dpf::labels::time, ansys::dpf::labels::body });
// create the Fields and their associated label spaces
// ---------------------------------------------------
ansys::dpf::LabelSpace label_space_0({ {ansys::dpf::labels::time, 1}, {ansys::dpf::labels::body, 2} });
ansys::dpf::Field field_0;
// ... fill field_0 data
ansys::dpf::LabelSpace label_space_1({ {ansys::dpf::labels::time, 1}, {ansys::dpf::labels::body, 6} });
ansys::dpf::Field field_1;
// ... fill field_1 data
ansys::dpf::LabelSpace label_space_2({ {ansys::dpf::labels::time, 1}, {ansys::dpf::labels::body, 17} });
ansys::dpf::Field field_2;
// ... fill field_2 data
ansys::dpf::LabelSpace label_space_3({ {ansys::dpf::labels::time, 1}, {ansys::dpf::labels::body, 19} });
ansys::dpf::Field field_3;
// ... fill field_3 data
ansys::dpf::LabelSpace label_space_4({ {ansys::dpf::labels::time, 4}, {ansys::dpf::labels::body, 2} });
ansys::dpf::Field field_4;
// ... fill field_4 data
ansys::dpf::LabelSpace label_space_5({ {ansys::dpf::labels::time, 4}, {ansys::dpf::labels::body, 6} });
ansys::dpf::Field field_5;
// ... fill field_5 data
ansys::dpf::LabelSpace label_space_6({ {ansys::dpf::labels::time, 4}, {ansys::dpf::labels::body, 17} });
ansys::dpf::Field field_6;
// ... fill field_6 data
ansys::dpf::LabelSpace label_space_7({ {ansys::dpf::labels::time, 4}, {ansys::dpf::labels::body, 19} });
ansys::dpf::Field field_7;
// ... fill field_7 data
// Add fields to the fields_container
fields_container.add(label_space_0, field_0);
fields_container.add(label_space_1, field_1);
fields_container.add(label_space_2, field_2);
fields_container.add(label_space_3, field_3);
fields_container.add(label_space_4, field_4);
fields_container.add(label_space_5, field_5);
fields_container.add(label_space_6, field_6);
fields_container.add(label_space_7, field_7);
// access the available ids for a defined label
// --------------------------------------------
ansys::dpf::Scoping body_label_ids = fields_container.labelScoping(ansys::dpf::labels::body);
int* scoping_ids = body_label_ids.ids().data();