Difference between revisions of "Entity Command"

From OSUPDOCS
Jump to navigation Jump to search
Line 19: Line 19:


  <?xml version='1.0'?>
  <?xml version='1.0'?>
  <!DOCTYPE JANFEAInput SYSTEM '/Users/nairnj/Programming/Cocoa_Projects/nairn-mpm-fea-OpenMP/NairnMPM/input/NairnMPM.dtd'
  <!DOCTYPE JANFEAInput SYSTEM '/nairn-mpm-fea-OpenMP/NairnMPM/input/NairnMPM.dtd'
  [
  [
   <!ENTITY maxtime "7.5">
   <!ENTITY maxtime "7.5">

Revision as of 20:13, 12 September 2013

The Entity commands lets you insert XML entity definitions in the file and use then in selected commands.

Introduction

XML entities do not have much function when building and running calculations in NairnFEAMPM NairnFEAMPMViz. But perhaps you will use NairnFEAMPM or NairnFEAMPMViz just to set up calculations, create the XML input command, and then copy those file to a remote computer for running large calculations. After such calculations, you may need to modify the XML files remotely for new calculations using basic text editors or command line tools (like vi). For these situations, it is helpful to make use of entities in the XML files. The entities will be near the beginnin of the file (and therefore easy to edit) and can by throughout the file to control selected options of the simulations.

Input Command

To create an XML to appear in automatically formatted input commands, use the command

Entity (name),(value)

where

  • (name) is the entity name without the leading ampersand (&) or trailing semicolon (;) (e.g, maxTime to refer to an XML entity &maxtime;).
  • <value) is the setting for the entity to be inserted in the file.

All entities will appear in the DocType element at the start of the results XML commands. For example, the output would be:

<?xml version='1.0'?>
<!DOCTYPE JANFEAInput SYSTEM '/nairn-mpm-fea-OpenMP/NairnMPM/input/NairnMPM.dtd'
[
  <!ENTITY maxtime "7.5">
  <!ENTITY archPath "Results/MPM">
  <!ENTITY archTime "0.1">
]>

Usage

One entities are defined, you can use then in selected commands. For example, the MaximumTime command will accept an entity. Each command that allows an entity will be document as accepting them. To use an entity, give the same name use in the Entity command (i.e., the entity name without the leading ampersand (&) or trailing semicolon (;). The commands that accept entities are all commands intended to accept numerical values.

You can also use entities on most commands that expect string arguments such as the Archive command or any argument that can be a user-defined function.