void PointSamplerBase::execute() { MeshTools::BoundingBox bbox = _mesh.getInflatedProcessorBoundingBox(); for (unsigned int i=0; i<_points.size(); i++) { Point & p = _points[i]; // Do a bounding box check so we're not doing unnecessary PointLocator lookups if (bbox.contains_point(p)) { std::vector<Real> & values = _values[i]; if (values.empty()) values.resize(_coupled_moose_vars.size()); // First find the element the hit lands in const Elem * elem = getLocalElemContainingPoint(p, i); if (elem) { // We have to pass a vector of points into reinitElemPhys _point_vec[0] = p; _subproblem.reinitElemPhys(elem, _point_vec, 0); // Zero is for tid for (unsigned int j=0; j<_coupled_moose_vars.size(); j++) values[j] = _coupled_moose_vars[j]->sln()[0]; // The zero is for the "qp" _found_points[i] = true; } } } }
void PointSamplerBase::execute() { for (unsigned int i=0; i<_points.size(); i++) { Point & p = _points[i]; // First find the element the hit lands in const Elem * elem = getLocalElemContainingPoint(p, i); // We have to pass a vector of points into reinitElemPhys _point_vec[0] = p; if (elem) { _subproblem.reinitElemPhys(elem, _point_vec, 0); // Zero is for tid for (unsigned int j=0; j<_coupled_moose_vars.size(); j++) _values[j] = _coupled_moose_vars[j]->sln()[0]; // The zero is for the "qp" SamplerBase::addSample(p, _ids[i], _values); } } }