149 med_idt fid = MEDfileOpen(file.c_str(), MED_ACC_RDONLY);
152 "Unable to open file '%s'", file.c_str());
156 MEDlibraryNumVersion(&
v[0], &
v[1], &
v[2]);
157 MEDfileNumVersionRd(fid, &vf[0], &vf[1], &vf[2]);
161 "Reading MED file V%d.%d.%d using MED library V%d.%d.%d", vf[0],
162 vf[1], vf[2],
v[0],
v[1],
v[2]);
164 if (vf[0] < 2 || (vf[0] == 2 && vf[1] < 2)) {
166 "Cannot read MED file older than V2.2");
169 for (
int i = 0;
i < MEDnMesh(fid);
i++) {
170 char mesh_name[MED_NAME_SIZE + 1], mesh_desc[MED_COMMENT_SIZE + 1];
171 bzero(mesh_name, MED_NAME_SIZE);
172 bzero(mesh_desc, MED_COMMENT_SIZE);
174 med_mesh_type mesh_type;
175 med_int mesh_dim, n_step;
176 char dt_unit[MED_SNAME_SIZE + 1];
177 char axis_name[3 * MED_SNAME_SIZE + 1], axis_unit[3 * MED_SNAME_SIZE + 1];
178 med_sorting_type sorting_type;
179 med_axis_type axis_type;
180 if (MEDmeshInfo(fid,
i + 1, mesh_name, &space_dim, &mesh_dim, &mesh_type,
181 mesh_desc, dt_unit, &sorting_type, &n_step, &axis_type,
182 axis_name, axis_unit) < 0) {
184 "Unable to read mesh information");
186 meshNames.push_back(std::string(mesh_name));
188 MOFEM_LOG_C(
"MEDWORLD", Sev::inform,
"Check mesh %s nsteps %d", mesh_name,
193 std::map<int, Range> family_elem_map;
194 std::map<string, Range> group_elem_map;
196 for (
unsigned int ii = 0; ii !=
meshNames.size(); ii++) {
202 if (MEDfileClose(fid) < 0) {
204 "Unable to close file '%s'", file.c_str());
252 std::map<int, Range> &family_elem_map,
258 med_idt fid = MEDfileOpen(file.c_str(), MED_ACC_RDONLY);
261 "Unable to open file '%s'", file.c_str());
264 MEDlibraryNumVersion(&
v[0], &
v[1], &
v[2]);
265 MEDfileNumVersionRd(fid, &vf[0], &vf[1], &vf[2]);
268 "Reading MED file V%d.%d.%d using MED library V%d.%d.%d", vf[0],
269 vf[1], vf[2],
v[0],
v[1],
v[2]);
271 if (vf[0] < 2 || (vf[0] == 2 && vf[1] < 2)) {
273 "Cannot read MED file older than V2.2");
276 char mesh_name[MED_NAME_SIZE + 1], mesh_desc[MED_COMMENT_SIZE + 1];
277 bzero(mesh_name, MED_NAME_SIZE + 1);
278 bzero(mesh_desc, MED_COMMENT_SIZE + 1);
280 med_mesh_type mesh_type;
281 med_int mesh_dim, n_step;
282 char dt_unit[MED_SNAME_SIZE + 1];
283 char axis_name[3 * MED_SNAME_SIZE + 1], axis_unit[3 * MED_SNAME_SIZE + 1];
284 med_sorting_type sorting_type;
285 med_axis_type axis_type;
286 if (MEDmeshInfo(fid, index + 1, mesh_name, &space_dim, &mesh_dim, &mesh_type,
287 mesh_desc, dt_unit, &sorting_type, &n_step, &axis_type,
288 axis_name, axis_unit) < 0) {
290 "Unable to read mesh information");
293 MOFEM_LOG_C(
"MEDWORLD", Sev::inform,
"Reading mesh %s nsteps %d", mesh_name,
300 case MED_CYLINDRICAL:
303 "Curvilinear coordinate system implemented");
307 "Not implemented for space dim %d", space_dim);
316 max_id = (max_id < cit->getMeshsetId()) ? cit->getMeshsetId() : max_id;
320 std::string(mesh_name));
321 CubitMeshSet_multiIndex::index<
328 mesh_meshset = cit->getMeshset();
332 med_bool change_of_coord, geo_transform;
333 med_int num_nodes = MEDmeshnEntity(
334 fid, mesh_name, MED_NO_DT, MED_NO_IT, MED_NODE, MED_NO_GEOTYPE,
335 MED_COORDINATE, MED_NO_CMODE, &change_of_coord, &geo_transform);
338 "Could not read number of MED nodes");
340 if (num_nodes == 0) {
342 "No nodes in MED mesh");
345 MOFEM_LOG_C(
"MEDWORLD", Sev::inform,
"Read number of nodes %d", num_nodes);
347 std::vector<med_float> coord_med(space_dim * num_nodes);
348 if (MEDmeshNodeCoordinateRd(fid, mesh_name, MED_NO_DT, MED_NO_IT,
349 MED_NO_INTERLACE, &coord_med[0]) < 0) {
351 "Could not read MED node coordinates");
355 ReadUtilIface *iface;
356 vector<double *> arrays_coord;
359 CHKERR iface->get_node_coords(3, num_nodes, 0, startv, arrays_coord);
360 Range verts(startv, startv + num_nodes - 1);
361 std::copy(&coord_med[0 * num_nodes], &coord_med[1 * num_nodes],
363 std::copy(&coord_med[1 * num_nodes], &coord_med[2 * num_nodes],
365 if (space_dim == 2) {
366 std::fill(arrays_coord[2], &arrays_coord[2][num_nodes], 0.);
368 std::copy(&coord_med[2 * num_nodes], &coord_med[3 * num_nodes],
372 family_elem_map.clear();
376 std::vector<med_int> nodes_tags(num_nodes, 0);
377 if (MEDmeshEntityFamilyNumberRd(fid, mesh_name, MED_NO_DT, MED_NO_IT,
378 MED_NODE, MED_NO_GEOTYPE,
379 &nodes_tags[0]) < 0) {
382 for (
int i = 0;
i < num_nodes;
i++) {
383 family_elem_map[nodes_tags.empty() ?
i : nodes_tags[
i]].insert(verts[
i]);
388 for (EntityType ent_type = MBVERTEX; ent_type < MBMAXTYPE; ent_type++) {
392 for (
auto type : types) {
395 med_bool change_of_coord;
396 med_bool geo_transform;
397 med_int num_ele = MEDmeshnEntity(
398 fid, mesh_name, MED_NO_DT, MED_NO_IT, MED_CELL, type,
399 MED_CONNECTIVITY, MED_NODAL, &change_of_coord, &geo_transform);
405 int num_nod_per_ele = type % 100;
408 <<
"Reading elements " << num_ele <<
" of type "
409 << moab::CN::EntityTypeName(ent_type) <<
" number of nodes "
412 std::vector<med_int> conn_med(num_ele * num_nod_per_ele);
413 if (MEDmeshElementConnectivityRd(fid, mesh_name, MED_NO_DT, MED_NO_IT,
414 MED_CELL, type, MED_NODAL,
415 MED_FULL_INTERLACE, &conn_med[0]) < 0) {
417 "Could not read MED elements");
422 if (ent_type != MBVERTEX) {
425 CHKERR iface->get_element_connect(num_ele, num_nod_per_ele, ent_type, 0,
431 for (
int ee = 0; ee != num_ele; ee++) {
432 std::vector<EntityHandle>
n(num_nod_per_ele);
433 for (
int nn = 0; nn != num_nod_per_ele; nn++) {
434 n[nn] = verts[conn_med[ii + nn] - 1];
437 std::array<int, 10> nodes_map{
446 for (
int nn = 0; nn != num_nod_per_ele; nn++, ii++) {
447 conn_moab[ii] =
n[nodes_map[nn]];
453 for (
int ee = 0; ee != num_ele; ee++) {
454 for (
int nn = 0; nn != num_nod_per_ele; nn++, ii++) {
455 conn_moab[ii] = verts[conn_med[ii] - 1];
460 CHKERR iface->update_adjacencies(starte, num_ele, num_nod_per_ele,
462 ents =
Range(starte, starte + num_ele - 1);
466 std::vector<EntityHandle> conn_moab(num_ele * num_nod_per_ele);
467 for (
int ee = 0; ee != num_ele; ++ee)
468 for (
int nn = 0; nn != num_nod_per_ele; ++nn, ++ii)
469 conn_moab[ii] = verts[conn_med[ii] - 1];
470 ents.insert_list(conn_moab.begin(), conn_moab.end());
478 std::vector<med_int> fam(num_ele, 0);
479 if (MEDmeshEntityFamilyNumberRd(fid, mesh_name, MED_NO_DT, MED_NO_IT,
480 MED_CELL, type, &fam[0]) < 0) {
482 "No family number for elements: using 0 as default family "
485 for (
int j = 0;
j < num_ele;
j++) {
486 family_elem_map[fam[
j]].insert(ents[
j]);
492 if (MEDfileClose(fid) < 0) {
494 "Unable to close file '%s'", file.c_str());
502 const std::map<int, Range> &family_elem_map,
503 std::map<string, Range> &group_elem_map,
int verb) {
507 med_idt fid = MEDfileOpen(file.c_str(), MED_ACC_RDONLY);
510 "Unable to open file '%s'", file.c_str());
513 MEDlibraryNumVersion(&
v[0], &
v[1], &
v[2]);
514 MEDfileNumVersionRd(fid, &vf[0], &vf[1], &vf[2]);
518 "Reading MED file V%d.%d.%d using MED library V%d.%d.%d", vf[0],
519 vf[1], vf[2],
v[0],
v[1],
v[2]);
521 if (vf[0] < 2 || (vf[0] == 2 && vf[1] < 2)) {
523 "Cannot read MED file older than V2.2");
527 group_elem_map.clear();
529 med_int num_families = MEDnFamily(fid,
meshNames[index].c_str());
530 if (num_families < 0) {
532 "Could not read MED families");
534 for (
int i = 0;
i < num_families;
i++) {
537 ? MEDnFamily23Attribute(fid,
meshNames[index].c_str(),
i + 1)
539 med_int num_groups = MEDnFamilyGroup(fid,
meshNames[index].c_str(),
i + 1);
540 if (num_attrib < 0 || num_groups < 0) {
542 "Could not read MED groups or attributes");
545 std::vector<med_int> attribId(num_attrib + 1);
546 std::vector<med_int> attrib_val(num_attrib + 1);
547 std::vector<char> attrib_des(MED_COMMENT_SIZE * num_attrib + 1);
548 std::vector<char> group_names(MED_LNAME_SIZE * num_groups + 1);
549 char family_name[MED_NAME_SIZE + 1];
553 if (MEDfamily23Info(fid,
meshNames[index].c_str(),
i + 1, family_name,
554 &attribId[0], &attrib_val[0], &attrib_des[0],
555 &family_num, &group_names[0]) < 0) {
557 "Could not read info for MED2 family %d",
i + 1);
560 if (MEDfamilyInfo(fid,
meshNames[index].c_str(),
i + 1, family_name,
561 &family_num, &group_names[0]) < 0) {
563 "Could not read info for MED3 family %d",
i + 1);
567 for (
int g = 0;
g != num_groups;
g++) {
569 std::string(&group_names[MED_LNAME_SIZE *
g], MED_LNAME_SIZE - 1);
570 name.resize(NAME_TAG_SIZE - 1);
571 if (family_elem_map.find(family_num) == family_elem_map.end()) {
573 "MEDWORLD", Sev::warning,
574 "Family %d not read, likely type of element is not added "
575 "to moab database. Currently only triangle, quad, tetrahedral and "
576 "hexahedral elements are read to moab database",
579 group_elem_map[name].merge(family_elem_map.at(family_num));
584 if (MEDfileClose(fid) < 0) {
586 "Unable to close file '%s'", file.c_str());
678 boost::shared_ptr<std::vector<const CubitMeshSets *>> meshsets_ptr,
679 boost::shared_ptr<Range> write_range_ptr,
int verb) {
682 moab::Interface &moab = m_field.
get_moab();
686 <<
"WRITE_MED IS EXPERIMENTAL, MAY CONTAIN BUGS, ALWAYS CHECK THE OUTPUT "
690 MEDfileVersionOpen((
char *)file.c_str(), MED_ACC_CREAT, MED_MAJOR_NUM,
691 MED_MINOR_NUM, MED_RELEASE_NUM);
695 "Cannot create MED file");
700 CHKERR MEDfichDesEcr(fid, (
char *)
"MED file generated by MoFEM");
703 char dtUnit[MED_SNAME_SIZE + 1] =
"";
704 char axisName[3 * MED_SNAME_SIZE + 1] =
"";
705 char axisUnit[3 * MED_SNAME_SIZE + 1] =
"";
707 PetscBool is_cubit_meshset = PETSC_TRUE;
708 int med_mesh_name_id = 0;
711 char mesh_name_char[255];
712 std::string mesh_name =
"Mesh";
715 PetscOptionsBegin(PETSC_COMM_WORLD,
"",
"MED mesh options",
"");
716 CHKERR PetscOptionsString(
"-med_mesh_name",
"get med mesh name",
"",
717 mesh_name.c_str(), mesh_name_char, 255, PETSC_NULLPTR);
720 mesh_name = mesh_name_char;
723 for (
auto &
m : *meshsets_ptr) {
724 if (
m->getName() == mesh_name) {
725 med_mesh_name_id =
m->getMeshsetId();
726 is_cubit_meshset = PETSC_FALSE;
733 for (
auto &
m : *meshsets_ptr) {
734 if (
m->getMeshsetId() == med_mesh_name_id)
735 mesh_name =
m->getName();
736 max_id = (max_id <
m->getMeshsetId()) ?
m->getMeshsetId() : max_id;
740 CHKERR MEDmeshCr(fid, mesh_name.c_str(), 3, 3, MED_UNSTRUCTURED_MESH,
741 "Mesh created", dtUnit, MED_SORT_DTIT, MED_CARTESIAN,
745 med_int family_id = 0;
746 std::map<std::vector<std::string>, std::tuple<med_int, std::vector<int>>>
748 std::map<EntityHandle, med_int> entityHandle_family_map;
751 shared_meshsets_map[std::vector<string>()] =
752 std::make_tuple(family_id, std::vector<int>());
756 std::string bc_type_name;
757 if (iit->getBcTypeULong() &
BLOCKSET) {
759 bc_type_name = iit->getName();
760 if (bc_type_name ==
"NoNameSet") {
761 bc_type_name =
"BLOCKSET_";
762 bc_type_name += std::to_string(iit->getMeshsetId());
765 }
else if (iit->getBcTypeULong() &
SIDESET ||
766 iit->getBcTypeULong() &
NODESET) {
773 if ((iit->getBcType() & jj_bc_type).any()) {
775 std::string temp_bc_type_name = string(
CubitBCNames[jj + 1]);
776 if (temp_bc_type_name.length() > 10) {
777 temp_bc_type_name = temp_bc_type_name.substr(0, 4);
779 bc_type_name += temp_bc_type_name;
784 bc_type_name += std::to_string(iit->getMeshsetId());
786 bc_type_name =
"UnknownSet";
796 for (
auto &entity : *write_range_ptr) {
798 std::vector<int> shared_meshsets;
799 std::vector<string> shared_names;
802 auto add_shared_meshset = [&](
auto &other_meshset) {
803 std::string other_name = get_set_name(other_meshset);
804 if (std::find(shared_names.begin(), shared_names.end(), other_name) ==
805 shared_names.end()) {
806 shared_meshsets.push_back(other_meshset->getMeshsetId());
807 shared_names.push_back(other_name);
812 for (
auto &other_meshset : *meshsets_ptr) {
814 if (med_mesh_name_id == other_meshset->getMeshsetId())
817 Range other_entities;
819 moab.get_entities_by_handle(other_set, other_entities);
820 if (other_entities.empty())
823 bool is_in_meshset = moab.contains_entities(other_set, &entity, 1);
826 add_shared_meshset(other_meshset);
831 auto it = shared_meshsets_map.find(shared_names);
832 if (it == shared_meshsets_map.end()) {
836 it = shared_meshsets_map
838 {shared_names, std::make_tuple(family_id, shared_meshsets)})
842 entityHandle_family_map[entity] = std::get<0>(it->second);
846 for (
const auto &it : shared_meshsets_map) {
848 std::string family_name =
"F_";
849 const auto &[family_id, shared_meshsets] = it.second;
850 family_name += std::to_string(family_id);
852 const auto &shared_meshset_names = it.first;
853 std::string group_name;
854 for (
const auto &name : shared_meshset_names) {
856 std::string meshset_name = name;
857 meshset_name.resize(MED_LNAME_SIZE,
' ');
858 group_name += meshset_name;
862 CHKERR MEDfamilyCr(fid, mesh_name.c_str(), family_name.c_str(), family_id,
863 shared_meshset_names.size(), group_name.c_str());
866 <<
"Creating family " << family_name <<
" with id " << family_id
867 <<
" and " << shared_meshset_names.size() <<
" groups " << std::endl;
872 verts = write_range_ptr->subset_by_type(MBVERTEX);
875 std::vector<med_float> coord_med(3 * verts.size());
876 std::vector<med_int> fam;
877 std::vector<med_int> tags;
878 std::map<EntityHandle, med_int> entityHandle_tag_map;
879 med_int med_node_num = 1;
882 for (Range::iterator it = verts.begin(); it != verts.end(); ++it) {
884 moab.get_coords(&(*it), 1, coords);
885 coord_med[3 * (it - verts.begin())] = coords[0];
886 coord_med[3 * (it - verts.begin()) + 1] = coords[1];
887 coord_med[3 * (it - verts.begin()) + 2] = coords[2];
888 fam.push_back(entityHandle_family_map[*it]);
891 entityHandle_tag_map[*it] = med_node_num;
895 CHKERR MEDmeshNodeWr(fid, mesh_name.c_str(), MED_NO_DT, MED_NO_IT,
896 MED_UNDEF_DT, MED_FULL_INTERLACE, verts.size(),
897 &coord_med[0], MED_FALSE,
"", MED_TRUE, &tags[0],
901 double last_tag = tags.back();
903 for (EntityType ent_type = MBVERTEX; ent_type < MBMAXTYPE; ent_type++) {
906 moab.get_entities_by_type(0, ent_type, entities,
true);
908 ents_to_write = intersect(entities, *write_range_ptr);
910 if (ents_to_write.empty())
914 std::vector<med_int> tag_number;
915 std::vector<med_int> family_number;
916 std::vector<med_int> connectivity;
919 for (
auto &entity : ents_to_write) {
920 if (ent_type != MBVERTEX) {
923 family_number.push_back(entityHandle_family_map[entity]);
925 tag_number.push_back(last_tag);
927 std::vector<EntityHandle> conn;
928 moab.get_connectivity(&entity, 1, conn);
930 for (
auto &
c : conn) {
931 connectivity.push_back(entityHandle_tag_map[
c]);
938 auto get_med_element_type = [](EntityType ent_type) {
939 med_geometrie_element type;
966 med_geometrie_element med_type = get_med_element_type(ent_type);
967 if (ent_type == MBENTITYSET) {
970 CHKERR MEDmeshElementWr(fid, mesh_name.c_str(), MED_NO_DT, MED_NO_IT, 0.,
971 MED_CELL, med_type, MED_NODAL, MED_FULL_INTERLACE,
972 family_number.size(), &connectivity[0], MED_FALSE,
973 nullptr, MED_TRUE, &tag_number[0], MED_TRUE,
976 MOFEM_LOG_C(
"MEDWORLD", Sev::inform,
"Writing %i elements of type %i (%s) ",
977 family_number.size(), med_type,
978 moab::CN::EntityTypeName(ent_type));
988 const bool load_series,
989 const int only_step,
int verb) {
993 med_idt fid = MEDfileOpen((
char *)file_name.c_str(), MED_LECTURE);
996 "Unable to open file '%s'", file_name.c_str());
999 med_int num_comp = MEDfieldnComponentByName(fid,
field_name.c_str());
1000 if (num_comp <= 0) {
1002 "Could not get number of components for MED field");
1005 char meshName[MED_NAME_SIZE + 1];
1006 char dtUnit[MED_SNAME_SIZE + 1];
1007 std::vector<char> compName(num_comp * MED_SNAME_SIZE + 1);
1008 std::vector<char> compUnit(num_comp * MED_SNAME_SIZE + 1);
1009 med_int numSteps = 0;
1010 med_type_champ type;
1012 if (MEDfieldInfoByName(fid,
field_name.c_str(), meshName, &localMesh, &type,
1013 &compName[0], &compUnit[0], dtUnit, &numSteps) < 0) {
1015 "Could not get MED field info");
1028 int num_comp_msh = (num_comp <= 1) ? 1
1029 : (num_comp <= 3) ? 3
1030 : (num_comp <= 9) ? 9
1038 std::vector<double> def_val(num_comp_msh, 0);
1040 tag_name.c_str(), num_comp_msh, MB_TYPE_DOUBLE,
th,
1041 MB_TAG_CREAT | MB_TAG_SPARSE, &def_val[0]);
1048 const med_entity_type entType[] = {MED_NODE, MED_CELL, MED_NODE_ELEMENT};
1049 const med_geometrie_element eleType[] = {
1050 MED_NONE, MED_SEG2, MED_TRIA3, MED_QUAD4, MED_TETRA4, MED_HEXA8,
1051 MED_PENTA6, MED_PYRA5, MED_SEG3, MED_TRIA6, MED_QUAD9, MED_TETRA10,
1052 MED_HEXA27, MED_POINT1, MED_QUAD8, MED_HEXA20, MED_PENTA15, MED_PYRA13};
1056 std::vector<std::pair<int, int>> pairs;
1057 for (
unsigned int i = 0;
i <
sizeof(entType) /
sizeof(entType[0]);
i++) {
1058 for (
unsigned int j = 0;
j <
sizeof(eleType) /
sizeof(eleType[0]);
j++) {
1059 if ((!
i && !
j) ||
j) {
1060 med_int
n = numSteps;
1062 pairs.push_back(std::pair<int, int>(
i,
j));
1063 numSteps = std::max(numSteps,
n);
1071 if (numSteps < 1 || pairs.empty()) {
1073 "Nothing to import from MED file");
1080 for (
int step = (only_step == -1) ? 0 : only_step; step < numSteps; step++) {
1082 if (!load_series && only_step != step)
1090 for (
unsigned int pair = 0; pair < pairs.size(); pair++) {
1093 med_entite_maillage ent = entType[pairs[pair].first];
1094 med_geometrie_element ele = eleType[pairs[pair].second];
1095 med_int numdt, numit, ngauss;
1097 if (MEDfieldComputingStepInfo(fid,
field_name.c_str(), step + 1, &numdt,
1100 "Could not read step info");
1103 char locName[MED_NAME_SIZE + 1], profileName[MED_NAME_SIZE + 1];
1108 med_int profileSize;
1109 med_int numVal = MEDfieldnValueWithProfile(
1110 fid,
field_name.c_str(), numdt, numit, ent, ele, 1,
1111 MED_COMPACT_STMODE, profileName, &profileSize, locName, &ngauss);
1118 std::vector<double> val(numVal * num_comp);
1119 if (MEDfieldValueWithProfileRd(fid,
field_name.c_str(), numdt, numit, ent,
1120 ele, MED_COMPACT_STMODE, profileName,
1121 MED_FULL_INTERLACE, MED_ALL_CONSTITUENT,
1122 (
unsigned char *)&val[0]) < 0) {
1124 "Could not read field values");
1129 EntityType ent_type = MBMAXTYPE;
1140 "Not yet implemented for this cell %d", ele);
1142 if (ent_type != MBMAXTYPE) {
1145 CHKERR m_field.
get_moab().get_entities_by_type(meshset, ent_type,
1147 double e_vals[num_comp_msh];
1148 bzero(e_vals,
sizeof(
double) * num_comp_msh);
1149 std::vector<double>::iterator vit = val.begin();
1150 for (Range::iterator eit = ents.begin(); eit != ents.end(); eit++) {
1151 for (
int ii = 0; ii != num_comp; ii++, vit++) {
1158 CHKERR m_field.
get_moab().get_entities_by_type(meshset, ent_type,
1160 if (ents.size() * ngauss * num_comp != val.size()) {
1162 "data inconsistency");
1165 double e_vals[num_comp_msh];
1166 std::vector<double>::iterator vit = val.begin();
1167 for (Range::iterator eit = ents.begin(); eit != ents.end(); eit++) {
1168 bzero(e_vals,
sizeof(
double) * num_comp_msh);
1169 for (
int gg = 0; gg != ngauss; gg++) {
1170 for (
int ii = 0; ii != num_comp; ii++, vit++) {
1171 e_vals[ii] += *vit / ngauss;
1180 case MED_NODE_ELEMENT: {
1181 EntityType ent_type = MBVERTEX;
1183 CHKERR m_field.
get_moab().get_entities_by_type(meshset, ent_type, ents,
1185 double e_vals[num_comp_msh];
1186 bzero(e_vals,
sizeof(
double) * num_comp_msh);
1187 std::vector<double>::iterator vit = val.begin();
1188 for (Range::iterator eit = ents.begin(); eit != ents.end(); eit++) {
1189 for (
int ii = 0; ii != num_comp; ii++, vit++) {
1196 MOFEM_LOG_C(
"MEDWORLD", Sev::inform,
"Entity type %d not implemented",