Skip to content
Snippets Groups Projects
explicit-laplace-grid-3d_impl.h.in 1.1 KiB
Newer Older
  • Learn to ignore specific revisions
  •    const RealType& hxSquareInverse = entity.getMesh().template getSpaceStepsProducts< -2,  0,  0 >(); 
       const RealType& hySquareInverse = entity.getMesh().template getSpaceStepsProducts<  0, -2,  0 >(); 
       const RealType& hzSquareInverse = entity.getMesh().template getSpaceStepsProducts<  0,  0, -2 >(); 
       const IndexType& center = entity.getIndex(); 
    
       const IndexType& east  = neighborEntities.template getEntityIndex<  1,  0,  0 >(); 
       const IndexType& west  = neighborEntities.template getEntityIndex< -1,  0,  0 >(); 
       const IndexType& north = neighborEntities.template getEntityIndex<  0,  1,  0 >(); 
       const IndexType& south = neighborEntities.template getEntityIndex<  0, -1,  0 >();         
       const IndexType& up    = neighborEntities.template getEntityIndex<  0,  0,  1 >(); 
       const IndexType& down  = neighborEntities.template getEntityIndex<  0,  0, -1 >();         
    
       return ( u[ west ] - 2.0 * u[ center ] + u[ east ]  ) * hxSquareInverse +
              ( u[ south ] - 2.0 * u[ center ] + u[ north ] ) * hySquareInverse +
              ( u[ up ] - 2.0 * u[ center ] + u[ down ] ) * hzSquareInverse;