Deal All,
I'm studying how to use gmsh.
So, I just revised step-6.cc to read the .msh format.
What I added in step-6.cc is as follows
template <int dim>
void Step6<dim>::run ()
{
for (unsigned int cycle=0; cycle<1; ++cycle)
{
std::cout << "Cycle " << cycle << ':' << std::endl;
if (cycle == 0)
{
GridIn<dim> grid_in;
grid_in.attach_triangulation(triangulation);
std::ifstream input_file("whole_mesh.msh");
grid_in.read_msh (input_file);
....
And, also I removed the part that is related manifold, just in case it causes some error.
Anyway,when I run it, the error messages is as follows...
[ 50%] Built target step-6
[100%] Run step-6 with Debug configuration
Cycle 0:
----------------------------------------------------
Exception on processing:
--------------------------------------------------------
An error occurred in line <773> of file </user2/hanks318/dealii/dealii-8.3.0/source/grid/grid_reordering.cc> in function
static void dealii::GridReordering<dim, spacedim>::invert_all_cells_of_negative_grid(const std::vector<dealii::Point<spacedim, double>, std::allocator<dealii::Point<spacedim, double> > >&, std::vector<dealii::CellData<dim>, std::allocator<dealii::CellData<dim> > >&) [with int dim = 2, int spacedim = 2]
The violated condition was:
n_negative_cells==0 || n_negative_cells==cells.size()
The name and call sequence of the exception was:
ExcMessage(std::string("This class assumes that either all cells have positive " "volume, or that all cells have been specified in an " "inverted vertex order so that their volume is negative. " "(In the latter case, this class automatically inverts " "every cell.) However, the mesh you have specified " "appears to have both cells with positive and cells with " "negative volume. You need to check your mesh which " "cells these are and how they got there.\n" "As a hint, of the total ") + Utilities::int_to_string (cells.size()) + " cells in the mesh, " + Utilities::int_to_string (n_negative_cells) + " appear to have a negative volume.")
Additional Information:
This class assumes that either all cells have positive volume, or that all cells have been specified in an inverted vertex order so that their volume is negative. (In the latter case, this class automatically inverts every cell.) However, the mesh you have specified appears to have both cells with positive and cells with negative volume. You need to check your mesh which cells these are and how they got there.
As a hint, of the total 6939 cells in the mesh, 3738 appear to have a negative volume.
--------------------------------------------------------
Aborting!
----------------------------------------------------
So, I checked 3738 cell in the whole_mesh.msh
I attach the picture for this cell. (cell3738.png)
But as you can see, the cell is not distorted.
To know the reason, I also did calculation only inside and outside respectively. (two results are attahced as outside_result.png and inside_result.png)
But, there is no problem at all in both calculations.
I don't know what the problem is.
Could you please help me?
Thank you.
Kyusik.