src/Boundary/SphericalBoundary.cc
//------------------------------------------------------------------------------
// Update the nodes in violation of the boundary condition, mapping their
// positions and H tensors.
//------------------------------------------------------------------------------
Update the nodes in violation of the boundary condition, mapping their
positions and H tensors.
Update the nodes in violation of the boundary condition mapping their positions and H tensors .
void
SphericalBoundary::
updateViolationNodes(NodeList<Dim<3> >& nodeList) {
  const vector<int>& vNodes = violationNodes(nodeList);
  Field<Dim<3>, Vector>& positions = nodeList.positions();
  for (vector<int>::const_iterator itr = vNodes.begin();
       itr != vNodes.end();
       ++itr) {
    const double ri = positions(*itr).magnitude();
    positions(*itr) = Vector(ri, 0.0, 0.0);
  }
  Field<Dim<3> , SymTensor>& Hfield = nodeList.Hfield();
  this->enforceBoundary(Hfield);
}
void SphericalBoundary :: updateViolationNodes ( NodeList < Dim < 3 > > & nodeList ) { const vector < int > & vNodes = violationNodes ( nodeList ) ; Field < Dim < 3 > , Vector > & positions = nodeList . positions ( ) ; for ( vector < int > :: const_iterator itr = vNodes . begin ( ) ; itr != vNodes . end ( ) ; ++ itr ) { const double ri = positions ( * itr ) . magnitude ( ) ; positions ( * itr ) = Vector ( ri , 0.0 , 0.0 ) ; } Field < Dim < 3 > , SymTensor > & Hfield = nodeList . Hfield ( ) ; this -> enforceBoundary ( Hfield ) ; }
Update the nodes in violation of the boundary condition, mapping their
positions and H tensors.
Update the nodes in violation of the boundary condition mapping their positions and H tensors .
// Get the set of violation nodes for this NodeList. // Loop over these nodes, and reset their positions to valid values. // Set the Hfield. //   // Update the neighbor information. //   nodeList.neighbor().updateNodes(); //(vNodes);