Skip to content
Snippets Groups Projects
Commit b6f6efe3 authored by Oliver Sander's avatar Oliver Sander
Browse files

passes the 2d test

[[Imported from SVN: r1436]]
parent 49f4b616
No related branches found
No related tags found
No related merge requests found
......@@ -157,6 +157,22 @@ namespace Dune {
return theNode->succ;
}
//! Gets the index of a UG element
static int index(const typename TargetType<0,dim>::T* theElement) {
return theElement->ge.id;
}
//! Gets the index of a UG node
static int index(const typename TargetType<dim,dim>::T* theNode) {
return theNode->myvertex->iv.id;
}
//! Calm the compiler
static int index(const void* theWhatever) {
DUNE_THROW(NotImplemented, "No index available for this kind of object");
return 0;
}
//! \todo Please doc me!
static void Local_To_Global(int n, DOUBLE** y,
const FieldVector<double, dim>& local,
......
......@@ -278,7 +278,9 @@ namespace Dune {
//! Maps a global coordinate within the element to a
//! local coordinate in its reference element
FieldVector<UGCtype, 1> local (const FieldVector<UGCtype, 2>& global) const;
FieldVector<UGCtype, 1> local (const FieldVector<UGCtype, 2>& global) const {
DUNE_THROW(NotImplemented, "local not implemented yet!");
}
//! Returns true if the point is in the current element
/** \todo Not implemented yet! */
......
......@@ -50,27 +50,9 @@ template<int codim, int dim, class GridImp>
inline int UGGridEntity < codim, dim ,GridImp>::
index() const
{
std::cerr << "UGGridEntity <" << codim << ", " << dim
<< ">::index() not implemented!\n";
return -1;
return UG_NS<dim>::index(target_);
}
#ifdef _3
template<class GridImp>
inline int UGGridEntity < 3, 3 ,GridImp>::
index()
{
return target_->myvertex->iv.id;
}
template<>
inline int UGGridEntity < 0, 3 ,3 >::
index()
{
return target_->ge.id;
}
#endif
#ifdef _2
#if 0
template<class GridImp>
......@@ -99,34 +81,6 @@ geometry() const
//************************************
//
// --UGGridEntity codim = 0
// --Entity codim = 0
//
//************************************
template< int dim, class GridImp>
inline bool UGGridEntity < 0, dim ,GridImp>::
mark( int refCount )
{
#ifdef _3
if (!UG3d::EstimateHere(target_))
return false;
return UG3d::MarkForRefinement(target_,
UG3d::RED,
0); // no user data
#else
if (!UG2d::EstimateHere(target_))
return false;
return UG2d::MarkForRefinement(target_,
UG2d::RED, // red refinement rule
0); // no user data
#endif
}
//*****************************************************************8
// count
......@@ -175,6 +129,37 @@ inline AdaptationState UGGridEntity < 0, dim ,GridImp >::state() const
std::cerr << "UGGridEntity::state() not yet implemented!\n";
return NONE;
}
template<int dim, class GridImp>
inline int UGGridEntity < 0, dim ,GridImp>::
index() const
{
return UG_NS<dim>::index(target_);
}
template< int dim, class GridImp>
inline bool UGGridEntity < 0, dim ,GridImp>::
mark( int refCount )
{
#ifdef _3
if (!UG3d::EstimateHere(target_))
return false;
return UG3d::MarkForRefinement(target_,
UG3d::RED,
0); // no user data
#else
if (!UG2d::EstimateHere(target_))
return false;
return UG2d::MarkForRefinement(target_,
UG2d::RED, // red refinement rule
0); // no user data
#endif
}
//*****************************************************************8
// count
template <int dim, class GridImp>
......
......@@ -82,7 +82,7 @@ namespace Dune {
}
// private Members
mutable UGMakeableEntity<0,GridImp::dimension,GridImp> virtualEntity_;
mutable UGMakeableEntity<codim,GridImp::dimension,GridImp> virtualEntity_;
//! element number
int elNum_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment