9 : meshset(_meshset), tagName(NULL), tagNameSize(0), record_begin(false),
13 rval = moab.tag_get_handle(
"_SeriesName", th_SeriesName);
15 rval = moab.tag_get_by_ptr(th_SeriesName, &
meshset, 1,
19 const int def_val_len = 0;
22 std::string Tag_SeriesTime =
"_SeriesTime_" +
getName();
24 rval = moab.tag_get_handle(Tag_SeriesTime.c_str(), 1, MB_TYPE_DOUBLE,
30 std::string Tag_DataHandles_SeriesName =
"_SeriesDataHandles_" +
getName();
31 rval = moab.tag_get_handle(
32 Tag_DataHandles_SeriesName.c_str(), def_val_len, MB_TYPE_HANDLE,
37 std::string Tag_DataUIDs_SeriesName =
"_SeriesDataUIDs_" +
getName();
38 rval = moab.tag_get_handle(
39 Tag_DataUIDs_SeriesName.c_str(), def_val_len, MB_TYPE_OPAQUE,
41 MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_BYTES | MB_TAG_VARLEN, NULL);
45 std::string Tag_Data_SeriesName =
"_SeriesData_" +
getName();
46 rval = moab.tag_get_handle(
47 Tag_Data_SeriesName.c_str(), def_val_len, MB_TYPE_OPAQUE,
th_SeriesData,
48 MB_TAG_CREAT | MB_TAG_SPARSE | MB_TAG_BYTES | MB_TAG_VARLEN, NULL);
53 int &nb_steps)
const {
64 "you neet to set recording");
76 "recording already begin");
86 "recording not begin it can not be ended");
100 "all series data will be lost");
104 "all series data will be lost");
107 std::vector<EntityHandle> contained;
116 for (
unsigned int mm = 0; mm < contained.size(); mm++) {
128 (
const void **)&tag_data, &tag_size);
136 (
const void **)&tag_data, &tag_size);
137 int nb = tag_size /
sizeof(
ShortId);
138 uids.insert(
uids.end(), tag_data, &tag_data[nb]);
148 (
const void **)&tag_data, &tag_size);
150 data.insert(
data.end(), tag_data, &tag_data[nb]);
155 ia.push_back(
data.size());
171 std::vector<EntityHandle> contained;
173 unsigned int nb_contained = contained.size();
174 if (nb_contained <
ia.size() - 1) {
175 contained.resize(
ia.size());
177 for (
unsigned int mm =
ia.size() - 1; mm < nb_contained; mm++) {
179 CHKERR moab.delete_entities(&contained[mm], 1);
181 for (
unsigned int mm = nb_contained; mm <
ia.size() - 1; mm++) {
183 CHKERR moab.create_meshset(MESHSET_SET, new_meshset);
188 if (contained.size() !=
ia.size() - 1) {
190 "data inconsistency nb_contained != ia.size()-1 %d!=%d",
191 contained.size(),
ia.size() - 1);
195 for (
unsigned int ii = 1; ii <
ia.size(); ii++) {
201 for (
unsigned int ii = 1; ii <
ia.size(); ii++) {
202 void const *tag_data[] = {&
handles[
ia[ii - 1]]};
203 int tag_sizes[] = {(
ia[ii] -
ia[ii - 1])};
205 tag_data, tag_sizes);
208 for (
unsigned int ii = 1; ii <
ia.size(); ii++) {
209 void const *tag_data[] = {&
uids[
ia[ii - 1]]};
210 int tag_sizes[] = {(
ia[ii] -
ia[ii - 1]) * (
int)
sizeof(
ShortId)};
212 tag_data, tag_sizes);
216 for (
unsigned int ii = 1; ii <
ia.size(); ii++) {
217 void const *tag_data[] = {&
data[
ia[ii - 1]]};
218 int tag_sizes[] = {(
ia[ii] -
ia[ii - 1]) * (
int)
sizeof(
FieldData)};
228 const int _step_number)
230 step_number(_step_number) {
233 CHKERRABORT(PETSC_COMM_WORLD,
ierr);
240 std::vector<EntityHandle> contained;
242 if (contained.size() <= (
unsigned int)
step_number) {
249 1, (
const void **)&handles_ptr, &handles_size);
254 (
const void **)&uids_ptr, &uids_size);
257 if (handles_size != uids_size) {
264 (
const void **)&data_ptr, &data_size);
267 if (data_size != uids_size) {
271 typedef multi_index_container<
272 boost::shared_ptr<DofEntity>,
276 tag<Composite_Ent_and_ShortId_mi_tag>,
279 const_mem_fun<DofEntity, EntityHandle, &DofEntity::getEnt>,
284 DofEntity_multiIndex_short_uid_view;
286 DofEntity_multiIndex_short_uid_view short_uid_view;
287 short_uid_view.insert(dofsField.begin(), dofsField.end());
289 for (
int ii = 0; ii < uids_size; ii++) {
294 auto dit = short_uid_view.find(boost::make_tuple(ent, uid));
295 if (dit != short_uid_view.end()) {
296 (*dit)->getFieldData() = val;
299 "data inconsistency, getting data series, dof on ENTITY and "
300 "ShortId can't be found");
310 std::vector<EntityHandle> contained;
312 if (contained.size() <= (
unsigned int)
step_number) {
318 (
const void **)&time_ptr, &size);