/usr/include/dune/pdelab/constraints/p0ghost.hh is in libdune-pdelab-dev 2.0.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | // -*- tab-width: 4; indent-tabs-mode: nil -*-
#ifndef DUNE_PDELAB_P0GHOSTCONSTRAINTS_HH
#define DUNE_PDELAB_P0GHOSTCONSTRAINTS_HH
#include "../common/geometrywrapper.hh"
#include<dune/grid/common/gridenums.hh>
namespace Dune {
namespace PDELab {
//! \addtogroup Constraints
//! \ingroup FiniteElementMap
//! \{
//! Parallel P0 constraints for nonoverlapping grids with ghosts
class P0ParallelGhostConstraints
{
public:
enum{doBoundary=false};
enum{doProcessor=false};
enum{doSkeleton=false};
enum{doVolume=true};
//! volume constraints
/**
* \tparam EG element geometry
* \tparam LFS local function space
* \tparam T TransformationType
*/
template<typename EG, typename LFS, typename T>
void volume (const EG& eg, const LFS& lfs, T& trafo) const
{
// nothing to do for interior entities
if (eg.entity().partitionType()==Dune::InteriorEntity)
return;
// constrain ghost entities
else if (eg.entity().partitionType()==Dune::GhostEntity){
typename T::RowType empty;
typedef typename LFS::Traits::SizeType size_type;
for (size_type i=0; i<lfs.size(); i++){
trafo[lfs.dofIndex(i)] = empty;
}
}
}
};
//! \}
}
}
#endif
|