Commit e4bf2b6c authored by Ansgar Burchardt's avatar Ansgar Burchardt

Merge branch 'cleanup-7' into 'master'

Minor code cleanup

See merge request !47
parents e0e37c6b c702bca2
This diff is collapsed.
......@@ -699,27 +699,24 @@ NODE *NS_DIM_PREFIX CreateSonNode (GRID *theGrid, NODE *FatherNode)
NODE *NS_DIM_PREFIX CreateMidNode (GRID *theGrid, ELEMENT *theElement, VERTEX *theVertex, INT edge)
{
NODE *theNode;
EDGE *theEdge;
VERTEX *v0,*v1;
BNDP *bndp;
DOUBLE *local,*x[MAX_CORNERS_OF_ELEM];
DOUBLE_VECTOR bnd_global,global;
DOUBLE diff;
INT n,co0,co1,move,part,vertex_null;
INT n,move,part;
co0 = CORNER_OF_EDGE(theElement,edge,0);
co1 = CORNER_OF_EDGE(theElement,edge,1);
v0 = MYVERTEX(CORNER(theElement,co0));
v1 = MYVERTEX(CORNER(theElement,co1));
const INT co0 = CORNER_OF_EDGE(theElement,edge,0);
const INT co1 = CORNER_OF_EDGE(theElement,edge,1);
VERTEX* v0 = MYVERTEX(CORNER(theElement,co0));
VERTEX* v1 = MYVERTEX(CORNER(theElement,co1));
V_DIM_LINCOMB(0.5, CVECT(v0), 0.5, CVECT(v1), global);
/* set MIDNODE pointer */
theEdge = GetEdge(CORNER(theElement,co0),CORNER(theElement,co1));
EDGE* theEdge = GetEdge(CORNER(theElement,co0),CORNER(theElement,co1));
ASSERT(theEdge!=NULL);
/* allocate vertex */
vertex_null = (theVertex==NULL);
const bool vertex_null = (theVertex==NULL);
if (theVertex==NULL)
{
if ((OBJT(v0) == BVOBJ) && (OBJT(v1) == BVOBJ))
......@@ -772,7 +769,7 @@ NODE *NS_DIM_PREFIX CreateMidNode (GRID *theGrid, ELEMENT *theElement, VERTEX *t
SETONEDGE(theVertex,edge);
}
/* allocate node */
theNode = CreateNode(theGrid,theVertex,(GEOM_OBJECT *)theEdge,MID_NODE,1);
NODE* theNode = CreateNode(theGrid,theVertex,(GEOM_OBJECT *)theEdge,MID_NODE,1);
if (theNode==NULL && vertex_null)
{
DisposeVertex(theGrid,theVertex);
......@@ -2716,7 +2713,7 @@ INT NS_DIM_PREFIX CreateSonElementSide (GRID *theGrid, ELEMENT *theElement, INT
n = CORNERS_OF_SIDE(theSon,son_side);
for (i=0; i<n; i++)
{
/* check if vertices of Son ly on boundary */
/* check if vertices of Son lie on boundary */
if (OBJT(MYVERTEX(CORNER(theSon,CORNER_OF_SIDE(theSon,son_side,i))))!=BVOBJ)
{
NODE *theNode,*NFather;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment