11 #ifndef __SAVEVERTEXDOFONTAG_HPP__
12 #define __SAVEVERTEXDOFONTAG_HPP__
15 using namespace MoFEM;
26 : mField(m_field), tagName(tag_name) {}
34 "Null pointer, probably field not found");
36 if (fieldPtr->getSpace() !=
H1) {
38 "Field must be in H1 space");
40 std::vector<double> def_vals(fieldPtr->getNbOfCoeffs(), 0);
41 rval = mField.
get_moab().tag_get_handle(tagName.c_str(), tH);
42 if (
rval != MB_SUCCESS) {
44 tagName.c_str(), fieldPtr->getNbOfCoeffs(), MB_TYPE_DOUBLE, tH,
45 MB_TAG_CREAT | MB_TAG_SPARSE, &def_vals[0]);
58 if (dofPtr->getEntType() != MBVERTEX)
61 int rank = dofPtr->getNbOfCoeffs();
65 tag_val[dofPtr->getDofCoeffIdx()] = dofPtr->getFieldData();
73 #endif // __SAVEVERTEXDOFONTAG_HPP__