These commands are implemented in extend/extend.c
.
This is a dummy command which can be used for anything. Only the function
TestCommand
in extend.c
has to be adapted to one's needs.
Function : TestCommand
Purpose : Dummy command for testing purposes
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : test
Create new boundary vertices. This command expects a file in which each line starts with the vertex id. The following columns are expected to be valid arguments for the bvertex
command. The vertex ids are checked against the ids assigned to the new vertices by AGM 3D. The vertices are numbered consecutively starting with id 0.
Function : ImpBvertexCommand
Purpose : Import the real world coordinates of all boundary vertices
from a file (.bve) with the following structure:
id {segnum u v}+
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : impbvertex filename
Create new inner vertices. The first column gives the vertex id. The second, third, and fourth column of the file give the x-, y-, and z-coordinates of the new vertices respectively. The ids given in the file are checked against the ids assigned to the new vertices by AGM 3D. Usually, this command is called after initializing a new problem with a certain domain and possibly creating new boundary vertices with impbvertex
. Consequently, the highest id is given by the number of boundary vertices of the domain (eight in the case of cube and hexahedron, six for a pentahedron, and three for a sphere; cf. fig. 3) plus the number of additional boundary vertices minus one (the lowest id is zero). If the domain is imported by impdomain
, the number of boundary vertices depends on the domain, of course.
Function : ImpIvertexCommand
Purpose : Import the real world coordinates of all inner vertices
from a file (.ive) with the following structure:
id x-coordinate y-coordinate z-coordinate
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : impivertex filename
Create new elements. The first, second, third, and fourth column of the file give the ids of the four vertices of each element (cf. element
command).
Function : ImpElementsCommand
Purpose : Import the ids of the four vertices of all elements
which form the finest triangulation
i.e. those which were not refined any further and therefore
have no sons to a file (.ele) with the following structure
id_of_first second third fourth_vertex
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : impelements filename
Export the real world coordinates of all vertices to a file. In each line of the file there are the id, x, y and z-coordinates of a vertex with a precision of 9 digits. The file is created or overwritten as in all other commands for exporting data.
Function : ExpVerticesCommand
Purpose : Export the real world coordinates of all vertices
to a file (.knt) with the following structure:
id x-coordinate y-coordinate z-coordinate
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : expvertices filename
Export the identifiers of the four vertices of each element contained in the finest triangulation. The file is created or overwritten. In each line of the file there are the id of first, second, third, fourth vertex. The order of output lines represents the order of elements in the list they are stored in.
Function : ExpElementsCommand
Purpose : Export the ids of the four vertices of all elements
which form the finest triangulation
i.e. those which were not refined any further and therefore
have no sons to a file (.ijk) with the following structure
id_of_first second third fourth_vertex
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : expelements filename cf. ExpVerticesCommand
Export the vertices and faces of the boundary. The output file contains information about the vertices and faces on the boundary in the following format: id of first, second, third vertex of a boundary face.
Function : ExpBoundaryCommand
Purpose : Export the ids of the vertices of all boundary faces to a
file (.bnd) of the following structure
id_of_first second third_vertex_of_boundary_face
... number of lines given by number_of_sides
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : expboundary filename cf. ExpVerticesCommand
Export the finest triangulation in GeomView format. All vertices, but only the boundary triangles are exported.
Function : ExpGeomCommand
Purpose : Export the coordinates of all boundary vertices and the
ids of the vertices of all boundary faces to a
file (.off) of the following structure (geomview format)
OFF
number_of_vertices number_of_sides 0
x-coordinate y-coordinate z-coordinate
... number of lines given by number_of_vertices
3 id_of_first second third_vertex_of_boundary_face
... number of lines given by number_of_sides
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : expgeom filename cf. ExpVerticesCommand
Function : ImpDomainCommand
Purpose : Import the coordinates of all boundary vertices and the
ids of the vertices of all boundary faces from a
file (.off) of the following structure (geomview format)
OFF
number_of_vertices number_of_sides 0
# maximum max_x max_y max_z
# minimum min_x min_y min_z
x-coordinate y-coordinate z-coordinate
... number of lines given by number_of_vertices
3 id_of_first second third_vertex_of_boundary_face
... number of lines given by number_of_sides
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : impdomain filename
Create new elements. The first column gives the element id, the second the property id, the third, fourth, fifth and sixth column of the file give the ids of the four vertices of each element (cf. element
command).
Function : MagImpElementsCommand
Purpose : Import the ids of the four vertices of all elements
which form the finest triangulation
i.e. those which were not refined any further and therefore
have no sons to a file (.ele) with the following structure
elemid propid id_of_first second third fourth_vertex
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : impelements filename
expelements
and imperror
.
Function : ImpErrorCommand
Purpose : Save the estimated error in the data structure of each
element.
The element id corresponds to the line number minus 1
of the file created by ExpElementsCommand
The following file structure is expected:
element_id error
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : imperror filename
Function : ImpSolCommand
Purpose : Save the magnetization vector in the data structure of each
vertex.
The following file structure is expected:
vertex_id Mx My Mz
...
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : impsol filename
Export the solution of each vertex to a file. Each line contains the normalized magnetization vector and the vertex id increased by one. While the output file is created or overwritten the solution is also printed in the text window of AGM 3Dfor X window. If a vertex does not have a valid solution, a warning is printed in the text window.
Function : ExpSolCommand
Purpose : Export the magnetization stored in the data structure of
the vertices to a file with the following structure:
vertex_id Mx My Mz
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : expsol filename
Export the identifiers of the four vertices of each element contained in the finest triangulation. The file is created or overwritten. In each line of the file there are the element id, property id, id of first, second, third, fourth vertex, 0, 0. The trailing zeros are for compatiblity reasons. The order of output lines represents the order of elements in the list they are stored in. The elements are not necessarily numbered consecutively, because many ``father'' elements, which have been refined, do not belong to the finest triangulation. Therefore their sons or even grandsons, which have higher ids, are saved in the file.
Function : MagExpElementsCommand
Purpose : Export the ids of the four vertices of all elements
which form the finest triangulation
i.e. those which were not refined any further and therefore
have no sons to a file (.ijk) with the following structure
elemid propid id_of_first second third fourth_vertex 0 0
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : expelements filename cf. ExpVerticesCommand
This command could be used to automatically call vecmesh
and vecu
. However, this is not very flexible and therefore not recommended.
Function : VemcallCommand
Purpose : Call vecmesh and vecu from AGM
Input : int argc - number of arguments
char **argv - arguments
char *argv[1] - name of the simulation (e.g. cube)
cube.exc - file containing the exit code
Remark : Syntax : vemcall cube
These two commands have been improved to display information contained
in the data structures of vertices and elements.
After the output by the original routines additional information is
printed.
If the magnetization vector stored in the user data structure of the
vertex with id vnum is marked valid, vertexinfo
displays it.
elementinfo
prints the error stored in the element's data structure if it
is marked valid.
Function : MagVertexInfoCommand
Purpose : Overwrite the kernel vertexinfo command
In addition to the output of the standard vertexinfo command
print the current solution (magnetization) if it is valid.
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : vertexinfo id
Function : MagElementInfoCommand
Purpose : Overwrite the kernel elementinfo command
In addition to the output of the standard vertexinfo command
print the error if it is valid.
Input : int argc - number of arguments
char **argv - arguments
Remark : Syntax : elementinfo id