src/Boundary/CylindricalBoundary.cc
// Specialization for Tensor fields, force all off-diagonal components
// to zero.
Specialization for Tensor fields, force all off-diagonal components
to zero.
Specialization for Tensor fields force all off - diagonal components to zero .
void
CylindricalBoundary::
enforceBoundary(Field<Dim<3>, Dim<3>::Tensor>& field) const {
  const NodeList<Dimension>& nodeList = field.nodeList();
  for (vector<int>::const_iterator itr = violationBegin(nodeList);
       itr != violationEnd(nodeList);
       ++itr) {
    CHECK(*itr >= 0 && *itr < (int)nodeList.numInternalNodes());
    const double xx = field(*itr).xx();
    const double yy = field(*itr).yy();
    const double zz = field(*itr).zz();
    field(*itr) = Tensor(xx, 0.0, 0.0,
                         0.0, yy, 0.0,
                         0.0, 0.0, zz);
  }
}
void CylindricalBoundary :: enforceBoundary ( Field < Dim < 3 > , Dim < 3 > :: Tensor > & field ) const { const NodeList < Dimension > & nodeList = field . nodeList ( ) ; for ( vector < int > :: const_iterator itr = violationBegin ( nodeList ) ; itr != violationEnd ( nodeList ) ; ++ itr ) { CHECK ( * itr >= 0 && * itr < ( int ) nodeList . numInternalNodes ( ) ) ; const double xx = field ( * itr ) . xx ( ) ; const double yy = field ( * itr ) . yy ( ) ; const double zz = field ( * itr ) . zz ( ) ; field ( * itr ) = Tensor ( xx , 0.0 , 0.0 , 0.0 , yy , 0.0 , 0.0 , 0.0 , zz ) ; } }
Specialization for Tensor fields, force all off-diagonal components
to zero.
Specialization for Tensor fields force all off - diagonal components to zero .