dune-grid
2.1.1
|
Class for constructing grids from DGF files. More...
#include <dune/grid/io/file/dgfparser/dgfparser.hh>
Classes | |
struct | DataHandle |
Public Types | |
typedef MPIHelper::MPICommunicator | MPICommunicatorType |
Public Member Functions | |
GridPtr (const std::string &filename, MPICommunicatorType comm=MPIHelper::getCommunicator()) | |
constructor given the name of a DGF file | |
GridPtr (std::istream &input, MPICommunicatorType comm=MPIHelper::getCommunicator()) | |
constructor given a std::istream | |
GridPtr () | |
Default constructor, creating empty GridPtr. | |
GridPtr (GridType *grd) | |
Constructor storing given pointer to internal auto pointer. | |
GridPtr (const GridPtr &org) | |
Copy constructor, copies internal auto pointer. | |
GridPtr & | operator= (const GridPtr &org) |
assignment of grid pointer | |
GridPtr & | operator= (GridType *grd) |
assignment of pointer to internal auto pointer | |
GridType & | operator* () |
return reference to GridType instance | |
GridType * | operator-> () |
return pointer to GridType instance | |
const GridType & | operator* () const |
return const reference to GridType instance | |
const GridType * | operator-> () const |
return const pointer to GridType instance | |
GridType * | release () |
release pointer from internal ownership | |
int | nofParameters (int cdim) const |
get number of parameters defined for a given codimension | |
template<class Entity > | |
const std::vector< double > & | parameters (const Entity &entity) const |
get parameters defined for each codim 0 und dim entity on the grid through the grid file | |
void | loadBalance () |
Static Public Attributes | |
static const int | dimension = GridType::dimension |
Protected Member Functions | |
void | initialize (DGFGridFactory< GridType > &dgfFactory) |
template<class Entity > | |
std::vector< double > & | params (const Entity &entity) |
void | setNofParams (int cdim, int nofP) |
Protected Attributes | |
std::auto_ptr< GridType > | gridPtr_ |
std::vector< std::vector < double > > | elParam_ |
std::vector< std::vector < double > > | vtxParam_ |
std::vector< int > | bndId_ |
int | nofElParam_ |
int | nofVtxParam_ |
std::vector< double > | emptyParam_ |
Class for constructing grids from DGF files.
The constructor of the class is given the filename of the DGF file. From that file a pointer to an instance of type GridType is created by reading the given file which is translated to the specific format of the given GridType. The GridPtr class behaves like an auto pointer of GridType. An auto pointer to a grid of type GridType is constructed as follows:
GridPtr<GridType> gridptr(filename, MPI_COMM_WORLD ); GridType & grid = *gridptr;
typedef MPIHelper::MPICommunicator Dune::GridPtr< GridType >::MPICommunicatorType |
Dune::GridPtr< GridType >::GridPtr | ( | const std::string & | filename, |
MPICommunicatorType | comm = MPIHelper::getCommunicator() |
||
) | [inline, explicit] |
constructor given the name of a DGF file
References Dune::GridPtr< GridType >::initialize().
Dune::GridPtr< GridType >::GridPtr | ( | std::istream & | input, |
MPICommunicatorType | comm = MPIHelper::getCommunicator() |
||
) | [inline, explicit] |
constructor given a std::istream
References Dune::GridPtr< GridType >::initialize().
Dune::GridPtr< GridType >::GridPtr | ( | ) | [inline] |
Default constructor, creating empty GridPtr.
Dune::GridPtr< GridType >::GridPtr | ( | GridType * | grd | ) | [inline] |
Constructor storing given pointer to internal auto pointer.
Dune::GridPtr< GridType >::GridPtr | ( | const GridPtr< GridType > & | org | ) | [inline] |
Copy constructor, copies internal auto pointer.
void Dune::GridPtr< GridType >::initialize | ( | DGFGridFactory< GridType > & | dgfFactory | ) | [inline, protected] |
References Dune::GridPtr< GridType >::bndId_, Dune::Intersection< GridImp, IntersectionImp >::boundary(), Dune::DGFGridFactory< G >::boundaryId(), Dune::GridPtr< GridType >::dimension, Dune::GridPtr< GridType >::elParam_, Dune::DGFGridFactory< G >::grid(), Dune::GridPtr< GridType >::gridPtr_, Dune::GridView< ViewTraits >::ibegin(), Dune::GridView< ViewTraits >::iend(), Dune::Intersection< GridImp, IntersectionImp >::indexInInside(), Dune::GridView< ViewTraits >::indexSet(), Dune::Interior_Partition, Dune::GridPtr< GridType >::nofElParam_, Dune::GridPtr< GridType >::nofVtxParam_, Dune::DGFGridFactory< G >::parameter(), Dune::Intersection< GridImp, IntersectionImp >::type(), and Dune::GridPtr< GridType >::vtxParam_.
Referenced by Dune::GridPtr< GridType >::GridPtr().
void Dune::GridPtr< GridType >::loadBalance | ( | ) | [inline] |
int Dune::GridPtr< GridType >::nofParameters | ( | int | cdim | ) | const [inline] |
get number of parameters defined for a given codimension
References Dune::GridPtr< GridType >::nofElParam_, and Dune::GridPtr< GridType >::nofVtxParam_.
Referenced by Dune::GridPtr< GridType >::DataHandle::gather(), and Dune::GridPtr< GridType >::DataHandle::size().
GridType& Dune::GridPtr< GridType >::operator* | ( | ) | [inline] |
return reference to GridType instance
References Dune::GridPtr< GridType >::gridPtr_.
const GridType& Dune::GridPtr< GridType >::operator* | ( | ) | const [inline] |
return const reference to GridType instance
References Dune::GridPtr< GridType >::gridPtr_.
GridType* Dune::GridPtr< GridType >::operator-> | ( | ) | [inline] |
return pointer to GridType instance
References Dune::GridPtr< GridType >::gridPtr_.
const GridType* Dune::GridPtr< GridType >::operator-> | ( | ) | const [inline] |
return const pointer to GridType instance
References Dune::GridPtr< GridType >::gridPtr_.
GridPtr& Dune::GridPtr< GridType >::operator= | ( | const GridPtr< GridType > & | org | ) | [inline] |
GridPtr& Dune::GridPtr< GridType >::operator= | ( | GridType * | grd | ) | [inline] |
assignment of pointer to internal auto pointer
References Dune::GridPtr< GridType >::bndId_, Dune::GridPtr< GridType >::elParam_, Dune::GridPtr< GridType >::gridPtr_, Dune::GridPtr< GridType >::nofElParam_, Dune::GridPtr< GridType >::nofVtxParam_, and Dune::GridPtr< GridType >::vtxParam_.
const std::vector< double >& Dune::GridPtr< GridType >::parameters | ( | const Entity & | entity | ) | const [inline] |
get parameters defined for each codim 0 und dim entity on the grid through the grid file
References Dune::Entity< cd, dim, GridImp, EntityImp >::codimension, Dune::GridPtr< GridType >::elParam_, Dune::GridPtr< GridType >::emptyParam_, Dune::GridPtr< GridType >::gridPtr_, Dune::GridPtr< GridType >::nofElParam_, Dune::GridPtr< GridType >::nofVtxParam_, and Dune::GridPtr< GridType >::vtxParam_.
std::vector< double >& Dune::GridPtr< GridType >::params | ( | const Entity & | entity | ) | [inline, protected] |
References Dune::Entity< cd, dim, GridImp, EntityImp >::codimension, Dune::GridPtr< GridType >::elParam_, Dune::GridPtr< GridType >::emptyParam_, Dune::GridPtr< GridType >::gridPtr_, Dune::GridPtr< GridType >::nofElParam_, Dune::GridPtr< GridType >::nofVtxParam_, and Dune::GridPtr< GridType >::vtxParam_.
Referenced by Dune::GridPtr< GridType >::loadBalance().
GridType* Dune::GridPtr< GridType >::release | ( | ) | [inline] |
release pointer from internal ownership
References Dune::GridPtr< GridType >::gridPtr_.
void Dune::GridPtr< GridType >::setNofParams | ( | int | cdim, |
int | nofP | ||
) | [inline, protected] |
References Dune::GridPtr< GridType >::nofElParam_, and Dune::GridPtr< GridType >::nofVtxParam_.
Referenced by Dune::GridPtr< GridType >::DataHandle::scatter().
std::vector< int > Dune::GridPtr< GridType >::bndId_ [protected] |
Referenced by Dune::GridPtr< GridType >::initialize(), and Dune::GridPtr< GridType >::operator=().
const int Dune::GridPtr< GridType >::dimension = GridType::dimension [static] |
std::vector< std::vector< double > > Dune::GridPtr< GridType >::elParam_ [protected] |
std::vector< double > Dune::GridPtr< GridType >::emptyParam_ [protected] |
Referenced by Dune::GridPtr< GridType >::parameters(), and Dune::GridPtr< GridType >::params().
std::auto_ptr<GridType> Dune::GridPtr< GridType >::gridPtr_ [mutable, protected] |
Referenced by Dune::GridPtr< GridType >::initialize(), Dune::GridPtr< GridType >::loadBalance(), Dune::GridPtr< GridType >::operator*(), Dune::GridPtr< GridType >::operator->(), Dune::GridPtr< GridType >::operator=(), Dune::GridPtr< GridType >::parameters(), Dune::GridPtr< GridType >::params(), and Dune::GridPtr< GridType >::release().
int Dune::GridPtr< GridType >::nofElParam_ [protected] |
Referenced by Dune::GridPtr< GridType >::DataHandle::DataHandle(), Dune::GridPtr< GridType >::initialize(), Dune::GridPtr< GridType >::loadBalance(), Dune::GridPtr< GridType >::nofParameters(), Dune::GridPtr< GridType >::operator=(), Dune::GridPtr< GridType >::parameters(), Dune::GridPtr< GridType >::params(), Dune::GridPtr< GridType >::setNofParams(), and Dune::GridPtr< GridType >::DataHandle::~DataHandle().
int Dune::GridPtr< GridType >::nofVtxParam_ [protected] |
Referenced by Dune::GridPtr< GridType >::DataHandle::DataHandle(), Dune::GridPtr< GridType >::initialize(), Dune::GridPtr< GridType >::loadBalance(), Dune::GridPtr< GridType >::nofParameters(), Dune::GridPtr< GridType >::operator=(), Dune::GridPtr< GridType >::parameters(), Dune::GridPtr< GridType >::params(), Dune::GridPtr< GridType >::setNofParams(), and Dune::GridPtr< GridType >::DataHandle::~DataHandle().
std::vector< std::vector< double > > Dune::GridPtr< GridType >::vtxParam_ [protected] |