src/Boundary/AxisBoundaryRZ.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
AxisBoundaryRZ::updateViolationNodes(NodeList<Dim<2> >& nodeList) {
  GeomPlane<Dim<2> > plane(Vector(0.0, mEtaMin), Vector(0.0, 1.0));
  const vector<int>& vNodes = this->violationNodes(nodeList);
  const Vector runit(0.0, 1.0);
  Field<Dimension, Vector>& positions = nodeList.positions();
  Field<Dimension, SymTensor>& H = nodeList.Hfield();
  for (vector<int>::const_iterator itr = vNodes.begin();
       itr < vNodes.end();
       ++itr) {
    Vector& posi = positions(*itr);
    const double Hri = (H(*itr)*runit).y();
    double etari = Hri*posi.y();
    CHECK(etari <= mEtaMin);
    etari = 2.0*mEtaMin - etari;
    CHECK(etari >= mEtaMin);
    posi.y(etari/Hri);
  }
  Field<Dimension, SymTensor>& Hfield = nodeList.Hfield();
  this->enforceBoundary(Hfield);
}
void AxisBoundaryRZ :: updateViolationNodes ( NodeList < Dim < 2 > > & nodeList ) { GeomPlane < Dim < 2 > > plane ( Vector ( 0.0 , mEtaMin ) , Vector ( 0.0 , 1.0 ) ) ; const vector < int > & vNodes = this -> violationNodes ( nodeList ) ; const Vector runit ( 0.0 , 1.0 ) ; Field < Dimension , Vector > & positions = nodeList . positions ( ) ; Field < Dimension , SymTensor > & H = nodeList . Hfield ( ) ; for ( vector < int > :: const_iterator itr = vNodes . begin ( ) ; itr < vNodes . end ( ) ; ++ itr ) { Vector & posi = positions ( * itr ) ; const double Hri = ( H ( * itr ) * runit ) . y ( ) ; double etari = Hri * posi . y ( ) ; CHECK ( etari <= mEtaMin ) ; etari = 2.0 * mEtaMin - etari ; CHECK ( etari >= mEtaMin ) ; posi . y ( etari / Hri ) ; } Field < Dimension , 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 .
// The effective plane we're reflecting from in eta space. // 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);