Tools


Sections:


The tools discussed below can be found in the $MAGPAR_HOME/src/tools/ directory in their respective subdirectories.


gmsh: gmshtoucd.py

gmshtoucd.py is a small Python utility (implementation based on ngtoucd.py) to convert Gmsh mesh files into AVS inp files for use with magpar.


gmsh: msh2inp.awk

msh2inp.awk is a utility in awk to convert Gmsh mesh files into AVS inp files for use with magpar - implemented by Stefan Tibus.


ngtoucd.py

ngtoucd.py is a small Python utility to convert neutrally-exported NETGEN meshes into AVS unstructured cell data meshes for use with magpar.

Authors:
Richard Boardman and Hans Fangohr

documentation:

ngtoucd v0.2
------------

ngtoucd is a small Python utility to convert neutrally-exported NETGEN
meshes into AVS unstructured cell data meshes for use with magpar;
although in theory the meshes should be accessible to anything
requiring AVS/UCD input files, this has not been tested.

ngtoucd requires Python to run. It has been tested with Python 2.3, but
Python 2.1 and 2.2 should also be fine.

NETGEN can be found here:
http://www.mathcces.rwth-aachen.de/netgen/
http://www.hpfem.jku.at/netgen/

Usage
-----

To use, first ensure that the file ngtoucd has been marked executable:

	chmod +x ngtoucd

will set the executable flag on the file. To convert a mesh called
foo.msh:

	./ngtoucd foo.msh

ngtoucd will then convert the mesh and leave a file called foo.inp -
this is the AVS/UCD mesh. By copying ngtoucd into the path, perhaps one
of:

	~/bin
	/usr/bin
	/usr/local/bin

(the top one is preferred for a personal setup, the last one for a
system-wide setup) then this should be callable without the preceding
./ as:

	ngtoucd foo.msh

An example NETGEN mesh has been included (sphere.msh) for testing
purposes.


Changes since version 0.1
-------------------------

ngtoucd now no longer ignores the material parameter for UCD meshes. This
can be interpreted loosely as top-level objects (TLOs) in netgen. The ID
is passed straight through to the UCD mesh (after parsing as an integer).


Contact details
---------------

Please send any bug reports and other comments to
richboardman@gmail.com or hans.fangohr@physics.org

NETGEN can be found here:


vtk tools

The two Perl scripts inp2vtu.pl and inp2vtu_gz.pl convert project.INP.inp files of the form <project>.????.inp into XML formatted files for use with ParaView.

Syntax:

# create VTK XML ASCII files:
./inp2vtu.pl
Usage: inp2vtu.pl <project>

# create VTK XML binary files (about 1/5th the size of the ASCII files):
./inp2vtu_gz.pl
Usage: inp2vtu_gz.pl <project>

The scripts generate the following output files:

<project>_????.vtu   # ???? stands for the 4 digit INP serial number
<project>.pvd        # ParaView control file (defining timestep and
                     # corresponding vtu file

Then you can open the file <project>.pvd in ParaView and use animation controls to browse through the *.vtu files and create avi movies with "File/Save Animation".

Note, that the scripts automatically ignore the checkpoint file project.9999.*.

These scripts were contributed by Stefan Tibus (Univ. of Konstanz) from the research group of Manfred Albrecht at the Univ. of Chemnitz - thanks!


opendx: converter, visual program

This directory contains the converter inp2dx.pl, the shell script mkdx.sh and the OpenDX visual program "vp_mumag". See section OpenDX .


shutil: shell scripts

This directory contains various shell scripts, mainly for Postprocessing of magpar output files.


gid: GiD inp problem type

This tool defines the problem type "inp", which enables GiD to export finite element meshes in AVS/inp format as described in the section on Preprocessing.


magpar - Parallel Finite Element Micromagnetics Package
Copyright (C) 2002-2010 Werner Scholz