Dune::AlbertaGrid< dim, dimworld > Class Template Reference
[Grid Implementations, AlbertaGrid]
#include <agrid.hh>

Detailed Description
template<int dim, int dimworld>
class Dune::AlbertaGrid< dim, dimworld >
[ provides Dune::Grid ]
Provides the simplicial meshes of the finite element tool box ALBERTA (http://www.alberta-fem.de/) written by Kunibert Siebert and Alfred Schmidt.
This is one implementation of the grid interface using the the finite elemente tool box ALBERTA ( ALBERTA was written by Alfred Schmidt and Kunibert G. Siebert, see http://www.alberta-fem.de/). ALBERTA provides simplex meshes in 1d, 2d, and 3d space dimensions. Also the ALBERTA meshes can be dynamically adapted using bisection algorithms. The actual version of ALBERTA 1.2 can be downloaded at http://www.alberta-fem.de/. After installing the lib to a path of your choise (the PATH_TO_ALBERTA) you can use Dune with this package and you have only to deliver the path with the --with-alberta option to Dune.
For using Dune with ALBERTA you must tell Dune where to find ALBERTA, which dimension to use and which dimension your world should have, i.e:
./autogen.sh [OPTIONS] --with-alberta=PATH_TO_ALBERTA and --with-alberta-dim=DIM --with-alberta-world-dim=DIMWORLD
Now you must use the AlbertaGrid with DIM and DIMWORLD, otherwise unpredictable results may occur. The alberta-dim value is defaulted to 2 if --with-alberta-dim is not provided and --with-alberta-world-dim is defaulted to alberta-dim if not provided. If the --with-grid-dim (see DGF Parser's gridtype.hh) is provided the alberta-dim, if not provided, is defaulted to the value of grid-dim.
Note: Although ALBERTA supports different combination of DIM <= DIMWORLD, so far only the combinations DIM=DIMWORLD=2
and DIM=DIMWORLD=3
are supported.
For installation instructions see http://www.dune-project.org/doc/contrib-software.html#alberta .
Public Types | |
enum | { numCodim = dim+1 } |
enum | { MAXL = 64 } |
typedef AlbertaGridFamily< dim, dimworld > | GridFamily |
the grid family of AlbertaGrid | |
typedef AlbertaGridFamily< dim, dimworld >::Traits | Traits |
the Traits | |
typedef AlbertaGridHierarchicIndexSet < dim, dimworld > | HierarchicIndexSet |
type of hierarchic index set | |
typedef ALBERTA AlbertHelp::AlbertLeafData < dimworld, dim+1 > | LeafDataType |
type of leaf data | |
Exported constants | |
enum | { dimension = dim } |
A constant that exports the template parameter dim. More... | |
enum | { dimensionworld = dimworld } |
A constant that exports the template parameter dimworld. More... | |
Exported types | |
typedef ct | ctype |
Define type used for coordinates in grid module. | |
Public Member Functions | |
AlbertaGrid (const std::string macroTriangFilename) | |
Constructor which reads an ALBERTA macro triangulation file. | |
AlbertaGrid () | |
empty Constructor | |
~AlbertaGrid () | |
Desctructor. | |
int | maxLevel () const |
template<int cd, PartitionIteratorType pitype> | |
Traits::template Codim< cd > ::template Partition< pitype > ::LevelIterator | lbegin (int level) const |
Iterator to first entity of given codim on level. | |
template<int cd, PartitionIteratorType pitype> | |
Traits::template Codim< cd > ::template Partition< pitype > ::LevelIterator | lend (int level) const |
one past the end on this level | |
template<int cd> | |
Traits::template Codim< cd > ::template Partition < All_Partition > ::LevelIterator | lbegin (int level) const |
Iterator to first entity of given codim on level. | |
template<int cd> | |
Traits::template Codim< cd > ::template Partition < All_Partition > ::LevelIterator | lend (int level) const |
one past the end on this level | |
template<int codim, PartitionIteratorType pitype> | |
Traits::template Codim< codim > ::template Partition< pitype > ::LeafIterator | leafbegin () const |
return LeafIterator which points to first leaf entity | |
template<int codim> | |
Traits::template Codim< codim > ::LeafIterator | leafbegin () const |
return LeafIterator which points to first leaf entity | |
template<int codim, PartitionIteratorType pitype> | |
Traits::template Codim< codim > ::template Partition< pitype > ::LeafIterator | leafend () const |
return LeafIterator which points behind last leaf entity | |
template<int codim> | |
Traits::template Codim< codim > ::LeafIterator | leafend () const |
return LeafIterator which points behind last leaf entity | |
int | size (int level, int codim) const |
Number of grid entities per level and codim because lbegin and lend are none const, and we need this methods counting the entities on each level, you know. | |
int | size (int level, GeometryType type) const |
number of entities per level and geometry type in this process | |
int | size (int codim) const |
number of leaf entities per codim in this process | |
int | size (GeometryType type) const |
number of leaf entities per geometry type in this process | |
bool | mark (int refCount, const typename Traits::template Codim< 0 >::EntityPointer &en) const |
marks an element for refCount refines. if refCount is negative the element is coarsend -refCount times NOTE: if element was already marked for refinement then nothing happens if element is again marked for coarsen, refinement always counts more then coarsening mark returns true if element was marked, otherwise false | |
int | getMark (const typename Traits::template Codim< 0 >::EntityPointer &) const |
return current adaptation mark for given entity | |
bool | globalRefine (int refCount) |
uses the interface, mark on entity and refineLocal | |
bool | adapt () |
refine all positive marked leaf entities, coarsen all negative marked entities if possible, return true if a least one element was refined | |
template<class DofManagerType, class RestrictProlongOperatorType> | |
bool | adapt (DofManagerType &, RestrictProlongOperatorType &, bool verbose=false) |
adapt method with DofManager | |
bool | preAdapt () |
returns true, if a least one element is marked for coarsening | |
bool | postAdapt () |
clean up some markers | |
const CollectiveCommunicationType & | comm () const |
return reference to collective communication, if MPI found this is specialisation for MPI | |
std::string | name () const |
return name of the grid | |
template<GrapeIOFileFormatType ftype> | |
bool | writeGrid (const std::basic_string< char > filename, albertCtype time) const |
write Grid to file in specified GrapeIOFileFormatType | |
template<GrapeIOFileFormatType ftype> | |
bool | readGrid (const std::basic_string< char > filename, albertCtype &time) |
read Grid from file filename and store time of mesh in time | |
void | setNewCoords (const FieldVector< albertCtype, dimworld > &trans, const albertCtype scalar) |
transform grid N = scalar * x + trans | |
const Traits::LevelIndexSet & | levelIndexSet (int level) const |
return level index set for given level | |
const Traits::LeafIndexSet & | leafIndexSet () const |
return leaf index set | |
const GlobalIdSet & | globalIdSet () const |
return global IdSet | |
const LocalIdSet & | localIdSet () const |
return local IdSet | |
const std::vector< GeometryType > & | geomTypes (int codim) const |
returns geometry type vector for codimension | |
bool | mark (int refCount, const typename Traits::template Codim< 0 >::EntityPointer &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. | |
int | ghostSize (int level, int codim) const |
ghostSize is zero by default | |
int | ghostSize (int codim) const |
ghostSize is zero by default | |
int | overlapSize (int level, int codim) const |
overlapSize is zero by default | |
int | overlapSize (int codim) const |
overlapSize is zero by default | |
template<class DataHandleImp, class DataTypeImp> | |
void | communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir, int level) const |
template<class DataHandleImp, class DataTypeImp> | |
void | communicate (CommDataHandleIF< DataHandleImp, DataTypeImp > &data, InterfaceType iftype, CommunicationDirection dir) const |
bool | loadBalance () |
default implementation of load balance does nothing and returns false | |
template<class DataHandle> | |
bool | loadBalance (DataHandle &data) |
default implementation of load balance does nothing and returns false | |
Adaptivity and grid refinement | |
bool | mark (int refCount, const typename Codim< 0 >::EntityPointer &e) |
Marks an entity to be refined/coarsened in a subsequent adapt. | |
int | getMark (const typename Codim< 0 >::EntityPointer &e) const |
returns adaptation mark for given entity pointer | |
Protected Member Functions | |
template<class InterfaceType> | |
ReturnImplementationType < InterfaceType > ::ImplementationType & | getRealImplementation (InterfaceType &i) const |
return real implementation of interface class | |
GridImp & | asImp () |
Barton-Nackman trick. | |
const GridImp & | asImp () const |
Barton-Nackman trick. |
Member Enumeration Documentation
anonymous enum |
anonymous enum [inherited] |
anonymous enum [inherited] |
Member Function Documentation
int Dune::AlbertaGrid< dim, dimworld >::maxLevel | ( | ) | const [inline] |
Return maximum level defined in this grid. Levels are numbered 0 ... maxLevel with 0 the coarsest level.
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
bool Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::mark | ( | int | refCount, | |
const typename Traits::template Codim< 0 >::EntityPointer & | e | |||
) | [inline, inherited] |
Marks an entity to be refined/coarsened in a subsequent adapt.
- Parameters:
-
[in] refCount Number of subdivisions that should be applied. Negative value means coarsening. [in] e EntityPointer to Entity that should be refined
- Returns:
- true if Entity was marked, false otherwise.
- Note:
- default implementation is: return false; for grids with no adaptation.
- for the grid programmer: this method is implemented as a template method, because the Entity type is not defined when the class is instantiated You won't need this trick in the implementation. In your implementation you should use it as This template method will vanish due to the inheritance rules.
bool mark( int refCount, typename Traits::template Codim<0>::EntityPointer & e ).
Reimplemented in Dune::ALU2dGrid< dim, dimworld >, Dune::ALU3dGrid< dim, dimworld, elType >, Dune::UGGrid< dim >, Dune::ALU2dGrid< 2, 2 >, Dune::ALU3dGrid< 3, 3, Dune::hexa >, and Dune::ALU3dGrid< 3, 3, Dune::tetra >.
bool Dune::Grid< dim, dimworld, ct, GridFamily >::mark | ( | int | refCount, | |
const typename Codim< 0 >::EntityPointer & | e | |||
) | [inline, inherited] |
Marks an entity to be refined/coarsened in a subsequent adapt.
- Parameters:
-
[in] refCount Number of subdivisions that should be applied. Negative value means coarsening. [in] e EntityPointer to Entity that should be refined
- Returns:
- true if Entity was marked, false otherwise.
int Dune::Grid< dim, dimworld, ct, GridFamily >::getMark | ( | const typename Codim< 0 >::EntityPointer & | e | ) | const [inline, inherited] |
returns adaptation mark for given entity pointer
- Parameters:
-
[in] e EntityPointer for which adaptation mark should be determined
- Returns:
- int adaptation mark currently set for given EntityPointer e
void Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::communicate | ( | CommDataHandleIF< DataHandleImp, DataTypeImp > & | data, | |
InterfaceType | iftype, | |||
CommunicationDirection | dir, | |||
int | level | |||
) | const [inline, inherited] |
dummy communicate, doing nothing
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
Reimplemented in Dune::ALU2dGrid< 2, 2 >, Dune::ALU3dGrid< 3, 3, Dune::hexa >, and Dune::ALU3dGrid< 3, 3, Dune::tetra >.
void Dune::GridDefaultImplementation< dim, dimworld, ct, GridFamily >::communicate | ( | CommDataHandleIF< DataHandleImp, DataTypeImp > & | data, | |
InterfaceType | iftype, | |||
CommunicationDirection | dir | |||
) | const [inline, inherited] |
dummy communicate, doing nothing
Reimplemented from Dune::Grid< dim, dimworld, ct, GridFamily >.
Reimplemented in Dune::ALU2dGrid< 2, 2 >, Dune::ALU3dGrid< 3, 3, Dune::hexa >, and Dune::ALU3dGrid< 3, 3, Dune::tetra >.
The documentation for this class was generated from the following files:
- agrid.hh
- albertagrid.cc