54 "Impose a scalar function z=f(x,y) on a surface.");
59 "Tag identifying surface/composite to process.");
61 "Number of quadrature points to generate.");
63 "Expression to evaluate.");
73 string surf =
m_config[
"surf"].as<
string>();
76 vector<unsigned int> surfs;
78 sort(surfs.begin(), surfs.end());
83 cout <<
"ProcessScalar: extracting surface"
84 << (surfs.size() > 1 ?
"s" :
"") <<
" " << surf << endl;
87 const int nq =
m_config[
"nq"].as<
int>();
88 string expr =
m_config[
"scalar"].as<
string>();
94 vector<ElementSharedPtr> el =
m_mesh->m_element[
m_mesh->m_expDim-1];
97 for (i = 0; i < el.size(); ++i)
100 vector<int> inter, tags = el[i]->GetTagList();
102 sort(tags.begin(), tags.end());
103 set_intersection(surfs.begin(), surfs.end(),
104 tags .begin(), tags .end(),
105 back_inserter(inter));
108 if (inter.size() != 1)
117 for (j = 0; j < 4; ++j)
120 n->m_z = rEval.Evaluate(rExprId, n->m_x, n->m_y, 0.0, 0.0);
129 for (j = 0; j < f->m_edgeList.size(); ++j)
135 f->m_edgeList[j]->m_edgeNodes.clear();
137 for (k = 1; k < nq-1; ++k)
139 Node n = *n1 + disp * k / (nq-1.0);
140 n.
m_z = rEval.Evaluate(rExprId, n.
m_x, n.
m_y, 0.0, 0.0);
146 f->m_edgeList[j]->m_edgeNodes.push_back(