Commit e0d5fbb2 authored by Ansgar Burchardt's avatar Ansgar Burchardt

Merge branch 'bugfix/compiler-warnings' into 'master'

compiler warnings

See merge request !268
parents a6e96315 e5a739f0
Pipeline #6776 passed with stage
in 53 minutes and 33 seconds
......@@ -119,7 +119,6 @@ void checkMixedDataMapper(const Mapper& mapper, const GridView& gridView)
std::set<int> indices;
Index elementBlockSize = 0, edgeBlockSize = 0;
Index index;
for (const auto& element : elements(gridView))
{
......
......@@ -92,10 +92,10 @@ global(const FieldVector<UGCtype, mydim>& local) const
// we are an actual element in UG
// coorddim*coorddim is an upper bound for the number of vertices
UGCtype* cornerCoords[coorddim*coorddim];
UG_NS<coorddim>::Corner_Coordinates(target_, cornerCoords);
int n = UG_NS<coorddim>::Corner_Coordinates(target_, cornerCoords);
// Actually do the computation
UG_NS<coorddim>::Local_To_Global(corners(), cornerCoords, local, globalCoord);
UG_NS<coorddim>::Local_To_Global(n, cornerCoords, local, globalCoord);
return globalCoord;
}
......@@ -115,11 +115,11 @@ local (const FieldVector<typename GridImp::ctype, coorddim>& global) const
// coorddim*coorddim is an upper bound for the number of vertices
UGCtype* cornerCoords[coorddim*coorddim];
UG_NS<coorddim>::Corner_Coordinates(target_, cornerCoords);
int n = UG_NS<coorddim>::Corner_Coordinates(target_, cornerCoords);
// Actually do the computation
/** \todo Why is this const_cast necessary? */
UG_NS<coorddim>::GlobalToLocal(corners(), const_cast<const double**>(cornerCoords), &global[0], &result[0]);
UG_NS<coorddim>::GlobalToLocal(n, const_cast<const double**>(cornerCoords), &global[0], &result[0]);
return result;
}
......@@ -146,10 +146,10 @@ jacobianInverseTransposed (const FieldVector<typename GridImp::ctype, mydim>& lo
// compile array of pointers to corner coordinates
// coorddim*coorddim is an upper bound for the number of vertices
UGCtype* cornerCoords[coorddim*coorddim];
UG_NS<coorddim>::Corner_Coordinates(target_, cornerCoords);
int n = UG_NS<coorddim>::Corner_Coordinates(target_, cornerCoords);
// compute the transformation onto the reference element (or vice versa?)
UG_NS<coorddim>::Transformation(corners(), cornerCoords, local, jIT);
UG_NS<coorddim>::Transformation(n, cornerCoords, local, jIT);
return jIT;
}
......@@ -162,10 +162,10 @@ jacobianTransposed (const FieldVector<typename GridImp::ctype, mydim>& local) co
// compile array of pointers to corner coordinates
// coorddim*coorddim is an upper bound for the number of vertices
UGCtype* cornerCoords[coorddim*coorddim];
UG_NS<coorddim>::Corner_Coordinates(target_, cornerCoords);
int n = UG_NS<coorddim>::Corner_Coordinates(target_, cornerCoords);
// compute the transformation onto the reference element (or vice versa?)
UG_NS<coorddim>::JacobianTransformation(corners(), cornerCoords, local, jac);
UG_NS<coorddim>::JacobianTransformation(n, cornerCoords, local, jac);
return jac;
}
......
......@@ -94,8 +94,8 @@ namespace Dune {
// coorddim*coorddim is an upper bound for the number of vertices
UGCtype* cornerCoords[coorddim*coorddim];
UG_NS<coorddim>::Corner_Coordinates(target_, cornerCoords);
return UG_NS<coorddim>::Area_Of_Element(corners(),
int n = UG_NS<coorddim>::Corner_Coordinates(target_, cornerCoords);
return UG_NS<coorddim>::Area_Of_Element(n,
const_cast<const double**>(cornerCoords));
}
......
......@@ -402,7 +402,7 @@ namespace Dune {
}
/** \brief Returns pointers to the coordinate arrays of a UG element */
static void Corner_Coordinates(const UG_NS< UG_DIM >::Element* theElement, double* x[]) {
static int Corner_Coordinates(const UG_NS< UG_DIM >::Element* theElement, double* x[]) {
using UG_NAMESPACE ::NODE;
using UG_NAMESPACE ::TRIANGLE;
using UG_NAMESPACE ::QUADRILATERAL;
......@@ -411,31 +411,36 @@ namespace Dune {
using UG_NAMESPACE ::PRISM;
using UG_NAMESPACE ::n_offset;
using UG::UINT;
int n DUNE_UNUSED;
int n;
CORNER_COORDINATES(theElement, n, x);
return n;
}
/** \brief Returns pointers to the coordinate arrays of a UG node */
static void Corner_Coordinates(const UG_NS< UG_DIM >::Node* theNode, double* x[]) {
static int Corner_Coordinates(const UG_NS< UG_DIM >::Node* theNode, double* x[]) {
x[0] = theNode->myvertex->iv.x;
return 1;
}
/** \brief Returns pointers to the coordinate arrays of a UG edge */
static void Corner_Coordinates(const UG_NS< UG_DIM >::Edge* theEdge, double* x[]) {
static int Corner_Coordinates(const UG_NS< UG_DIM >::Edge* theEdge, double* x[]) {
x[0] = theEdge->links[0].nbnode->myvertex->iv.x;
x[1] = theEdge->links[1].nbnode->myvertex->iv.x;
return 2;
}
/** \brief Returns pointers to the coordinate arrays of a UG vector */
static void Corner_Coordinates(const UG_NS< UG_DIM >::Vector* theVector, double* x[]) {
static int Corner_Coordinates(const UG_NS< UG_DIM >::Vector* theVector, double* x[]) {
UG_NS< UG_DIM >::Element* center;
unsigned int side;
UG_NS< UG_DIM >::GetElementAndSideFromSideVector(theVector, center, side);
for (int i = 0; i < Corners_Of_Side(center, side); i++)
int n = Corners_Of_Side(center, side);
for (int i = 0; i < n; i++)
{
unsigned idxInElem = Corner_Of_Side(center, side, i);
x[i] = Corner(center, idxInElem)->myvertex->iv.x;
}
return n;
}
static int GlobalToLocal(int n, const double** cornerCoords,
......
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