next up previous contents
Next: Error estimation, refinement and Up: User manual Previous: New variables

Subsections

New commands

 

Application independent commands

These commands are implemented in extend/extend.c.

test

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

impbvertex filename

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

impivertex 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

impelements 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

expvertices 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

expelements 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

expboundary filename

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

expgeom filename

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

Commands for the magnetization application

impdomain filename

  Import a domain of arbitrary shape. The domain has to be defined in a file in GeomView format. Only boundary vertices and triangular elements of the surface may appear in the file. Two lines of comments containing the size of the bounding box guarantee optimal rendering in the X window version. If they are omitted, default values will be used (center in (0,0,0) and a bounding cube with edge length 2).


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

impelements 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

imperror filename

  Import the estimated error and store it in the data structure of the corresponding element. The first token in each line is the element identifier, the second token the error. Only elements of the finest triangulation, which have no sons, can be assigned an error. Thus, the mesh must not be manipulated between the execution of 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

impsol filename

  Import the magnetization vectors and store them in the data structure of the corresponding vertices. In the first column of the input file the vertex id, in the second, third, and fourth the components of the magnetization in x-, y-, and z-direction, respectively, are expected.


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

expsol 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

expelements 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

vemcall filename

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

vertexinfo vnum
elementinfo elnum

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


next up previous contents
Next: Error estimation, refinement and Up: User manual Previous: New variables
Werner Scholz
10/30/1998