[Dune] [Dune-CVS] dune-grid r3247 - trunk/grid/utility (fwd)
Oliver Sander
sander at mi.fu-berlin.de
Tue Nov 7 12:22:55 CET 2006
I am very sorry, but I still don't understand what the TwistUtility
does. What is the twist of an intersection?
--
Oliver
************************************************************************
* Oliver Sander ** email: sander at mi.fu-berlin.de *
* Freie Universität Berlin ** phone: + 49 (30) 838 75217 *
* Institut für Mathematik II ** URL : page.mi.fu-berlin.de/~sander *
* Arnimallee 6 ** -------------------------------------*
* 14195 Berlin, Germany ** Member of MATHEON (www.matheon.de) *
************************************************************************
---------- Forwarded message ----------
Date: Tue, 07 Nov 2006 11:48:21 +0100
From: Robert Kloefkorn <robertk at hal.iwr.uni-heidelberg.de>
To: dune-cvs at hal.iwr.uni-heidelberg.de
Subject: [Dune-CVS] dune-grid r3247 - trunk/grid/utility
Author: robertk
Date: 2006-11-07 11:48:20 +0100 (Tue, 07 Nov 2006)
New Revision: 3247
Modified:
trunk/grid/utility/twistutility.hh
Log:
added docu.
Modified: trunk/grid/utility/twistutility.hh
===================================================================
--- trunk/grid/utility/twistutility.hh 2006-11-07 09:46:14 UTC (rev 3246)
+++ trunk/grid/utility/twistutility.hh 2006-11-07 10:48:20 UTC (rev 3247)
@@ -28,61 +28,66 @@
namespace Dune {
+ /** \brief Utility to get twist from IntersectionIterator,
+ if provided by grid (i.e. AlbertaGrid, ALUGrid)
+ otherwise return default values.
+ */
template <class GridImp>
class TwistUtility;
- // for structured grids, the twist is always zero
- // ? is this correct
+
+ /** \brief Specialization of TwistUtility for SGrid.
+ Provides default values.
+ */
template <int dim,int dimw>
class TwistUtility<SGrid<dim,dimw> >
{
public:
typedef SGrid<dim,dimw> GridType;
public:
- TwistUtility(const GridType& grid) :
- grid_(grid)
- {}
+ //! \brief constructor taking grid reference
+ TwistUtility(const GridType& grid) {}
- // default twist is zero
+ //! \brief return 0 for inner face
template <class IntersectionIterator>
int twistInSelf(const IntersectionIterator& it) const {
return 0;
}
- // default twist is zero
+ //! \brief return 0 for outer face
template <class IntersectionIterator>
int twistInNeighbor(const IntersectionIterator& it) const {
return 0;
}
-
- private:
- const GridType& grid_;
};
+
+ /** \brief Specialization of TwistUtility for YaspGrid.
+ Provides default values.
+ */
template <int dim,int dimw>
class TwistUtility<YaspGrid<dim,dimw> >
{
public:
typedef YaspGrid<dim,dimw> GridType;
public:
- TwistUtility(const GridType& grid) :
- grid_(grid)
- {}
+ //! \brief constructor taking grid reference
+ TwistUtility(const GridType& grid) {}
- // default twist is zero
+ //! \brief return 0 for inner face
template <class IntersectionIterator>
int twistInSelf(const IntersectionIterator& it) const {
return 0;
}
- // default twist is zero
+ //! \brief return 0 for outer face
template <class IntersectionIterator>
int twistInNeighbor(const IntersectionIterator& it) const {
return 0;
}
-
- private:
- const GridType& grid_;
};
+
#if HAVE_ALBERTA_FOUND
+ /** \brief Specialization of TwistUtility for AlbertaGrid.
+ */
template <int dim, int dimW>
class TwistUtility<AlbertaGrid<dim, dimW> >
{
@@ -91,10 +96,12 @@
typedef typename GridType::Traits::LeafIntersectionIterator LeafIntersectionIterator;
typedef typename GridType::Traits::LevelIntersectionIterator LevelIntersectionIterator;
public:
+ //! \brief constructor taking grid reference
TwistUtility(const GridType& grid) :
grid_(grid)
{}
+ //! \brief return twist for inner face
int twistInSelf(const LeafIntersectionIterator& it) const {
return grid_.getRealIntersectionIterator(it).twistInSelf();
}
@@ -103,6 +110,7 @@
// return grid_.getRealIntersectionIterator(it).twistInSelf();
//}
+ //! \brief return twist for outer face
int twistInNeighbor(const LeafIntersectionIterator& it) const {
return grid_.getRealIntersectionIterator(it).twistInNeighbor();
}
@@ -117,6 +125,8 @@
#endif
#if HAVE_ALUGRID_FOUND
+ /** \brief Specialization of TwistUtility for ALUGridSimplex.
+ */
template <>
class TwistUtility<ALUSimplexGrid<3,3> >
{
@@ -125,22 +135,27 @@
typedef GridType::Traits::LeafIntersectionIterator LeafIntersectionIterator;
typedef GridType::Traits::LevelIntersectionIterator LevelIntersectionIterator;
public:
+ //! \brief constructor taking grid reference
TwistUtility(const GridType& grid) :
grid_(grid)
{}
+ //! \brief return twist for inner face
int twistInSelf(const LeafIntersectionIterator& it) const {
return grid_.getRealIntersectionIterator(it).twistInSelf();
}
+ //! \brief return twist for inner face
int twistInSelf(const LevelIntersectionIterator& it) const {
return grid_.getRealIntersectionIterator(it).twistInSelf();
}
+ //! \brief return twist for outer face
int twistInNeighbor(const LeafIntersectionIterator& it) const {
return grid_.getRealIntersectionIterator(it).twistInNeighbor();
}
+ //! \brief return twist for outer face
int twistInNeighbor(const LevelIntersectionIterator& it) const {
return grid_.getRealIntersectionIterator(it).twistInNeighbor();
}
@@ -152,6 +167,9 @@
private:
const GridType& grid_;
};
+
+ /** \brief Specialization of TwistUtility for ALUGridSimplex.
+ */
template <>
class TwistUtility<ALUCubeGrid<3,3> >
{
@@ -160,22 +178,27 @@
typedef GridType::Traits::LeafIntersectionIterator LeafIntersectionIterator;
typedef GridType::Traits::LevelIntersectionIterator LevelIntersectionIterator;
public:
+ //! \brief constructor taking grid reference
TwistUtility(const GridType& grid) :
grid_(grid)
{}
+ //! \brief return twist for inner face
int twistInSelf(const LeafIntersectionIterator& it) const {
return grid_.getRealIntersectionIterator(it).twistInSelf();
}
+ //! \brief return twist for inner face
int twistInSelf(const LevelIntersectionIterator& it) const {
return grid_.getRealIntersectionIterator(it).twistInSelf();
}
+ //! \brief return twist for outer face
int twistInNeighbor(const LeafIntersectionIterator& it) const {
return grid_.getRealIntersectionIterator(it).twistInNeighbor();
}
+ //! \brief return twist for outer face
int twistInNeighbor(const LevelIntersectionIterator& it) const {
return grid_.getRealIntersectionIterator(it).twistInNeighbor();
}
@@ -187,6 +210,9 @@
private:
const GridType& grid_;
};
+
+ /** \brief Specialization of TwistUtility for ALUGridSimplex.
+ */
template <>
class TwistUtility<ALUSimplexGrid<2,2> >
{
@@ -195,22 +221,25 @@
typedef GridType::Traits::LeafIntersectionIterator LeafIntersectionIterator;
typedef GridType::Traits::LevelIntersectionIterator LevelIntersectionIterator;
public:
- TwistUtility(const GridType& grid) :
- grid_(grid)
- {}
+ //! \brief constructor taking grid reference
+ TwistUtility(const GridType& grid) {}
+ //! \brief return twist for inner face
int twistInSelf(const LeafIntersectionIterator& it) const {
return 0;
}
+ //! \brief return twist for inner face
int twistInSelf(const LevelIntersectionIterator& it) const {
return 0;
}
+ //! \brief return twist for outer face
int twistInNeighbor(const LeafIntersectionIterator& it) const {
return 1;
}
+ //! \brief return twist for outer face
int twistInNeighbor(const LevelIntersectionIterator& it) const {
return 1;
}
@@ -218,9 +247,6 @@
private:
TwistUtility(const TwistUtility&);
TwistUtility& operator=(const TwistUtility&);
-
- private:
- const GridType& grid_;
};
#endif
_______________________________________________
Dune-CVS mailing list
Dune-CVS at dune-project.org
http://www.dune-project.org/cgi-bin/mailman/listinfo/dune-cvs
More information about the Dune
mailing list