Skip to content
Snippets Groups Projects
Commit f5f13f37 authored by Robert Klöfkorn's avatar Robert Klöfkorn
Browse files

Minor changes.

[[Imported from SVN: r795]]
parent 45e1d78a
No related branches found
No related tags found
No related merge requests found
......@@ -21,12 +21,10 @@ namespace Albert {
(assert(drv != NULL); (vec = (drv)->vec); assert(vec != NULL));
//vec = (drv)->vec;
//#define _ALBERTA_
inline void fillMacroInfo(TRAVERSE_STACK *stack,
const MACRO_EL *mel, EL_INFO *elinfo)
{
#ifdef _ALBERTA_
#ifdef _ALBERTA_H_
/* Alberta version */
fill_macro_info(stack->traverse_mesh,mel,elinfo);
#else
......@@ -342,6 +340,8 @@ namespace AlbertHelp
static const int tetraFace_2[3] = {0,3,1};
static const int tetraFace_3[3] = {0,1,2};
static const int tetraFace[4][3] = { {3,2,1}, {2,3,0} , {0,3,1} , {0,1,2} };
static const int * localTetraFaceNumber[4] = {tetraFace_0, tetraFace_1,
tetraFace_2 , tetraFace_3 };
......@@ -1193,7 +1193,10 @@ namespace AlbertHelp
elOwner = NULL;
}
#ifndef _ALBERTA_H_
#include "part.cc"
#endif
} // end namespace AlbertHelp
#ifdef __ALBERTpp__
......
......@@ -1975,6 +1975,32 @@ namespace Dune
return elInfo_->opp_vertex[neighborCount_];
}
// setup neighbor element with the information of elInfo_
inline void AlbertGridIntersectionIterator<2,2>::setupVirtEn()
{
enum { dim = 2 };
enum { dimworld = 2 };
// set the neighbor element as element
neighElInfo_->el = elInfo_->neigh[neighborCount_];
int vx = elInfo_->opp_vertex[neighborCount_];
for(int i=0; i<dimworld; i++)
neighElInfo_->coord[vx][i] = elInfo_->opp_coord[neighborCount_][i];
for(int i=1; i<dim+1; i++)
{
int nb = (((neighborCount_-i)%(dim+1)) +dim+1)%(dim+1);
for(int j=0; j<dimworld; j++)
neighElInfo_->coord[(vx+i)%(dim+1)][j] = elInfo_->coord[nb][j];
}
/* works, tested many times */
virtualEntity_->setElInfo(neighElInfo_);
builtNeigh_ = true;
}
// setup neighbor element with the information of elInfo_
template< int dim, int dimworld>
inline void AlbertGridIntersectionIterator<dim,dimworld>::setupVirtEn()
......@@ -2016,9 +2042,12 @@ namespace Dune
for(int i=0; i<dimworld; i++)
neighElInfo_->coord[vx][i] = elInfo_->opp_coord[neighborCount_][i];
//printf(" nb %d \n",neighborCount_);
for(int i=1; i<dim+1; i++)
{
int nb = (((neighborCount_-i)%(dim+1)) +dim+1)%(dim+1);
//int nb = AlbertHelp::tetraFace[neighborCount_][i];
for(int j=0; j<dimworld; j++)
neighElInfo_->coord[(vx+i)%(dim+1)][j] = elInfo_->coord[nb][j];
}
......@@ -3040,6 +3069,8 @@ namespace Dune
assert(dimworld == DIM_OF_WORLD);
assert(dim == DIM);
assert(dim == 2);
ALBERT MESH * oldMesh = oldGrid.getMesh();
vertexMarker_ = new AlbertMarkerVector ();
......@@ -3074,7 +3105,7 @@ namespace Dune
assert(no == length);
}
#if 0
#ifdef _ALBERTA_H_
ALBERT write_macro(oldMesh,fakename);
ALBERT read_macro(fakeMesh,fakename,ALBERT AlbertHelp::initBoundary);
#else
......@@ -3099,7 +3130,7 @@ namespace Dune
{
#if 0
#ifdef _ALBERTA_H_
ALBERT write_macro ( fakeMesh, fakename );
ALBERT read_macro ( mesh_ , fakename, ALBERT AlbertHelp::initBoundary);
#else
......@@ -3842,8 +3873,7 @@ namespace Dune
{
a.resize(newNumberOfEntries);
}
for(Array<int>::Iterator it = a.begin(); it != a.end(); ++it)
(*it) = -1;
for(int i=0; i<a.size(); i++) a[i] = -1;
}
template < int dim, int dimworld > template <int codim>
......
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