From: Martin Kronbichler Date: Wed, 11 Apr 2018 20:57:02 +0000 (+0200) Subject: Rename CellType -> GeometryType. X-Git-Tag: v9.0.0-rc1~194^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F6202%2Fhead;p=dealii.git Rename CellType -> GeometryType. --- diff --git a/include/deal.II/matrix_free/fe_evaluation.h b/include/deal.II/matrix_free/fe_evaluation.h index 8b6a6579fa..bf3155f9db 100644 --- a/include/deal.II/matrix_free/fe_evaluation.h +++ b/include/deal.II/matrix_free/fe_evaluation.h @@ -156,7 +156,7 @@ public: * considerable data compression), @p affine for cells with affine mappings, * and @p general for general cells without any compressed storage applied. */ - internal::MatrixFreeFunctions::CellType get_cell_type() const; + internal::MatrixFreeFunctions::GeometryType get_cell_type() const; /** * Return a reference to the ShapeInfo object currently in use. @@ -861,7 +861,7 @@ protected: * have different implications on how the Jacobian transformations are * stored internally in MappingInfo. */ - internal::MatrixFreeFunctions::CellType cell_type; + internal::MatrixFreeFunctions::GeometryType cell_type; /** * Debug information to track whether dof values have been initialized @@ -2480,7 +2480,7 @@ FEEvaluationBase template inline -internal::MatrixFreeFunctions::CellType +internal::MatrixFreeFunctions::GeometryType FEEvaluationBase::get_cell_type () const { Assert (cell != numbers::invalid_unsigned_int, ExcNotInitialized()); diff --git a/include/deal.II/matrix_free/mapping_info.h b/include/deal.II/matrix_free/mapping_info.h index 74da08ff99..e8121ed550 100644 --- a/include/deal.II/matrix_free/mapping_info.h +++ b/include/deal.II/matrix_free/mapping_info.h @@ -37,28 +37,28 @@ namespace internal namespace MatrixFreeFunctions { /** - * An enum to identify various types of cells. The most general type is - * what we typically compute in the FEValues context but for many + * An enum to identify various types of cells and faces. The most general + * type is what we typically compute in the FEValues context but for many * geometries we can save significant storage. */ - enum CellType : unsigned char + enum GeometryType : unsigned char { /** - * The cell is Cartesian. + * The cell or face is Cartesian. */ cartesian = 0, /** - * The cell may be described with an affine mapping. + * The cell or face can be described with an affine mapping. */ affine = 1, /** - * The current face is flat, i.e., the normal factor on a face is the - * same on all quadrature points. + * The face is flat, i.e., the normal factor on a face is the same on + * all quadrature points. This type is not assigned for cells. */ flat_faces = 2, /** * There is no special information available for compressing the - * representation of the cell. + * representation of the object under consideration. */ general = 3 }; @@ -297,7 +297,7 @@ namespace internal /** * Return the type of a given cell as detected during initialization. */ - CellType get_cell_type (const unsigned int cell_chunk_no) const; + GeometryType get_cell_type (const unsigned int cell_chunk_no) const; /** * Clear all data fields in this class. @@ -323,7 +323,7 @@ namespace internal * 3). Type 2 is only used for faces and no cells are assigned this * value. */ - std::vector cell_type; + std::vector cell_type; /** * Stores whether a face (and both cells adjacent to the face) is @@ -332,7 +332,7 @@ namespace internal * the same throughout the face (face type 2), or is general (face type * 3). */ - std::vector face_type; + std::vector face_type; /** * The data cache for the cells. @@ -460,7 +460,7 @@ namespace internal template inline - CellType + GeometryType MappingInfo::get_cell_type (const unsigned int cell_no) const { AssertIndexRange (cell_no, cell_type.size()); diff --git a/include/deal.II/matrix_free/mapping_info.templates.h b/include/deal.II/matrix_free/mapping_info.templates.h index f08e728baf..8bd1f58e5f 100644 --- a/include/deal.II/matrix_free/mapping_info.templates.h +++ b/include/deal.II/matrix_free/mapping_info.templates.h @@ -352,8 +352,8 @@ namespace internal void evaluate_on_cell (const dealii::Triangulation &tria, const std::pair *cells, const unsigned int my_q, - CellType &cell_t_prev, - CellType (&cell_t)[VectorizedArray::n_array_elements], + GeometryType &cell_t_prev, + GeometryType (&cell_t)[VectorizedArray::n_array_elements], dealii::FEValues &fe_val, LocalData &cell_data) { @@ -570,8 +570,8 @@ namespace internal // encodes the cell types of the current cell. Since several cells // must be considered together, this variable holds the individual // info of the last chunk of cells - CellType cell_t [VectorizedArray::n_array_elements]; - CellType cell_t_prev = general; + GeometryType cell_t [VectorizedArray::n_array_elements]; + GeometryType cell_t_prev = general; // fe_values object that is used to compute the mapping data. for // the hp case there might be more than one finite element. since we @@ -638,7 +638,7 @@ namespace internal // old cell type to invalid (otherwise, we might detect // similarity due to some cells further ahead) if (my_q > 0) - cell_t_prev = CellType(mapping_info.cell_type[cell]); + cell_t_prev = GeometryType(mapping_info.cell_type[cell]); else if (cell > cell_range.first && active_fe_index.size() > 0 && active_fe_index[cell] != active_fe_index[cell-1]) cell_t_prev = general; @@ -656,7 +656,7 @@ namespace internal { // find the most general cell type (most general type is 3 // (general cell)) - CellType most_general_type = cartesian; + GeometryType most_general_type = cartesian; for (unsigned int j=0; j::n_array_elements; ++j) if (cell_t[j] > most_general_type) most_general_type = cell_t[j]; @@ -856,7 +856,7 @@ namespace internal copy_data (const unsigned int first_cell, const std::array &data_shift, const std::vector &indices_compressed, - const std::vector &cell_type, + const std::vector &cell_type, MappingInfoStorage &data_cells_local, MappingInfoStorage &data_cells) { @@ -1075,8 +1075,8 @@ namespace internal std::size_t memory = MemoryConsumption::memory_consumption (cell_data); memory += MemoryConsumption::memory_consumption (face_data); - memory += cell_type.capacity()*sizeof(CellType); - memory += face_type.capacity()*sizeof(CellType); + memory += cell_type.capacity()*sizeof(GeometryType); + memory += face_type.capacity()*sizeof(GeometryType); memory += sizeof (*this); return memory; } @@ -1090,10 +1090,10 @@ namespace internal { out << " Cell types: "; task_info.print_memory_statistics - (out, cell_type.capacity()*sizeof(CellType)); + (out, cell_type.capacity()*sizeof(GeometryType)); out << " Face types: "; task_info.print_memory_statistics - (out, face_type.capacity()*sizeof(CellType)); + (out, face_type.capacity()*sizeof(GeometryType)); for (unsigned int j=0; j