From: Daniel Sun Date: Tue, 5 Apr 2022 15:53:29 +0000 (+0800) Subject: fix: building problem with MPI on Windows system X-Git-Tag: v9.4.0-rc1~291^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98b1296a695e1c0ebf2ba66d907864e6a5327d6e;p=dealii.git fix: building problem with MPI on Windows system --- diff --git a/doc/news/changes/minor/20220426DanielSun b/doc/news/changes/minor/20220426DanielSun new file mode 100644 index 0000000000..344ecae05c --- /dev/null +++ b/doc/news/changes/minor/20220426DanielSun @@ -0,0 +1,5 @@ +Fixed: The building process now works well with MPI option on Windows system. +If configured properly, we can explore the capability of distributed computing +on Windows system within Deal.II framework. +
+(Daniel Sun, 2022/04/26) diff --git a/include/deal.II/fe/fe_tools_interpolate.templates.h b/include/deal.II/fe/fe_tools_interpolate.templates.h index cac9b99d74..fbdf6ff1b6 100644 --- a/include/deal.II/fe/fe_tools_interpolate.templates.h +++ b/include/deal.II/fe/fe_tools_interpolate.templates.h @@ -738,7 +738,7 @@ namespace FETools interpolation_difference(dof1, u1, dof2.get_fe(), u1_difference); else { - internal::interpolation_difference( + internal::interpolation_difference( dof1, constraints1, u1, dof2, constraints2, u1_difference); } } diff --git a/include/deal.II/grid/grid_tools.h b/include/deal.II/grid/grid_tools.h index 8bf837ebd7..2ac4cf141b 100644 --- a/include/deal.II/grid/grid_tools.h +++ b/include/deal.II/grid/grid_tools.h @@ -176,7 +176,12 @@ namespace GridTools volume(const Triangulation &tria, const Mapping & mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); /** * Return an approximation of the diameter of the smallest active cell of a @@ -194,7 +199,12 @@ namespace GridTools const Triangulation &triangulation, const Mapping & mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); /** * Return an approximation of the diameter of the largest active cell of a @@ -212,7 +222,12 @@ namespace GridTools const Triangulation &triangulation, const Mapping & mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); /** * Given a list of vertices (typically obtained using @@ -1243,7 +1258,12 @@ namespace GridTools const Triangulation &container, const Mapping & mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); /** * Find and return the index of the closest vertex to a given point in the @@ -2069,7 +2089,12 @@ namespace GridTools const Point & position, const Mapping & mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); /** * Compute a globally unique index for each vertex and hanging node @@ -4358,10 +4383,13 @@ namespace GridTools for (const auto ghost_owner : ghost_owners) neighbor_cell_list[ghost_owner] = {}; - process_cells([&](const auto &cell, const auto key) { + process_cells([&](const auto &cell, const auto key) -> void { if (cell_filter(cell)) - neighbor_cell_list[key].emplace_back( - cell->id().template to_binary()); + { + constexpr int spacedim = MeshType::space_dimension; + neighbor_cell_list[key].emplace_back( + cell->id().template to_binary()); + } }); Assert(ghost_owners.size() == neighbor_cell_list.size(), diff --git a/include/deal.II/grid/grid_tools_cache.h b/include/deal.II/grid/grid_tools_cache.h index 62db3395d1..f188fd791c 100644 --- a/include/deal.II/grid/grid_tools_cache.h +++ b/include/deal.II/grid/grid_tools_cache.h @@ -77,7 +77,12 @@ namespace GridTools Cache(const Triangulation &tria, const Mapping & mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); /** * Destructor. diff --git a/include/deal.II/numerics/vector_tools_constraints.h b/include/deal.II/numerics/vector_tools_constraints.h index ff7b6a7a3c..cb29094c8b 100644 --- a/include/deal.II/numerics/vector_tools_constraints.h +++ b/include/deal.II/numerics/vector_tools_constraints.h @@ -281,7 +281,12 @@ namespace VectorTools AffineConstraints & constraints, const Mapping &mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); /** * This function does the same as the @@ -304,7 +309,12 @@ namespace VectorTools AffineConstraints & constraints, const Mapping & mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); /** * Compute the constraints that correspond to boundary conditions of the @@ -333,7 +343,12 @@ namespace VectorTools AffineConstraints & constraints, const Mapping &mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); /** * Same as above for homogeneous tangential-flux constraints. @@ -352,7 +367,12 @@ namespace VectorTools AffineConstraints & constraints, const Mapping & mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); //@} } // namespace VectorTools diff --git a/include/deal.II/particles/generators.h b/include/deal.II/particles/generators.h index 5059bf415d..20dc792231 100644 --- a/include/deal.II/particles/generators.h +++ b/include/deal.II/particles/generators.h @@ -70,7 +70,12 @@ namespace Particles ParticleHandler & particle_handler, const Mapping & mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); /** * A function that generates one particle at a random location in cell @p cell and with @@ -109,7 +114,12 @@ namespace Particles std::mt19937 & random_number_generator, const Mapping &mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); /** * A function that generates one particle at a random location in cell @p cell and with @@ -126,7 +136,12 @@ namespace Particles ParticleHandler &particle_handler, const Mapping & mapping = (ReferenceCells::get_hypercube() - .template get_default_linear_mapping())); +#ifndef _MSC_VER + .template get_default_linear_mapping() +#else + .ReferenceCell::get_default_linear_mapping() +#endif + )); /** * A function that generates particles randomly in the domain with a @@ -182,7 +197,11 @@ namespace Particles ParticleHandler & particle_handler, const Mapping & mapping = (ReferenceCells::get_hypercube() +#ifndef _MSC_VER .template get_default_linear_mapping()), +#else + .ReferenceCell::get_default_linear_mapping()), +#endif const unsigned int random_number_seed = 5432); @@ -229,7 +248,11 @@ namespace Particles ParticleHandler &particle_handler, const Mapping & mapping = (ReferenceCells::get_hypercube() +#ifndef _MSC_VER .template get_default_linear_mapping()), +#else + .ReferenceCell::get_default_linear_mapping()), +#endif const ComponentMask & components = ComponentMask(), const std::vector> &properties = {});