diff --git a/Common/OpenFile.cpp b/Common/OpenFile.cpp index 8aef3223a79a70223d0507ad96880a68fd64fb6f..e21234a9da6d49578fad16578adbdd73d0388974 100644 --- a/Common/OpenFile.cpp +++ b/Common/OpenFile.cpp @@ -360,7 +360,7 @@ int MergeFile(const char *name, int warn_if_missing) CTX.geom.draw = 1; if(!strncmp(header, "$PTS", 4) || !strncmp(header, "$NO", 3) || !strncmp(header, "$PARA", 5) || !strncmp(header, "$ELM", 4) || - !strncmp(header, "$MeshFormat", 11)) { + !strncmp(header, "$MeshFormat", 11) || !strncmp(header, "$Comments", 9)) { status = model->readMSH(name); #if !defined(HAVE_NO_POST) if(status > 1) status = PView::readMSH(name); diff --git a/doc/texinfo/gmsh.texi b/doc/texinfo/gmsh.texi index 67d0b1b7f4c5b2e684383e76bd81e92e8953de62..4a51d96704d3f1c92413d0dc2bf850170d03ac32 100644 --- a/doc/texinfo/gmsh.texi +++ b/doc/texinfo/gmsh.texi @@ -549,8 +549,8 @@ preceding rule. @findex /*, */ @findex // -All parsed input files (@file{.geo}, @file{.pos}) support both C and C++ -style comments: +All parsed input files (@file{.geo}) support both C and C++ style +comments: @enumerate @item @@ -563,9 +563,10 @@ These commands won't have the described effects inside double quotes or inside keywords. Also note that `white space' (spaces, tabs, new line characters) is ignored inside all expressions. -You can add comments in a mesh file (@file{.msh}) by creating a section -with an unrecognized label (e.g. @code{$Comments}/@code{$EndComments}): -see @ref{MSH ASCII file format}. +You can add comments in a mesh file (@file{.msh}) by adding a section +with an unrecognized label (e.g., @code{$Comments}/@code{$EndComments}) +after the @code{$MeshFormat}/@code{$EndMeshFormat} section: see @ref{MSH +ASCII file format}. @c ========================================================================= @c General tools @@ -2992,7 +2993,8 @@ information about the file (@code{$MeshFormat}), followed by several optional sections defining the nodes (@code{$Nodes}), elements (@code{$Elements}), region names (@code{$PhysicalName}) and post-processing datasets (@code{$NodeData}, @code{$ElementData}, -@code{$ElementNodeData}). Sections can be repeated in the same file, and +@code{$ElementNodeData}). Any section with an unrecognized header is +simply ignored. Sections can be repeated in the same file, and post-processing sections can be put into separate files (e.g. one file per time step).