commit 97a5ca687751451117409c164fd852f63a11ef7a
parent b548bed7ed872a28553d3d941dcdec2c313bcbb9
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 26 Feb 2025 14:02:15 +0100
Write the smsh2vtk man page
Diffstat:
3 files changed, 71 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
@@ -131,6 +131,7 @@ install: library utils pkg
install 755 "$(DESTDIR)$(BINPREFIX)" $(UTIL_EXE); \
install 644 "$(DESTDIR)$(LIBPREFIX)/pkgconfig" smsh.pc; \
install 644 "$(DESTDIR)$(INCPREFIX)/star" src/smsh.h; \
+ install 644 "$(DESTDIR)$(MANPREFIX)/man1" smsh2vtk.1; \
install 644 "$(DESTDIR)$(MANPREFIX)/man5" smsh.5; \
install 644 "$(DESTDIR)$(PREFIX)/share/doc/star-mesh" COPYING README.md
@@ -138,6 +139,7 @@ uninstall:
rm -f "$(DESTDIR)$(LIBPREFIX)/$(LIBNAME)"
rm -f "$(DESTDIR)$(LIBPREFIX)/pkgconfig/smsh.pc"
rm -f "$(DESTDIR)$(INCPREFIX)/star/smsh.h"
+ rm -f "$(DESTDIR)$(MANPREFIX)/man1/smsh2vtk.1"
rm -f "$(DESTDIR)$(MANPREFIX)/man5/smsh.5"
rm -f "$(DESTDIR)$(PREFIX)/share/doc/star-mesh/COPYING"
rm -f "$(DESTDIR)$(PREFIX)/share/doc/star-mesh/README.md"
@@ -145,6 +147,7 @@ uninstall:
lint:
mandoc -T lint -Wbase smsh.5
+ mandoc -T lint -Wbase smsh2vtk.1
clean: clean_test
rm -f $(DEP) $(OBJ) $(LIBNAME)
diff --git a/smsh2vtk.1 b/smsh2vtk.1
@@ -0,0 +1,67 @@
+.\" Copyright (C) 2020-2023, 2025 |Méso|Star> (contact@meso-star.com)
+.\"
+.\" This program is free software: you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation, either version 3 of the License, or
+.\" (at your option) any later version.
+.\"
+.\" This program is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for more details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program. If not, see <http://www.gnu.org/licenses/>.
+.Dd February 26, 2025
+.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Dt SMSH2VTK 1
+.Os
+.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh NAME
+.Nm smsh2vtk
+.Nd convert smsh mesh to VTK format
+.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh SYNOPSIS
+.Nm
+.Op Fl o Ar output
+.Op Ar mesh
+.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh DESCRIPTION
+.Nm
+converts a triangular or tetrahedral mesh saved in
+.Xr smsh 5
+format to legacy VTK format.
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl o Ar output
+Output file.
+If not defined, output data is written to standard output.
+.El
+.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh EXIT STATUS
+.Ex -std
+.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh EXAMPLES
+Convert the
+.Xr smsh 5
+.Pa input.smsh
+mesh to VTK format and saves the results in the
+.Pa output.vtk
+file:
+.Bd -literal -offset Ds
+smsh2vtk -o output.vtk input.smsh
+.Ed
+.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh SEE ALSO
+.Xr smsh 5
+.\"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
+.Sh STANDARDS
+.Rs
+.%B The VTK User's Guide
+.%O Simple Legacy Formats
+.%I Kitware, Inc
+.%N 11
+.%D 2010
+.%P 470--482
+.Re
diff --git a/src/smsh2vtk.c b/src/smsh2vtk.c
@@ -75,7 +75,7 @@ args_init(struct args* args, const int argc, char** argv)
if(optind < argc) args->mesh = argv[optind];
if(!args->mesh) {
- fprintf(stderr, "Mesh is missing\n");
+ fprintf(stderr, "mesh is missing\n");
res = RES_BAD_ARG;
goto error;
}