Bruno,
I put this piece of code into your source file right after reading in the mesh:
|
for (const auto &cell : triangulation.active_cell_iterators())
for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
if (cell->face(f)->at_boundary())
std::cout << "cell=" << cell << ", face=" << f
<< ", boundary_id=" << cell->face(f)->boundary_id()
<< std::endl;
|
The output shows that all boundary faces have boundary ids between 1 and 8.
Of course you already know that from the error message. The question is how
these get there. I have to say that I don't understand the gmsh file format
version 4 -- it's quite complicated with the entities. But do you think you
could try to debug this problem by stepping into the GridIn and seeing where
and why the SubCellData objects are created that assign nonzero boundary_ids
to the boundary faces? The gmsh format 4 reader is new (just a few weeks) and
it would not be a surprise if it still had bugs in it. We would definitely
appreciate any help with this!
A good step would also be to create a smaller mesh that illustrates the issue.
The mesh you have has 400+ cells and 17 entities. It is difficult to read
through the mesh file and understand what each part does.
For all further work, the following, much-reduced program also shows the issue:
|
#include <deal.II/grid/tria.h>
#include <deal.II/grid/grid_in.h>
int main ()
{
using namespace dealii;
const unsigned int dim = 2;
Triangulation<2> triangulation;
GridIn<dim> grid_in;
grid_in.attach_triangulation (triangulation);
std::ifstream input_file("vonKarman.msh");
grid_in.read_msh(input_file);
for (const auto &cell : triangulation.active_cell_iterators())
for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
if (cell->face(f)->at_boundary())
std::cout << "cell=" << cell << ", face=" << f
<< ", boundary_id=" << cell->face(f)->boundary_id()
<< std::endl;
triangulation.set_all_manifold_ids_on_boundary(0,0);
}
|
Best
W.
> Line(4)={2,0};
>
> // Inner Circle
> Circle(5)={5,4,6};
> Circle(6)={6,4,7};
> Circle(7)={7,4,8};
> Circle(8)={8,4,5};
>
> LineLoop(1)={1,2,3,4};
> LineLoop(2)={5,6,7,8};
>
> // Creates the physical entities
> PhysicalLine(0)={5,6,7,8};
> PhysicalLine(1)={1};
> PhysicalLine(2)={2,4};
> PhysicalLine(3)={3};
>
> PlaneSurface(1)={1,2};
> PhysicalSurface(2)={1};
> RecombineSurface{1};
>
> |
>
>
> The DEALII lines regarding the manifold are :
> |
> grid_in.read_msh(input_file);
> Point<dim,double>circleCenter(1.0,0.5);
> staticconstSphericalManifold<dim>boundary(circleCenter);
> triangulation.set_all_manifold_ids_on_boundary(0,0);
> triangulation.set_manifold (0,boundary);
> |
>
> And the lines linked to the BC are :
> |
> emplate <intdim>
> voidSchurNavierStokesSolver<dim>::setup_dofs ()
> if(simulationCase_==TaylorCouette||simulationCase_==BackwardStep||simulationCase_==vonKarman)
> {
> VectorTools::interpolate_boundary_values(dof_handler,
> 1,
> ZeroFunction<dim>(dim+1),
> zero_constraints,
> fe.component_mask(velocities));
> }
>
> if(simulationCase_==vonKarman)
> {
> std::set<types::boundary_id>no_normal_flux_boundaries;
> no_normal_flux_boundaries.insert (2);
> VectorTools::compute_no_normal_flux_constraints (dof_handler,0,
>
> no_normal_flux_boundaries,
> zero_constraints
> );
> }
>
>
> }
> zero_constraints.close();
> std::cout <<" Number of active cells: "
> <<triangulation.n_active_cells()
> <<std::endl
> <<" Number of degrees of freedom: "
> <<dof_handler.n_dofs()
> <<" ("<<dof_u <<'+'<<dof_p <<')'
> <<std::endl;
>
> }
>
> |
>
>
> --
> The deal.II project is located at
http://www.dealii.org/
> For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
dealii+un...@googlegroups.com
> <mailto:
dealii+un...@googlegroups.com>.
> For more options, visit
https://groups.google.com/d/optout.
--
------------------------------------------------------------------------
Wolfgang Bangerth email:
bang...@colostate.edu
www:
http://www.math.colostate.edu/~bangerth/