XML Input Files for NairnMPM
All XML input command files for MPM calculations must begin with an XML declaration, an optional document type declaration, and the main input file tag and end with the corresponding closing tags. For MPM calculations, the global file structure is:
<?xml version='1.0'?> <!DOCTYPE JANFEAInput SYSTEM "NairnMPM.dtd" [ <!ENTITY maxtime "1e-03"> <!ENTITY width "100"> ]> <JANFEAInput version='3'> ... (XML Command to define the calculation) ... </JANFEAInput>
The !DOCTYPE element defines the file type and has the SYSTEM option to provide a path to a Document Type Definition (or DTD) file. This path is needed when you run the code with the validation option (-v), which is highly recommended. The required DTD file for MPM calculations is provided in the /input folder of the source code files.
The !DOCTYPE element can define any number of entities. These entities can be used elsewhere in the text of the XML file and they will be replaced by the text in the entity definition. For example, the above MPM file can use the entity &maxtime; and it will be replaced with the text 1e-03. Entities can define values that make it easier to read input XML files and easier to modify them for new calculations.
The remainder of the file is included withing a JANFEAInput block. The version attribute is currently not needed, but may be important in the future. When input files are validated using the DTD file (as recommended), the sections must appear in the specified order defined in the table of contents on this page. Elements that are not used can be omitted, but all needed elements must be in that specific order.
Click this link to see a sample XML MPM input command file for simulation of two colliding disks.