Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • patrick.jaap/dune-uggrid
  • jakub.both/dune-uggrid
  • simon.praetorius/dune-uggrid
  • felix.gruber/dune-uggrid
  • liam.keegan/dune-uggrid
  • ansgar/dune-uggrid
  • markus.blatt/dune-uggrid
  • maikel.nadolski/dune-uggrid
  • tobias.leibner/dune-uggrid
  • rene.milk/dune-uggrid
  • staging/dune-uggrid
  • joe/dune-uggrid
  • tkoch/dune-uggrid
  • lukas.riedel/dune-uggrid
  • marian/dune-uggrid
  • henrik.stolzmann/dune-uggrid
  • felix.mueller/dune-uggrid
17 results
Show changes
Commits on Source (4)
  • Henrik Stolzmann's avatar
    Removed data member vector::skip · 77cb8422
    Henrik Stolzmann authored and Oliver Sander's avatar Oliver Sander committed
    See Issue `#29`.
    Removed `vector::skip` and the  code that uses it. It compiles and the
    few existing tests run without problems.
    77cb8422
  • Oliver Sander's avatar
    [!139] Removed data member vector::skip · 4b4e02a9
    Oliver Sander authored
    Merge branch 'master' into 'master'
    
    ref:staging/dune-uggrid Removed vector::skip and the code that uses it. It
    compiles and the few existing tests run without problems.
    
    Fixes [#29]
    
    See merge request [!139]
    
      [#29]: gitlab.dune-project.org/NoneNone/issues/29
      [!139]: gitlab.dune-project.org/staging/dune-uggrid/merge_requests/139
    
    
    Closes #29
    4b4e02a9
  • Oliver Sander's avatar
    Rentroduce Vector::skip as Vector::leafIndex · 0ea5bc24
    Oliver Sander authored
    The 'skip' data member of the Vector class used to be abused for
    the leaf index of the vector, if that vector corresponds to an
    element facet in 3d.  By accident, that 'skip' field got removed
    in a recent commit.  Let's put it back in, but rename it to
    'leafIndex' now.  All it is used for nowadays is that leaf index.
    0ea5bc24
  • Oliver Sander's avatar
    [!141] Rentroduce Vector::skip as Vector::leafIndex · 172f6988
    Oliver Sander authored
    Merge branch 'fix-vector-leaf-index' into 'master'
    
    ref:staging/dune-uggrid The 'skip' data member of the Vector class used to be
    abused for the leaf index of the vector, if that vector corresponds to an
    element facet in 3d. By accident, that 'skip' field got removed in a recent
    commit. Let's put it back in, but rename it to 'leafIndex' now. All it is used
    for nowadays is that leaf index.
    
    See merge request [!141]
    
      [!141]: gitlab.dune-project.org/staging/dune-uggrid/merge_requests/141
    172f6988
......@@ -354,7 +354,6 @@ static INT CreateVectorInPart (GRID *theGrid, INT DomPart, INT VectorObjType,
VOBJECT(pv) = object;
VINDEX(pv) = (long)NVEC(theGrid);
SUCCVC(pv) = FIRSTVECTOR(theGrid);
VECSKIP(pv) = 0;
VSTART(pv) = NULL;
GRID_LINK_VECTOR(theGrid,pv,PrioMaster);
......@@ -3888,7 +3887,7 @@ static INT LexAlgDep (GRID *theGrid, const char *data)
DOUBLE_VECTOR pos,nbpos;
DOUBLE diff[DIM];
INT i,order,res;
INT Sign[DIM],Order[DIM],xused,yused,zused,error,SpecialTreatSkipVecs;
INT Sign[DIM],Order[DIM],xused,yused,zused,error;
char ord[3];
/* read ordering directions */
......@@ -3959,13 +3958,6 @@ static INT LexAlgDep (GRID *theGrid, const char *data)
return(1);
}
/* treat vectors with skipflag set specially? */
SpecialTreatSkipVecs = false;
if (strchr(data,'<')!=NULL)
SpecialTreatSkipVecs = GM_PUT_AT_BEGIN;
else if (strchr(data,'>')!=NULL)
SpecialTreatSkipVecs = GM_PUT_AT_END;
theMG = MYMG(theGrid);
/* find an approximate measure for the mesh size */
......@@ -3985,50 +3977,30 @@ static INT LexAlgDep (GRID *theGrid, const char *data)
SETMUP(theMatrix,0);
SETMDOWN(theMatrix,0);
if (SpecialTreatSkipVecs)
{
if (VECSKIP(theVector) && !VECSKIP(NBVector))
{
if (SpecialTreatSkipVecs==GM_PUT_AT_BEGIN)
order = -1;
else
order = 1;
}
VectorPosition(NBVector,nbpos);
if (VECSKIP(NBVector) && !VECSKIP(theVector))
V_DIM_SUBTRACT(nbpos,pos,diff);
V_DIM_SCALE(InvMeshSize,diff);
if (fabs(diff[Order[DIM-1]])<ORDERRES)
{
#ifdef __THREEDIM__
if (fabs(diff[Order[DIM-2]])<ORDERRES)
{
if (SpecialTreatSkipVecs==GM_PUT_AT_BEGIN)
order = 1;
else
order = -1;
if (diff[Order[DIM-3]]>0.0) order = -Sign[DIM-3];
else order = Sign[DIM-3];
}
else
#endif
if (diff[Order[DIM-2]]>0.0) order = -Sign[DIM-2];
else order = Sign[DIM-2];
}
else
{
VectorPosition(NBVector,nbpos);
V_DIM_SUBTRACT(nbpos,pos,diff);
V_DIM_SCALE(InvMeshSize,diff);
if (fabs(diff[Order[DIM-1]])<ORDERRES)
{
#ifdef __THREEDIM__
if (fabs(diff[Order[DIM-2]])<ORDERRES)
{
if (diff[Order[DIM-3]]>0.0) order = -Sign[DIM-3];
else order = Sign[DIM-3];
}
else
#endif
if (diff[Order[DIM-2]]>0.0) order = -Sign[DIM-2];
else order = Sign[DIM-2];
}
else
{
if (diff[Order[DIM-1]]>0.0) order = -Sign[DIM-1];
else order = Sign[DIM-1];
}
if (diff[Order[DIM-1]]>0.0) order = -Sign[DIM-1];
else order = Sign[DIM-1];
}
if (order==1) SETMUP(theMatrix,1);
else SETMDOWN(theMatrix,1);
}
......
......@@ -1530,9 +1530,6 @@ all degrees of freedom stored in the vector.
. index - Reflects position of the VECTOR in the double linked list.
. skip - Used bitwise to identify components of a VECTOR that have Dirichlet boundary
conditions. These components have to be treated differently in some parts of the solver.
. start - Points to first element of the MATRIX list of a VECTOR. This
list represents the rows of the matrix belonging to degrees of freedom in
the given VECTOR.
......@@ -1562,22 +1559,6 @@ INT VINDEX (VECTOR *v);
Position of the VECTOR in the doubl linked list. This is useful for
the implementation of some iterative schemes.
\verbatim
INT VSKIPME (VECTOR *v,INT n);
INT VVECSKIP (VECTOR *v,INT n);
INT VFULLSKIP (VECTOR *v,INT n);
void SETVSKIPME (VECTOR *v,INT n);
INT VECSKIP (VECTOR *v);
INT VECSKIPBIT (VECTOR *v,INT n);
void SETVECSKIPBIT (VECTOR *v,INT n);
\endverbatim
????
Macros to modify the skip flags. VECSKIP returns value of the skip word. Since it is
a macro it can also be used for assigning a value to the skip word, e.g.
VECSKIP(v)=0 will reset all bits in the skip word. VECSKIPBIT returns true
if the n th bit of the skip word is set. SETVECSKIPBIT sets the nth
bit of the skip word to 1.
\verbatim
MATRIX *VSTART (VECTOR *v);
......
......@@ -499,6 +499,9 @@ struct vector {
/** \brief ordering of unknowns */
UINT index;
/** \brief Index if the vector is part of the leaf grid */
UINT leafIndex;
#ifndef ModelP // Dune uses ddd.gid for ids in parallel
/** \brief A unique and persistent, but not necessarily consecutive index
......@@ -507,9 +510,6 @@ struct vector {
INT id;
#endif
/** \brief used bitwise to skip unknowns */
UINT skip;
/** \brief implements matrix */
struct matrix *start;
......@@ -1899,7 +1899,6 @@ enum GM_CE {
enum LV_MODIFIERS {
LV_SKIP = (1<<0), /* print skip flags in vector */
LV_VO_INFO = (1<<1), /* vector object related info */
LV_POS = (1<<2) /* position vector */
};
......@@ -2106,13 +2105,6 @@ enum LV_ID_TYPES {
#define SUCCVC(v) ((v)->succ)
#define VINDEX(v) ((v)->index)
#define V_IN_DATATYPE(v,dt) (VDATATYPE(v) & (dt))
#define VSKIPME(v,n) ((((v)->skip)>>n) & 1)
#define VVECSKIP(v,n) ((((v)->skip)>>n) & 15)
#define VFULLSKIP(v,n) (VVECSKIP(v,n)==15)
#define SETVSKIPME(v,n) (((v)->skip=n))
#define VECSKIP(v) ((v)->skip)
#define VECSKIPBIT(v,n) (((v)->skip) & (1<<n))
#define SETVECSKIPBIT(v,n) (v)->skip = ((v)->skip & (~(1<<n))) | (1<<n)
#define VSTART(v) ((v)->start)
#define VVALUE(v,n) ((v)->value[n])
#define VVALUEPTR(v,n) (&((v)->value[n]))
......@@ -3139,11 +3131,6 @@ enum {GM_ALL_LEVELS = 1,
enum {GM_ORDER_IN_COLS, GM_ORDER_IN_ROWS};
enum {GM_PUT_AT_BEGIN = 1, /*!< put skip vectors at begin of the list */
GM_PUT_AT_END = 2 /*!< put skip vectors at end of the list */
};
#define GM_TAKE_SKIP (1<<0)
#define GM_TAKE_NONSKIP (1<<1)
/*@}*/
/* get/set current multigrid, loop through multigrids */
......
......@@ -6495,13 +6495,6 @@ void NS_DIM_PREFIX ListVector (const MULTIGRID *theMG, const VECTOR *theVector,
/* print vector data if */
if (dataopt && FMT_PR_VEC(theFormat)!=NULL)
{
/* print skip flags */
if (READ_FLAG(modifiers,LV_SKIP))
{
INT_2_bitpattern(VECSKIP(theVector),buffer);
UserWriteF(" skip=%s\n",buffer);
}
/* print data */
Data = (void*)(&VVALUE(theVector,0));
if ((*(FMT_PR_VEC(theFormat)))(VTYPE(theVector),Data," ",buffer))
......
......@@ -107,12 +107,6 @@ START_UGDIM_NAMESPACE
#define DISPLAY_NP_FORMAT_SIII "%-16.13s = %-2d %-2d %-2d\n"
#define DISPLAY_NP_FORMAT_FF "%-7.4g %-7.4g\n"
#define CLEAR_VECSKIP_OF_GRID(g) \
{ VECTOR *theVector; \
for (theVector=FIRSTVECTOR((g)); theVector!= NULL; \
theVector=SUCCVC(theVector)) \
VECSKIP(theVector) = 0;}
/****************************************************************************/
/* */
/* function declarations */
......
......@@ -108,8 +108,6 @@ static void PrintSingleVectorX (const VECTOR *v, const VECDATA_DESC *X, INT vcla
i += sprintf(buffer+i,"u[%d]=%15.8f ",j,VVALUE(v,comp));
}
i += sprintf(buffer+i," cl %d %d sk ",VCLASS(v),VNCLASS(v));
for (j=0; j<ncomp; j++)
i += sprintf(buffer+i,"%d ",((VECSKIP(v) & (1<<j))!=0));
i += sprintf(buffer+i,"n %d t %d o %d\n",VNEW(v),VTYPE(v),VOTYPE(v));
Printf(buffer);
......
......@@ -406,7 +406,7 @@ static void ddd_DefineTypes(DDD::DDDContext& context)
EL_LDATA, ELDEF(v.pred),
EL_LDATA, ELDEF(v.succ),
EL_GDATA, ELDEF(v.index),
EL_GDATA, ELDEF(v.skip),
EL_GDATA, ELDEF(v.leafIndex),
EL_LDATA, ELDEF(v.start),
/* TODO: value wird noch ausgelassen. feld variabler laenge? */
......