From eae8c5473655dff241351c54957a91cad301bd87 Mon Sep 17 00:00:00 2001 From: bangerth Date: Tue, 9 Nov 2010 17:22:36 +0000 Subject: [PATCH] More in the same direction. git-svn-id: https://svn.dealii.org/trunk@22652 0785d39b-7218-0410-832d-ea1e28bc413d --- ...t.cc => grid_refinement.all_dimensions.cc} | 0 deal.II/source/grid/grid_refinement.inst.in | 2 +- ...g.cc => grid_reordering.all_dimensions.cc} | 268 +++++++++--------- ..._tools.cc => grid_tools.all_dimensions.cc} | 172 +---------- deal.II/source/grid/grid_tools.inst.in | 165 ++++++++++- ...map.cc => intergrid_map.all_dimensions.cc} | 0 deal.II/source/grid/intergrid_map.inst.in | 4 +- 7 files changed, 296 insertions(+), 315 deletions(-) rename deal.II/source/grid/{grid_refinement.cc => grid_refinement.all_dimensions.cc} (100%) rename deal.II/source/grid/{grid_reordering.cc => grid_reordering.all_dimensions.cc} (95%) rename deal.II/source/grid/{grid_tools.cc => grid_tools.all_dimensions.cc} (91%) rename deal.II/source/grid/{intergrid_map.cc => intergrid_map.all_dimensions.cc} (100%) diff --git a/deal.II/source/grid/grid_refinement.cc b/deal.II/source/grid/grid_refinement.all_dimensions.cc similarity index 100% rename from deal.II/source/grid/grid_refinement.cc rename to deal.II/source/grid/grid_refinement.all_dimensions.cc diff --git a/deal.II/source/grid/grid_refinement.inst.in b/deal.II/source/grid/grid_refinement.inst.in index d4619e799d..61a4503643 100644 --- a/deal.II/source/grid/grid_refinement.inst.in +++ b/deal.II/source/grid/grid_refinement.inst.in @@ -13,7 +13,7 @@ -for (S : REAL_SCALARS) +for (S : REAL_SCALARS; deal_II_dimension : DIMENSIONS) { template void diff --git a/deal.II/source/grid/grid_reordering.cc b/deal.II/source/grid/grid_reordering.all_dimensions.cc similarity index 95% rename from deal.II/source/grid/grid_reordering.cc rename to deal.II/source/grid/grid_reordering.all_dimensions.cc index ac74fcb43d..6b47bba43f 100644 --- a/deal.II/source/grid/grid_reordering.cc +++ b/deal.II/source/grid/grid_reordering.all_dimensions.cc @@ -1,8 +1,8 @@ //--------------------------------------------------------------------------- // grid_reordering.cc,v 1.27 2002/05/28 07:43:22 wolf Exp -// Version: +// Version: // -// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 by the deal.II authors +// Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -24,8 +24,6 @@ DEAL_II_NAMESPACE_OPEN -#if deal_II_dimension == 1 - template<> void GridReordering<1>::reorder_cells (std::vector > &) @@ -60,24 +58,19 @@ GridReordering<1,2>::invert_all_cells_of_negative_grid(const std::vector > &cells) { @@ -147,7 +140,7 @@ namespace internal // return true return true; } - + struct MSide::SideRectify : public std::unary_function @@ -156,7 +149,7 @@ namespace internal { if (s.v0>s.v1) std::swap (s.v0, s.v1); - } + } }; @@ -194,7 +187,7 @@ namespace internal return s1vmax, std::vector, MQuad> @@ -303,11 +296,11 @@ namespace internal MSide::SideSortLess() )), q); } - + }; - + void GridReordering::reorient(std::vector > &quads) { @@ -320,38 +313,38 @@ namespace internal void GridReordering::build_graph (const std::vector > &inquads) { - //Reserve some space + //Reserve some space sides.reserve(4*inquads.size()); mquads.reserve(inquads.size()); - + //Insert all the sides into the side vector for (int i = 0;i<4;++i) { std::transform(inquads.begin(),inquads.end(), std::back_inserter(sides), std::bind2nd(QuadSide(),i)); } - + //Change each edge so that v0(sides).swap(sides); - + //Assigns the correct sides to //each quads std::transform(inquads.begin(),inquads.end(), std::back_inserter(mquads), std::bind2nd(MQuad::MakeQuad(),sides) ); - + // Assign the quads to their sides also. int qctr = 0; for (std::vector::iterator it = mquads.begin(); it != mquads.end(); ++it) @@ -414,9 +407,9 @@ namespace internal MQuad &quad = mquads[quadnum]; int op_side_l = (localsidenum+2)%4; MSide &side = sides[mquads[quadnum].side[localsidenum]]; - const MSide &op_side = sides[mquads[quadnum].side[op_side_l]]; - - //is the opposite side oriented? + const MSide &op_side = sides[mquads[quadnum].side[op_side_l]]; + + //is the opposite side oriented? if (op_side.Oriented) { //YES - Make the orientations match @@ -437,11 +430,11 @@ namespace internal else { //NO - //Just use the default orientation + //Just use the default orientation side.v0 = quad.v[ConnectGlobals::DefaultOrientation[localsidenum][0]]; side.v1 = quad.v[ConnectGlobals::DefaultOrientation[localsidenum][1]]; } - side.Oriented = true; + side.Oriented = true; } @@ -453,7 +446,7 @@ namespace internal (sides[mquads[quadnum].side[0]].Oriented)&& (sides[mquads[quadnum].side[1]].Oriented)&& (sides[mquads[quadnum].side[2]].Oriented)&& - (sides[mquads[quadnum].side[3]].Oriented) + (sides[mquads[quadnum].side[3]].Oriented) ); } @@ -525,13 +518,13 @@ namespace internal opquad = s.Q0; lsn = s.lsn0; } - + if (opquad != numbers::invalid_unsigned_int) { qnum = opquad; return true; } - + return false; } @@ -549,8 +542,8 @@ namespace internal // might have changed in the // process of rotating things CellData<2> q = mquads[qn].original_cell_data; - - // Are the sides oriented? + + // Are the sides oriented? Assert (is_fully_oriented_quad(qn), ExcInternalError()); bool s[4]; //whether side 1 ,2, 3, 4 are in the default orientation for (int sn = 0;sn<4;sn++) @@ -576,7 +569,7 @@ namespace internal GridReordering::is_side_default_oriented (const unsigned int qnum, const unsigned int lsn) const { - return (sides[mquads[qnum].side[lsn]].v0 == + return (sides[mquads[qnum].side[lsn]].v0 == mquads[qnum].v[ConnectGlobals::DefaultOrientation[lsn][0]]); } } // namespace GridReordering2d @@ -595,7 +588,7 @@ GridReordering<2>::reorder_cells (std::vector > &original_cells) // reordering if (internal::GridReordering2d::is_consistent (original_cells)) return; - + internal::GridReordering2d::GridReordering().reorient(original_cells); } @@ -606,6 +599,8 @@ GridReordering<2,3>::reorder_cells (std::vector > &original_cells) { GridReordering<2>::reorder_cells(original_cells); } + + template<> void GridReordering<2>::invert_all_cells_of_negative_grid(const std::vector > &all_vertices, @@ -624,7 +619,7 @@ GridReordering<2>::invert_all_cells_of_negative_grid(const std::vector { ++n_negative_cells; std::swap(cells[cell_no].vertices[1], cells[cell_no].vertices[3]); - + // check whether the // resulting cell is now ok. // if not, then the grid is @@ -637,7 +632,7 @@ GridReordering<2>::invert_all_cells_of_negative_grid(const std::vector ExcInternalError()); } } - + // We assume that all cells of a grid have // either positive or negative volumes but // not both mixed. Although above reordering @@ -648,6 +643,7 @@ GridReordering<2>::invert_all_cells_of_negative_grid(const std::vector } + template<> void GridReordering<2,3>::invert_all_cells_of_negative_grid(const std::vector > &, @@ -656,11 +652,8 @@ GridReordering<2,3>::invert_all_cells_of_negative_grid(const std::vector::lines_per_cell; ++i) { edges[i] = numbers::invalid_unsigned_int; local_orientation_flags[i] = forward_edge; } - + for (unsigned int i=0; i::vertices_per_cell; ++i) nodes[i] = numbers::invalid_unsigned_int; - + waiting_to_be_processed = false; } @@ -825,7 +818,7 @@ namespace internal std::copy (&incubes[i].vertices[0], &incubes[i].vertices[GeometryInfo<3>::vertices_per_cell], &the_cell.nodes[0]); - + cell_list.push_back(the_cell); } @@ -833,9 +826,9 @@ namespace internal // connectivity build_connectivity (); } - - + + void Mesh::sanity_check () const { @@ -857,7 +850,7 @@ namespace internal // Get the Local Node Numbers // of the incoming edges const unsigned int e0 = ElementInfo::edge_to_node[local_node_num][0]; - const unsigned int e1 = ElementInfo::edge_to_node[local_node_num][1]; + const unsigned int e1 = ElementInfo::edge_to_node[local_node_num][1]; const unsigned int e2 = ElementInfo::edge_to_node[local_node_num][2]; // Global Edge Numbers @@ -885,7 +878,7 @@ namespace internal edge_list[ge2].nodes[or2 == forward_edge ? 0 : 1]), ExcMessage ("This message does not satisfy the internal " "consistency check")); - } + } @@ -893,7 +886,7 @@ namespace internal void Mesh::build_connectivity () { const unsigned int n_cells = cell_list.size(); - + unsigned int n_edges = 0; // Correctly build the edge // list @@ -903,8 +896,8 @@ namespace internal // with a given CheapEdge std::map edge_map; unsigned int ctr = 0; - for (unsigned int cur_cell_id = 0; - cur_cell_id edge_count(n_edges,0); - + // Count every time an edge // occurs in a cube. @@ -982,7 +975,7 @@ namespace internal for (unsigned int cur_edge_id=0; cur_edge_id > &outcubes) const + Mesh::export_to_deal_format (std::vector > &outcubes) const { Assert (outcubes.size() == cell_list.size(), ExcInternalError()); @@ -1016,26 +1009,26 @@ namespace internal &cell_list[i].nodes[GeometryInfo<3>::vertices_per_cell], &outcubes[i].vertices[0]); } - - + + Orienter::Orienter (const std::vector > &incubes) : mesh (incubes), cur_posn (0), marker_cube (0), cur_edge_group (0) - { + { for (unsigned int i = 0; i<12; ++i) edge_orient_array[i] = false; } - + bool Orienter::orient_mesh (std::vector > &incubes) { Orienter orienter (incubes); - + // First check that the mesh is // sensible orienter.mesh.sanity_check (); @@ -1052,7 +1045,7 @@ namespace internal // have to turn the cubes so they // match the edge orientation. orienter.orient_cubes (); - + // Copy the elements from our // internal structure back into // their original location. @@ -1095,7 +1088,7 @@ namespace internal // contradiction if (!cell_is_consistent(cur_posn)) return false; - + // If we needed to // orient any edges // in the current @@ -1115,7 +1108,7 @@ namespace internal } - + bool Orienter::get_next_unoriented_cube () { // The last cube in the list @@ -1134,7 +1127,7 @@ namespace internal } - + bool Orienter::is_oriented (const unsigned int cell_num) const { for (unsigned int i=0; i<12; ++i) @@ -1145,13 +1138,13 @@ namespace internal } - + bool Orienter::cell_is_consistent(const unsigned int cell_num) const { const Cell& c = mesh.cell_list[cell_num]; - + // Checks that all oriented // edges in the group are // oriented consistently. @@ -1175,7 +1168,7 @@ namespace internal unoriented_edge)) { const EdgeOrientation this_edge_direction - = (c.local_orientation_flags[i] + = (c.local_orientation_flags[i] == mesh.edge_list[c.edges[i]].orientation_flag ? forward_edge : backward_edge); @@ -1184,7 +1177,7 @@ namespace internal // edge before, // then store its // value: - if (value == unoriented_edge) + if (value == unoriented_edge) value = this_edge_direction; else // If we have @@ -1203,25 +1196,25 @@ namespace internal } - + bool Orienter::orient_next_unoriented_edge () { cur_posn = marker_cube; const Cell& c = mesh.cell_list[cur_posn]; unsigned int edge = 0; - + // search for the unoriented // side while ((edge<12) && (mesh.edge_list[c.edges[edge]].orientation_flag != unoriented_edge)) ++edge; - + // if we found none then return // false if (edge == 12) return false; - + // Which edge group we're in. const unsigned int edge_group = edge/4; @@ -1243,7 +1236,7 @@ namespace internal = c.local_orientation_flags[edge]; mesh.edge_list[c.edges[edge]].group = cur_edge_group; - // Remember that we have oriented + // Remember that we have oriented // this edge in the current cell. edge_orient_array[edge] = true; @@ -1251,23 +1244,23 @@ namespace internal } - + bool Orienter::orient_edges_in_current_cube () { for (unsigned int edge_group=0; edge_group<3; ++edge_group) if (orient_edge_set_in_current_cube(edge_group) == true) return true; - + return false; } - + bool Orienter::orient_edge_set_in_current_cube (const unsigned int n) { const Cell& c = mesh.cell_list[cur_posn]; - + // Check if any edge is // oriented unsigned int n_oriented = 0; @@ -1311,42 +1304,42 @@ namespace internal for (unsigned int i=4*n; i<4*(n+1); ++i, cur_flag<<=1) if ((edge_flags & cur_flag) != 0) { - mesh.edge_list[c.edges[i]].orientation_flag + mesh.edge_list[c.edges[i]].orientation_flag = (c.local_orientation_flags[i] == glorient ? forward_edge : backward_edge); - + mesh.edge_list[c.edges[i]].group = cur_edge_group; - // Remember that we have oriented + // Remember that we have oriented // this edge in the current cell. edge_orient_array[i] = true; } - + return true; } - + void Orienter::get_adjacent_cubes () { const Cell &c = mesh.cell_list[cur_posn]; for (unsigned int e=0; e<12; ++e) - // Only need to add the adjacent - // cubes for edges we recently + // Only need to add the adjacent + // cubes for edges we recently // oriented if (edge_orient_array[e] == true) { const Edge & the_edge = mesh.edge_list[c.edges[e]]; - for (unsigned int local_cube_num = 0; + for (unsigned int local_cube_num = 0; local_cube_num < the_edge.neighboring_cubes.size(); ++local_cube_num) { const unsigned int global_cell_num = the_edge.neighboring_cubes[local_cube_num]; Cell &ncell = mesh.cell_list[global_cell_num]; - - // If the cell is waiting to be - // processed we dont want to add - // it to the list a second time. + + // If the cell is waiting to be + // processed we dont want to add + // it to the list a second time. if (!ncell.waiting_to_be_processed) { sheet_to_process.push_back(global_cell_num); @@ -1354,15 +1347,15 @@ namespace internal } } } - // we're done with this cube so + // we're done with this cube so // clear its processing flags. for (unsigned int e=0; e<12; ++e) edge_orient_array[e] = false; - + } - + bool Orienter::get_next_active_cube () { // Mark the curent Cube as @@ -1378,12 +1371,12 @@ namespace internal return false; } - + void Orienter::orient_cubes () { // We assume that the mesh has // all edges oriented already. - + // This is a list of // permutations that take node // 0 to node i but only rotate @@ -1402,7 +1395,7 @@ namespace internal {6,5,4,7,2,1,0,3}, {7,6,5,4,3,2,1,0} }; - + // So now we need to work out // which node needs to be // mapped to the zero node. @@ -1413,7 +1406,7 @@ namespace internal for (unsigned int i=0; i void GridReordering<3>::reorder_cells (std::vector > &incubes) @@ -1513,7 +1507,7 @@ GridReordering<3>::reorder_cells (std::vector > &incubes) // create a backup to use if GridReordering // was not successful std::vector > backup=incubes; - + // This does the real work bool success= internal::GridReordering3d::Orienter::orient_mesh (incubes); @@ -1527,6 +1521,7 @@ GridReordering<3>::reorder_cells (std::vector > &incubes) } + template<> void GridReordering<3>::invert_all_cells_of_negative_grid( @@ -1548,7 +1543,7 @@ GridReordering<3>::invert_all_cells_of_negative_grid( // reorder vertices: swap front and back face for (unsigned int i=0; i<4; ++i) std::swap(cells[cell_no].vertices[i], cells[cell_no].vertices[i+4]); - + // check whether the // resulting cell is now ok. // if not, then the grid is @@ -1561,7 +1556,7 @@ GridReordering<3>::invert_all_cells_of_negative_grid( ExcInternalError()); } } - + // We assume that all cells of a // grid have either positive or // negative volumes but not both @@ -1574,10 +1569,5 @@ GridReordering<3>::invert_all_cells_of_negative_grid( } - - - -#endif // deal_II_dimension == 3 - DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/grid/grid_tools.cc b/deal.II/source/grid/grid_tools.all_dimensions.cc similarity index 91% rename from deal.II/source/grid/grid_tools.cc rename to deal.II/source/grid/grid_tools.all_dimensions.cc index 20693f412d..1cd240ce10 100644 --- a/deal.II/source/grid/grid_tools.cc +++ b/deal.II/source/grid/grid_tools.all_dimensions.cc @@ -56,7 +56,6 @@ namespace } } -#if deal_II_dimension != 1 template double @@ -109,7 +108,6 @@ GridTools::diameter (const Triangulation &tria) } -#else double GridTools::diameter (const Triangulation<1> &tria) @@ -126,16 +124,12 @@ GridTools::diameter (const Triangulation<1> &tria) return std::sqrt((leftmost->vertex(0) - rightmost->vertex(1)).square()); } -#endif - - -#if deal_II_dimension == 3 template <> double GridTools::cell_measure<3>(const std::vector > &all_vertices, - const unsigned int (&vertex_indices)[GeometryInfo<3>::vertices_per_cell]) + const unsigned int (&vertex_indices)[GeometryInfo<3>::vertices_per_cell]) { // note that this is the // cell_measure based on the new @@ -250,9 +244,6 @@ GridTools::cell_measure<3>(const std::vector > &all_vertices, return (t34+t64+t95+t125+t156+t181+t207+t228)/12.; } -#endif - -#if deal_II_dimension == 2 template <> @@ -310,7 +301,7 @@ GridTools::cell_measure(const std::vector > &all_vertices, } -#endif + template @@ -474,7 +465,6 @@ GridTools::delete_duplicated_vertices (std::vector > &vertice // the following class is only // needed in 2d, so avoid trouble // with compilers warning otherwise -#if deal_II_dimension == 2 class Rotate2d { public: @@ -490,7 +480,6 @@ GridTools::delete_duplicated_vertices (std::vector > &vertice private: const double angle; }; -#endif template @@ -524,7 +513,6 @@ GridTools::shift (const Point &shift_vector, } -#if deal_II_dimension == 2 void GridTools::rotate (const double angle, @@ -537,7 +525,6 @@ GridTools::rotate (const double angle, #endif } -#endif template @@ -1764,7 +1751,6 @@ namespace internal } -#if deal_II_dimension == 1 template void fix_up_faces (const typename dealii::Triangulation<1,spacedim>::cell_iterator &, internal::int2type<1>, @@ -1782,7 +1768,6 @@ namespace internal // nothing to do for the faces of // cells in 1d } -#endif } } } @@ -1828,160 +1813,7 @@ fix_up_distorted_child_cells (const typename Triangulation::Distor // explicit instantiations - -#if deal_II_dimension != 1 -template -double -GridTools::diameter (const Triangulation &); -#endif - -#if deal_II_dimension == 2 -template -double -GridTools::diameter (const Triangulation &); -#endif - -template -void GridTools::delete_unused_vertices (std::vector > &, - std::vector > &, - SubCellData &); - -template -void GridTools::delete_duplicated_vertices (std::vector > &, - std::vector > &, - SubCellData &, - std::vector &, - double); - -template -void GridTools::shift (const Point &, - Triangulation &); - -template -void GridTools::scale (const double, - Triangulation &); - -template -std::pair::active_cell_iterator, Point > -GridTools::find_active_cell_around_point (const hp::MappingCollection &, - const hp::DoFHandler &, - const Point &); - -template -void -GridTools:: -get_face_connectivity_of_cells (const Triangulation &triangulation, - SparsityPattern &cell_connectivity); - -#if deal_II_dimension < 3 -template -void -GridTools:: -get_face_connectivity_of_cells (const Triangulation &triangulation, - SparsityPattern &cell_connectivity); -#endif - -template -void -GridTools::partition_triangulation (const unsigned int, - Triangulation &); - -template -void -GridTools::partition_triangulation (const unsigned int, - const SparsityPattern &, - Triangulation &); - -template -void -GridTools:: -get_subdomain_association (const Triangulation &, - std::vector &); - -template -unsigned int -GridTools:: -count_cells_with_subdomain_association (const Triangulation &, - const types::subdomain_id_t); - - -template -double -GridTools::minimal_cell_diameter (const Triangulation &triangulation); - -template -double -GridTools::maximal_cell_diameter (const Triangulation &triangulation); - -template -void -GridTools::create_union_triangulation (const Triangulation &triangulation_1, - const Triangulation &triangulation_2, - Triangulation &result); - -template -Triangulation::DistortedCellList -GridTools:: -fix_up_distorted_child_cells (const Triangulation::DistortedCellList &distorted_cells, - Triangulation &triangulation); - - - -#if deal_II_dimension != 3 - -template -void GridTools::delete_unused_vertices (std::vector > &, - std::vector > &, - SubCellData &); - -template -void GridTools::delete_duplicated_vertices (std::vector > &, - std::vector > &, - SubCellData &, - std::vector &, - double); - -template -void GridTools::shift (const Point &, - Triangulation &); - -template -void GridTools::scale (const double, - Triangulation &); - - -#endif - - #include "grid_tools.inst" -#if deal_II_dimension < 3 - -template - std::list::cell_iterator, Triangulation::cell_iterator> > - GridTools:: - get_finest_common_cells (const Triangulation &mesh_1, - const Triangulation &mesh_2); - -template - std::list::cell_iterator, DoFHandler::cell_iterator> > - GridTools:: - get_finest_common_cells (const DoFHandler &mesh_1, - const DoFHandler &mesh_2); - -template - std::list::cell_iterator, hp::DoFHandler::cell_iterator> > - GridTools:: - get_finest_common_cells (const hp::DoFHandler &mesh_1, - const hp::DoFHandler &mesh_2); - -template - std::list::cell_iterator, MGDoFHandler::cell_iterator> > - GridTools:: - get_finest_common_cells (const MGDoFHandler &mesh_1, - const MGDoFHandler &mesh_2); - -#endif - DEAL_II_NAMESPACE_CLOSE diff --git a/deal.II/source/grid/grid_tools.inst.in b/deal.II/source/grid/grid_tools.inst.in index a22a94ba74..0a1cc0795d 100644 --- a/deal.II/source/grid/grid_tools.inst.in +++ b/deal.II/source/grid/grid_tools.inst.in @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 by the deal.II authors +// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -13,7 +13,7 @@ -for (X : TRIANGULATION_AND_DOFHANDLERS) +for (X : TRIANGULATION_AND_DOFHANDLERS; deal_II_dimension : DIMENSIONS) { template unsigned int @@ -46,5 +46,164 @@ for (X : TRIANGULATION_AND_DOFHANDLERS) template bool GridTools::have_same_coarse_mesh (const X &mesh_1, - const X &mesh_2); + const X &mesh_2); } + + +for (deal_II_dimension : DIMENSIONS) + { + +#if deal_II_dimension != 1 + template + double + GridTools::diameter (const Triangulation &); +#endif + +#if deal_II_dimension == 2 + template + double + GridTools::diameter (const Triangulation &); +#endif + + template + void GridTools::delete_unused_vertices (std::vector > &, + std::vector > &, + SubCellData &); + + template + void GridTools::delete_duplicated_vertices (std::vector > &, + std::vector > &, + SubCellData &, + std::vector &, + double); + + template + void GridTools::shift (const Point &, + Triangulation &); + + template + void GridTools::scale (const double, + Triangulation &); + + template + std::pair::active_cell_iterator, Point > + GridTools::find_active_cell_around_point (const hp::MappingCollection &, + const hp::DoFHandler &, + const Point &); + + template + void + GridTools:: + get_face_connectivity_of_cells (const Triangulation &triangulation, + SparsityPattern &cell_connectivity); + +#if deal_II_dimension < 3 + template + void + GridTools:: + get_face_connectivity_of_cells (const Triangulation &triangulation, + SparsityPattern &cell_connectivity); +#endif + + template + void + GridTools::partition_triangulation (const unsigned int, + Triangulation &); + + template + void + GridTools::partition_triangulation (const unsigned int, + const SparsityPattern &, + Triangulation &); + + template + void + GridTools:: + get_subdomain_association (const Triangulation &, + std::vector &); + + template + unsigned int + GridTools:: + count_cells_with_subdomain_association (const Triangulation &, + const types::subdomain_id_t); + + + template + double + GridTools::minimal_cell_diameter (const Triangulation &triangulation); + + template + double + GridTools::maximal_cell_diameter (const Triangulation &triangulation); + + template + void + GridTools::create_union_triangulation (const Triangulation &triangulation_1, + const Triangulation &triangulation_2, + Triangulation &result); + + template + Triangulation::DistortedCellList + GridTools:: + fix_up_distorted_child_cells (const Triangulation::DistortedCellList &distorted_cells, + Triangulation &triangulation); + + + +#if deal_II_dimension != 3 + + template + void GridTools::delete_unused_vertices (std::vector > &, + std::vector > &, + SubCellData &); + + template + void GridTools::delete_duplicated_vertices (std::vector > &, + std::vector > &, + SubCellData &, + std::vector &, + double); + + template + void GridTools::shift (const Point &, + Triangulation &); + + template + void GridTools::scale (const double, + Triangulation &); + + +#endif + + + +#if deal_II_dimension < 3 + + template + std::list::cell_iterator, Triangulation::cell_iterator> > + GridTools:: + get_finest_common_cells (const Triangulation &mesh_1, + const Triangulation &mesh_2); + + template + std::list::cell_iterator, DoFHandler::cell_iterator> > + GridTools:: + get_finest_common_cells (const DoFHandler &mesh_1, + const DoFHandler &mesh_2); + + template + std::list::cell_iterator, hp::DoFHandler::cell_iterator> > + GridTools:: + get_finest_common_cells (const hp::DoFHandler &mesh_1, + const hp::DoFHandler &mesh_2); + + template + std::list::cell_iterator, MGDoFHandler::cell_iterator> > + GridTools:: + get_finest_common_cells (const MGDoFHandler &mesh_1, + const MGDoFHandler &mesh_2); + +#endif + } + diff --git a/deal.II/source/grid/intergrid_map.cc b/deal.II/source/grid/intergrid_map.all_dimensions.cc similarity index 100% rename from deal.II/source/grid/intergrid_map.cc rename to deal.II/source/grid/intergrid_map.all_dimensions.cc diff --git a/deal.II/source/grid/intergrid_map.inst.in b/deal.II/source/grid/intergrid_map.inst.in index dc48d3ce4f..fec730fd1d 100644 --- a/deal.II/source/grid/intergrid_map.inst.in +++ b/deal.II/source/grid/intergrid_map.inst.in @@ -2,7 +2,7 @@ // $Id$ // Version: $Name$ // -// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 by the deal.II authors +// Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -13,7 +13,7 @@ -for (X : TRIANGULATION_AND_DOFHANDLERS) +for (X : TRIANGULATION_AND_DOFHANDLERS; deal_II_dimension : DIMENSIONS) { template class InterGridMap; } -- 2.39.5