Commit 18388a6f authored by Luca Bertagna's avatar Luca Bertagna
Browse files

removed a bunch of warnings: unused typedefs, deprecated methods, variables...

removed a bunch of warnings: unused typedefs, deprecated methods, variables used only in debug (in which case we use the LIFEV_UNUSED macro)
parent 302de6d6
......@@ -21,7 +21,6 @@ RegionMesh< typename RegionMesh<geoShape_Type>::facetShape_Type >* extractBoun
typedef RegionMesh<geoShape_Type> mesh_Type;
typedef typename mesh_Type::facetShape_Type facetShape_Type;
typedef typename mesh_Type::facet_Type facet_Type;
typedef typename mesh_Type::ridge_Type ridge_Type;
typedef RegionMesh<facetShape_Type> boundaryRegionMesh_Type;
//(1) Extract the list of faces with marker boundaryFaceMarker.
......
......@@ -337,8 +337,6 @@ updateFaceConnections ( const MeshType& mesh1, const markerID_Type& flag1 )
markerID_Type marker1;
typedef typename MeshType::FaceShape GeoBShape; // Shape of the faces
ID fcounter = 0; //! Face on the interface counter
//! Loop on boundary faces on mesh1
......
......@@ -879,7 +879,7 @@ ExporterVTK<MeshType>::readBinaryData ( const std::string& line, std::vector<Rea
std::stringstream decodedData, dataToBeDecoded;
dataToBeDecoded.str ("");
std::string decodedDataString;
UInt sizeOfFloat ( 0 ), sizeOfVector ( values.size() ), lengthOfRawData;
UInt sizeOfFloat ( 0 ), sizeOfVector ( values.size() );
switch ( numBits )
{
......@@ -896,8 +896,6 @@ ExporterVTK<MeshType>::readBinaryData ( const std::string& line, std::vector<Rea
break;
}
lengthOfRawData = sizeOfVector * sizeOfFloat + sizeof (int32_type);
// assign the block of char to a stringstream (to convert it into a string)
dataToBeDecoded.write ( line.c_str(), line.size() );
......@@ -906,8 +904,10 @@ ExporterVTK<MeshType>::readBinaryData ( const std::string& line, std::vector<Rea
decodedDataString = base64_decode ( dataToBeDecoded.str() );
decodedData.str ( decodedDataString );
#ifdef HAVE_LIFEV_DEBUG
UInt lengthOfRawData = sizeOfVector * sizeOfFloat + sizeof (int32_type);
ASSERT ( lengthOfRawData == decodedDataString.size(), "unexpected line length" );
#endif
// the first value in the string is the size of the subsequent bunch of data
int32_type* inputInt = new int32_type;
......
......@@ -335,6 +335,7 @@ readINRIAMeshFileHead ( std::ifstream& myStream,
}
}
LIFEV_UNUSED (idummy);
return true ;
}// Function readINRIAMeshFileHead
......
......@@ -276,6 +276,7 @@ readINRIAMeshFileHead ( std::ifstream& myStream,
}
}
LIFEV_UNUSED (idummy);
return true ;
}// Function readINRIAMeshFileHead
......
......@@ -210,7 +210,6 @@ void getVolumeFromFaces ( RegionMesh const& mesh,
vols[ 1 ] = 0.0;
vols[ 2 ] = 0.0;
typedef typename RegionMesh::facetShape_Type GeoBShape;
typedef typename RegionMesh::facet_Type facet_Type;
typedef boost::shared_ptr<CurrentFEManifold> current_fe_type;
current_fe_type bdfe;
......@@ -253,8 +252,6 @@ template <typename RegionMesh>
Real testClosedDomain ( RegionMesh const& mesh,
std::ostream& err = std::cerr )
{
typedef typename RegionMesh::facet_Type facet_Type;
typedef boost::shared_ptr<CurrentFEManifold> current_fe_type;
current_fe_type bdfe;
......
......@@ -1109,7 +1109,6 @@ fixBoundaryPoints ( MeshType& mesh, std::ostream& logStream = std::cout,
ASSERT_PRE ( mesh.numBFaces() > 0,
"The boundary faces list should not be empty" );
typedef typename MeshType::faces_Type faceContainer_Type;
typedef typename MeshType::facetShape_Type faceShape_Type;
if ( verbose )
......@@ -1211,7 +1210,6 @@ bool rearrangeFaces ( MeshType& mesh,
{
verbose = verbose && ( mesh.comm()->MyPID() == 0 );
typedef typename MeshType::faces_Type faceContainer_Type;
typedef typename MeshType::face_Type face_Type;
UInt point1Id, point2Id, point3Id, point4Id;
BareFace bareFace;
......@@ -1367,7 +1365,6 @@ bool fixBoundaryFaces ( MeshType& mesh,
temporaryFaceContainer_Type* externalFaceContainer = 0 )
{
verbose = verbose && ( mesh.comm()->MyPID() == 0 );
typedef typename MeshType::volumes_Type volumeContainer_Type;
typedef typename MeshType::volume_Type volume_Type;
typedef typename MeshType::faces_Type faceContainer_Type;
typedef typename MeshType::face_Type face_Type;
......@@ -1603,7 +1600,6 @@ bool buildFaces ( MeshType& mesh,
typename MeshType::elementShape_Type volumeShape;
typedef typename MeshType::volumes_Type volumeContainer_Type;
typedef typename MeshType::volume_Type volume_Type;
typedef typename MeshType::faces_Type faceContainer_Type;
typedef typename MeshType::face_Type face_Type;
volume_Type* volumePtr;
temporaryFaceContainer_Type* boundaryFaceContainerPtr;
......@@ -1968,13 +1964,9 @@ bool buildEdges ( MeshType& mesh,
temporaryEdgeContainer_Type* externalEdgeContainer = 0 )
{
verbose = verbose && ( mesh.comm()->MyPID() == 0 );
typedef typename MeshType::volumes_Type volumeContainer_Type;
typedef typename MeshType::faces_Type faceContainer_Type;
typedef typename MeshType::volume_Type volume_Type;
typedef typename MeshType::elementShape_Type volumeShape_Type;
typedef typename MeshType::edges_Type edges_Type;
typedef typename MeshType::edge_Type edge_Type;
typedef typename MeshType::face_Type face_Type;
typedef typename MeshType::facetShape_Type faceShape_Type;
typedef typename MeshType::edges_Type::iterator Edges_Iterator;
typename MeshType::face_Type* facePtr;
......@@ -2218,8 +2210,6 @@ p2MeshFromP1Data ( MeshType& mesh, std::ostream& logStream = std::cout )
typename MeshType::edge_Type* edgePtr = 0;
typename MeshType::volume_Type* elementPtr = 0;
typename MeshType::face_Type* facePtr = 0;
typedef typename MeshType::volumes_Type elementContainer_Type;
typedef typename MeshType::faces_Type faceContainer_Type;
MeshElementBareHandler<BareEdge> bareEdgeHandler;
std::pair<UInt, bool> edgeIdToBoolPair;
......
......@@ -133,10 +133,9 @@ void regularMesh2D ( MeshType& mesh,
const Real& t_y = 0.0 )
{
typedef MeshType mesh_Type;
typedef typename mesh_Type::geoShape_Type geoShape_Type;
ASSERT ( ( geoShape_Type::S_shape == TRIANGLE )
|| ( geoShape_Type::S_shape == QUAD ),
ASSERT ( ( mesh_Type::geoShape_Type::S_shape == TRIANGLE )
|| ( mesh_Type::geoShape_Type::S_shape == QUAD ),
"Type of 2d structured mesh not available." );
// discretization
......
......@@ -125,11 +125,8 @@ test_bdf::test_bdf (int argc, char** argv) :
// ===================================================
void test_bdf::run()
{
//Useful typedef
typedef SolverAztecOO solver_type;
typedef VectorEpetra vector_type;
typedef boost::shared_ptr<vector_type> vector_ptrtype;
// Reading from data file
GetPot dataFile (Members->data_file_name.c_str() );
......
......@@ -125,9 +125,7 @@ void test_bdf::run()
{
//Useful typedef
typedef SolverAztecOO solver_type;
typedef VectorEpetra vector_type;
typedef boost::shared_ptr<vector_type> vector_ptrtype;
// Reading from data file
GetPot dataFile (Members->data_file_name.c_str() );
......
......@@ -224,7 +224,7 @@ main ( int argc, char** argv )
{
std::cout << "Building the velocity FE space ... " << std::flush;
}
fespacePtr_Type uFESpace ( new fespace_Type ( meshPart, uOrder, geoDim, Comm ) );
fespacePtr_Type uFESpace ( new fespace_Type ( meshPart.meshPartition(), uOrder, geoDim, Comm ) );
if ( verbose )
{
std::cout << "ok." << std::endl;
......
......@@ -187,7 +187,7 @@ int main (int argc, char** argv)
{
std::cout << "Building the velocity FE space... " << std::flush;
}
feSpacePtr_Type uFESpacePtr ( new feSpace_Type (meshPart, uOrder, 3, comm) );
feSpacePtr_Type uFESpacePtr ( new feSpace_Type (meshPart.meshPartition(), uOrder, 3, comm) );
if (verbose)
{
std::cout << "ok." << std::endl;
......@@ -197,7 +197,7 @@ int main (int argc, char** argv)
{
std::cout << "Building the pressure FE space... " << std::flush;
}
feSpacePtr_Type pFESpacePtr ( new feSpace_Type (meshPart, pOrder, 1, comm) );
feSpacePtr_Type pFESpacePtr ( new feSpace_Type (meshPart.meshPartition(), pOrder, 1, comm) );
if (verbose)
{
std::cout << "ok." << std::endl;
......
......@@ -184,7 +184,7 @@ int main (int argc, char** argv)
{
std::cout << "Building the velocity FE space... " << std::flush;
}
feSpacePtr_Type uFESpacePtr ( new feSpace_Type (meshPart, uOrder, 3, comm) );
feSpacePtr_Type uFESpacePtr ( new feSpace_Type (meshPart.meshPartition(), uOrder, 3, comm) );
if (verbose)
{
std::cout << "ok." << std::endl;
......@@ -194,7 +194,7 @@ int main (int argc, char** argv)
{
std::cout << "Building the pressure FE space... " << std::flush;
}
feSpacePtr_Type pFESpacePtr ( new feSpace_Type (meshPart, pOrder, 1, comm) );
feSpacePtr_Type pFESpacePtr ( new feSpace_Type (meshPart.meshPartition(), pOrder, 1, comm) );
if (verbose)
{
std::cout << "ok." << std::endl;
......
Supports Markdown
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