mammos_mumag.tofly
Convert unv mesh files to the fly format.
usage: tofly.py [-h] [-e DIMENSIONS] [UNV] [FLY]
Convert unv files to the fly format. Elements that belong to a group called
‘contact’ will be converted to their contact counterparts. First and secound
order meshes are supported.
- positional arguments:
- UNV Path to the input file or ‘-’ for stdin. It must
already exist and be stored in the unv format. If
ommited stdin will be used instead.
- FLY Path to the output file or ‘-’ for stdout. Overridden
if it already exists. If ommited stdout will be used
instead.
- optional arguments:
- -h, --help
show this help message and exit
- -e DIMENSIONS, --exclude DIMENSIONS
Comma separated list of dimensions that shall be
ignored while converting (e.g. ‘-e 1,2’ only converts
3D elements).
Functions
Exceptions
-
exception mammos_mumag.tofly.EndOfFileError[source]
-
exception mammos_mumag.tofly.EndOfSectionError[source]
-
exception mammos_mumag.tofly.ParseError[source]
-
exception mammos_mumag.tofly.UnsupportedElementError[source]
-
mammos_mumag.tofly.addTo(m, k, d)[source]
-
mammos_mumag.tofly.convert(unv_path, fly_path, exclude_list=[1, 2])[source]
Convert mesh file from unv to fly.
- Parameters:
unv_path (str | Path) – Input unv file path.
fly_path (str | Path) – Output fly file path.
exclude_list (list[int]) – List of dimensions to be excluded. Defaults to [1,2], so it will
exclude 1D and 2D elements.
- Return type:
None
-
mammos_mumag.tofly.convertElemsContact(index, groups, contact, unv, fly)[source]
-
mammos_mumag.tofly.convertNodes(nodes, unvFile, flyFile)[source]
-
mammos_mumag.tofly.countUnvNodes(file)[source]
-
mammos_mumag.tofly.filter(words, i, pattern)[source]
-
mammos_mumag.tofly.findSection(file)[source]
-
mammos_mumag.tofly.get_exclude_set(exclude_list)[source]
-
mammos_mumag.tofly.indexElems(index, file, exclude)[source]
-
mammos_mumag.tofly.indexNodes(nodes, file)[source]
-
mammos_mumag.tofly.nextType(file)[source]
-
mammos_mumag.tofly.parse(f, num, pattern)[source]
-
mammos_mumag.tofly.parseElem(t, file)[source]
-
mammos_mumag.tofly.parseGroups(groups, contact, file)[source]
-
mammos_mumag.tofly.parseNode(file)[source]
-
mammos_mumag.tofly.regIndex(t, data, index)[source]
-
mammos_mumag.tofly.scanUnv(file, exclude)[source]
-
mammos_mumag.tofly.skipSection(file)[source]
-
mammos_mumag.tofly.static_vars(**kwargs)[source]
-
mammos_mumag.tofly.writeBuffer(f, b, t, m=None, i=1)[source]
-
mammos_mumag.tofly.writeFly(nodes, groups, index, contact, unvFile, flyFile, exclude)[source]