From 730373dafa0b9ce1fb53003a80ca120ee61026ec Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Mon, 18 Sep 2017 19:46:31 +0200 Subject: [PATCH] WB's comments. --- include/deal.II/grid/grid_in.h | 16 ++++++++++------ source/grid/grid_in.cc | 31 +++++++++---------------------- 2 files changed, 19 insertions(+), 28 deletions(-) diff --git a/include/deal.II/grid/grid_in.h b/include/deal.II/grid/grid_in.h index c848448d9b..f691328bc5 100644 --- a/include/deal.II/grid/grid_in.h +++ b/include/deal.II/grid/grid_in.h @@ -38,8 +38,12 @@ template struct CellData; * geometric (vertex locations) and topological (how vertices form cells, * faces, and edges) information is ignored, but the readers for the various * formats generally do read information that associates material ids or - * boundary ids to cells or faces (see @ref GlossMaterialId "this" and @ref - * GlossBoundaryIndicator "this" glossary entry for more information). + * boundary ids to cells or faces (see + * @ref GlossMaterialId "this" + * and + * @ref + * GlossBoundaryIndicator "this" + * glossary entry for more information). * * @note Since deal.II only supports line, quadrilateral and hexahedral * meshes, the functions in this class can only read meshes that consist @@ -476,10 +480,10 @@ public: * `ignore_unsupported_element_types`, all the other element types are simply * ignored by this algorithm. If your mesh contains a mixture of triangles * and quadrilaterals, for example, only the quadrilaterals will be - * extracted. Your mesh may not make any sense if you are mixing compatible - * and incompatible element types. If `ignore_unsupported_element_types` is - * set to `false`, then an exception is thrown when an unsupporte type is - * encountered. + * extracted. The resulting mesh (as represented in the Triangulation object) + * may not make any sense if you are mixing compatible and incompatible + * element types. If `ignore_unsupported_element_types` is set to `false`, + * then an exception is thrown when an unsupporte type is encountered. * * @param filename The file to read from * @param mesh_index Index of the mesh within the file diff --git a/source/grid/grid_in.cc b/source/grid/grid_in.cc index 85307b43ce..9b2bbca1a9 100644 --- a/source/grid/grid_in.cc +++ b/source/grid/grid_in.cc @@ -43,19 +43,6 @@ DEAL_II_DISABLE_EXTRA_DIAGNOSTICS #include // Post processing flags #pragma GCC diagnostic pop DEAL_II_ENABLE_EXTRA_DIAGNOSTICS - -#undef AI_CONFIG_PP_RVC_FLAGS -#define AI_CONFIG_PP_RVC_FLAGS \ - aiComponent_NORMALS | \ - aiComponent_TANGENTS_AND_BITANGENTS | \ - aiComponent_COLORS | \ - aiComponent_TEXCOORDS | \ - aiComponent_BONEWEIGHTS | \ - aiComponent_ANIMATIONS | \ - aiComponent_TEXTURES | \ - aiComponent_LIGHTS | \ - aiComponent_CAMERAS | \ - aiComponent_MATERIALS #endif @@ -2578,7 +2565,7 @@ void GridIn::read_assimp(const std::string &filename, // Only good for surface grids. AssertThrow(dim<3, ExcImpossibleInDim(dim)); - // Create an istance of the Importer class + // Create an instance of the Importer class Assimp::Importer importer; // And have it read the given file with some postprocessing @@ -2599,10 +2586,10 @@ void GridIn::read_assimp(const std::string &filename, (mesh_index < scene->mNumMeshes), ExcMessage("Too few meshes in the file.")); - int start_mesh = (mesh_index == numbers::invalid_unsigned_int ? - 0 : mesh_index); - int end_mesh = (mesh_index == numbers::invalid_unsigned_int ? - scene->mNumMeshes : mesh_index+1); + unsigned int start_mesh = (mesh_index == numbers::invalid_unsigned_int ? + 0 : mesh_index); + unsigned int end_mesh = (mesh_index == numbers::invalid_unsigned_int ? + scene->mNumMeshes : mesh_index+1); // Deal.II objects are created empty, and then filled with imported file. std::vector > vertices; @@ -2614,7 +2601,7 @@ void GridIn::read_assimp(const std::string &filename, unsigned int c_offset=0; // The index of the mesh will be used as a material index. - for (int m=start_mesh; mmMeshes[m]; @@ -2675,7 +2662,7 @@ void GridIn::read_assimp(const std::string &filename, } cells.resize(valid_cell); - // The vertices are added all at once. Cells are check for + // The vertices are added all at once. Cells are checked for // validity, so only valid_cells are now present in the deal.II // list of cells. v_offset += n_vertices; @@ -3000,7 +2987,7 @@ void GridIn::read (std::istream &in, case netcdf: Assert(false, ExcMessage("There is no read_netcdf(istream &) function. " - "Use the read_netcdf)(string &filename) " + "Use the read_netcdf(string &filename) " "functions, instead.")); return; @@ -3010,7 +2997,7 @@ void GridIn::read (std::istream &in, case assimp: Assert(false, ExcMessage("There is no read_assimp(istream &) function. " - "Use the read_netcdf)(string &filename, ...) " + "Use the read_assimp(string &filename, ...) " "functions, instead.")); return; -- 2.39.5