{"id":69,"date":"2024-01-14T11:42:34","date_gmt":"2024-01-14T11:42:34","guid":{"rendered":"http:\/\/hweb-x-0-fe-03.fe.cpd.local\/elle\/?page_id=69"},"modified":"2024-01-14T11:42:34","modified_gmt":"2024-01-14T11:42:34","slug":"function-reference","status":"publish","type":"page","link":"https:\/\/www.ub.edu\/elle\/development\/function-reference\/","title":{"rendered":"Function reference"},"content":{"rendered":"<p>This is a list of Elle functions. It is not complete, and some functions may be out of date. But it is still very useful.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>1\u00a0 Initialisation functions<\/strong><\/p>\n<p>ElleInit<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinit.h\u201d<br \/>\nint ElleInit()<br \/>\nDescription:\u00a0\u00a0\u00a0 Initialises the Elle data structures. This function must be called at the beginning of an Elle process.<br \/>\nReturns: \u00a0\u00a0\u00a0 0 if successful( failure will cause the program to exit).<\/p>\n<p>ElleReinit<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinit.h\u201d<br \/>\nint ElleReinit()<br \/>\nDescription:\u00a0\u00a0\u00a0 Reinitialises data arrays and deletes attribute lists so that a new file can be read or a run restarted.<\/p>\n<p><strong>2\u00a0 Update and display functions<\/strong><\/p>\n<p>ElleUpdateDisplay<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include &#8220;display.h&#8221;<br \/>\nvoid ElleUpdateDisplay()<br \/>\nDescription:\u00a0\u00a0\u00a0 Updates the graphical display of the microstructure, using the settings shown in the Display-&gt;Set Options menu.<\/p>\n<p><strong>3\u00a0 Topology functions<\/strong><\/p>\n<p>ElleCrossingsCheck<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include &#8220;crossings.h&#8221;<br \/>\nint ElleCrossingsCheck(int node, Coords *pos_incr);<br \/>\nDescription:\u00a0\u00a0\u00a0 Determines whether boundary crossings result if the node is moved according to the data in pos_incr. If crossings are found the topology is altered to remove them.<br \/>\nInput:\u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 Specifies the node to move.<br \/>\npos_incr\u00a0\u00a0\u00a0 The distance and direction to move.<br \/>\nReturns:\u00a0\u00a0\u00a0 0.<\/p>\n<p>ElleCheckDoubleJ<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include &#8220;check.h&#8221;<br \/>\nint ElleCheckDoubleJ(int node)<br \/>\nDescription:\u00a0\u00a0\u00a0 If the node is more than ElleMaxNodeDistance() from a neighbour, a new double node is inserted halfway along that boundary. If the node is less than ElleMinNodeDistance() from a neighbour, the node itself is deleted.<br \/>\nInput:\u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 Specifies the node to be checked.<br \/>\nReturns:\u00a0\u00a0\u00a0 0 if successful, else non-zero error number.<\/p>\n<p>ElleCheckTripleJ<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201ccheck.h\u201d<br \/>\nint ElleCheckTripleJ(int node)<br \/>\nDescription:\u00a0\u00a0\u00a0 If the node is more than ElleMaxNodeDistance() from a neighbour, a new double node is inserted halfway along that boundary. If the node is less than ElleMinNodeDistance() from a triple junction neighbour, a \u201ctriple switch\u201d is carried out.<br \/>\nInput:\u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 Specifies the node to be checked.<br \/>\nReturns:\u00a0\u00a0\u00a0 0 if successful or a non-zero error number.<\/p>\n<p><strong>4\u00a0 File functions<\/strong><\/p>\n<p>ElleReadData<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include &#8220;file.h&#8221;<br \/>\nint ElleReadData(char *filename);<br \/>\nDescription:\u00a0\u00a0\u00a0 Reads the Elle data from filename.<br \/>\nInput:\u00a0\u00a0\u00a0 filename\u00a0\u00a0\u00a0 The name of the file to be read (may include path).<br \/>\nReturns:\u00a0\u00a0\u00a0 0 if successful else non-zero error number.<\/p>\n<p>ElleWriteData<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cfile.h\u201d<br \/>\nint ElleWriteData(char *filename)<br \/>\nDescription:\u00a0\u00a0\u00a0 Writes the current Elle data to filename.<br \/>\nInput:\u00a0\u00a0\u00a0 filename\u00a0\u00a0\u00a0 The name of the file to be written (may include path).<br \/>\nReturns:\u00a0\u00a0\u00a0 0 if successful else non-zero error number.<\/p>\n<p>ElleAutoWriteFile<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cfile.h\u201d<br \/>\nint ElleAutoWriteFile(int cnt)<br \/>\nDescription:\u00a0\u00a0\u00a0 Creates a filename from the file \u201croot\u201d and the parameter cnt then calls ElleWriteData, eg if the root is set to test and cnt is 20, this function will call ElleWriteData(\u201ctest020.elle\u201d).<br \/>\nInput:\u00a0\u00a0\u00a0 cnt\u00a0\u00a0\u00a0 The number of stages (to be incorporated into the file name).<br \/>\nReturns:\u00a0\u00a0\u00a0 0 if successful else non-zero error number.<\/p>\n<p><strong>5\u00a0 Flynn functions<\/strong><\/p>\n<p>ElleAddFlynnChild<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleAddFlynnChild(int index, int child)<br \/>\nDescription:\u00a0\u00a0\u00a0 Adds an entry to a flynn\u2019s list of children if the child is not already in the list.<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the parent flynn.<br \/>\nchild\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the new child.<\/p>\n<p>ElleCheckFlynnDefaults<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleCheckFlynnDefaults(int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Checks that active flynns, which do not have parents, have a value for this attribute.<br \/>\nInput: \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 id\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the attribute.<\/p>\n<p>ElleCleanFlynnArray<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleCleanFlynnArray()<br \/>\nDescription:\u00a0\u00a0\u00a0 Reinitialize all the flynns ie all inactive.<\/p>\n<p>ElleDefaultFlynnRealAttrib<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\ndouble ElleDefaultFlynnRealAttribute(int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 The above functions return the default value for the flynn attribute.<br \/>\nReturns:\u00a0\u00a0\u00a0 The attribute value. The variable holding the return value should be of the correct type for the attribute.<\/p>\n<p>ElleFindFlynnMinArea<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\ndouble ElleFindFlynnMinArea(int flynnindex)<br \/>\nDescription:\u00a0\u00a0\u00a0 Retrieves the minimum area from the mineral database if the MINERAL attribute is active, else gets the global minimum flynn area value.<br \/>\nInput:\u00a0\u00a0\u00a0 flynnindex\u00a0\u00a0\u00a0 Specifies the flynn<br \/>\nReturns:\u00a0\u00a0\u00a0 the minimum flynn area.<\/p>\n<p>ElleFindSpareFlynn<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleFindSpareFlynn()<br \/>\nDescription:\u00a0\u00a0\u00a0 Searches the flynns (low to high index) to find an inactive one.<br \/>\nReturns:\u00a0\u00a0\u00a0 The index of an inactive flynn.<\/p>\n<p>ElleFlynnAttributeActive<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nunsigned char ElleFlynnAttributeActive(int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Determines whether the specified flynn attribute is active.<br \/>\nInput:\u00a0\u00a0\u00a0 id\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the attribute.<br \/>\nReturns:\u00a0\u00a0\u00a0 1 if active, else 0.<\/p>\n<p>ElleFlynnDfltAttributeList<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleFlynnDfltAttributeList(int **active, int *maxa)<br \/>\nDescription:\u00a0\u00a0\u00a0 Creates a list of the currently active flynn attributes. Memory is allocated for the array and should be released when no longer needed.<br \/>\nOutput:\u00a0\u00a0\u00a0 active \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Array of attributes identifiers (see flynn attributes).<br \/>\nmaxa\u00a0\u00a0\u00a0 \u00a0The size of the array.<\/p>\n<p>ElleFlynnHasAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nunsigned char ElleFlynnHasAttribute(int index,int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Determines whether the specified flynn has the attribute in its list (i.e. it has no parent or the value of the attribute differs from that of its parent).<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nid\u00a0\u00a0\u00a0 \u00a0Specifies the attribute.<br \/>\nReturns:\u00a0\u00a0\u00a0 1 if the attribute is found, else 0.<\/p>\n<p>ElleFlynnIsActive<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nunsigned char ElleFlynnIsActive(int index)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the state of a flynn.<br \/>\nInputs: \u00a0\u00a0\u00a0 index \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nReturns: \u00a0\u00a0\u00a0 True if the flynn is active else false.<\/p>\n<p>ElleFlynnNbRegions<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid FlynnNbRegions(int index, list&lt;int&gt; &amp;nbflynns)<br \/>\nDescription:\u00a0\u00a0\u00a0 Creates a list of the flynns which share a boundary with the specified flynn. The flynns are ordered by the number of segments in the shared boundary, high to low.<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nnbflynns\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The list of neighbouring regions.<\/p>\n<p>ElleFlynnNodeCount<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleFlynnNodeCount(int index)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the number of nodes on the flynn boundary (ie\u00a0 num in ElleFlynnNodes).<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nReturns:\u00a0\u00a0\u00a0 The number of boundary nodes.<\/p>\n<p>ElleFlynnNodes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleFlynnNodes(int index, int **ids, int *num)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the boundary nodes of a flynn. *num is set to the number of nodes. Ids is the list of node numbers and is allocated storage by a call to malloc(). A call to free(ids) must be made when the information is no longer required.<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nOutput:\u00a0\u00a0\u00a0 ids\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Is set to the address of storage for the list of nodes.<br \/>\nnum\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Is set to the number of nodes in the list.<\/p>\n<p>ElleGetFlynnCAxis, ElleGetFlynnEuler3<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleGetFlynnCAxis(int index, Coords_3D *valptr)<br \/>\nvoid ElleGetFlynnEuler3(int index, double *alpha, double *beta, double *gamma)<br \/>\nDescription:\u00a0\u00a0\u00a0 The above functions get the value of a flynn attribute. If the attribute is not active or the flynn does not have the attribute the program will terminate. Always check using the functions ElleFlynnAttributeActive and ElleFlynnHasAttribute<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nOutput:\u00a0\u00a0\u00a0 The attribute value. The variable holding the return value should be of the correct type for the attribute.<\/p>\n<p>ElleGetFlynnIntAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleGetFlynnIntAttribute(int index, int *valptr, int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 This function gets the value of an integer flynn attribute. If the attribute is not active or the flynn does not have the attribute the program will terminate. Always check using the functions ElleFlynnAttributeActive and ElleFlynnHasAttribute ElleGetFlynnIntAttribute accepts only integer attributes as the third parameter (see the section on Flynn Attributes).<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nid\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the attribute<br \/>\nOutput:\u00a0\u00a0\u00a0 The attribute value. The variable holding the return value, valptr, should be of type integer.<\/p>\n<p>ElleGetFlynnRealAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleGetFlynnRealAttribute(int index, double *valptr, int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 This function gets the value of a real flynn attribute. If the attribute is not active or the flynn does not have the attribute the program will terminate. Always check using the functions ElleFlynnAttributeActive and ElleFlynnHasAttribute ElleGetFlynnIntAttribute accepts only real attributes as the third parameter (see the section on Flynn Attributes).<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nid\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the attribute<br \/>\nOutput:\u00a0\u00a0\u00a0 The attribute value. valptr should be the address of a variable of type double.<\/p>\n<p>ElleInitFlynnAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleInitFlynnAttribute(int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 The attribute is added to the list of active attributes. Active flynns which do not have parents are given the default value for this attribute. If the attribute is already active, nothing is done.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 id\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the attribute.<\/p>\n<p>ElleMaxFlynns<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleMaxFlynns()<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the total number of flynns, both active and inactive. This function is used when looping over the flynn array.<br \/>\nReturns: \u00a0\u00a0\u00a0 The number of flynns.<\/p>\n<p>ElleMergeFlynns<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleMergeFlynns(int keepflynn, int removeflynn)<br \/>\nDescription:\u00a0\u00a0\u00a0 Merges the second flynn into the first by removing the longest common boundary. The merge will only be carried out if the flynns are both on the lowest level, have the same parent (or no parent) and have the same values for their integer attributes.<\/p>\n<p>Input:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nmaxarea\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The maximum flynn area limit.<br \/>\nReturns:\u00a0\u00a0\u00a0 1 if the flynns are merged, else 0.<\/p>\n<p>ElleMergeFlynnsNoCheck<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleMergeFlynnsNoCheck(int keepflynn, int removeflynn)<br \/>\nDescription:\u00a0\u00a0\u00a0 Merges the second flynn into the first by removing the longest common boundary. The merge is forced with no checks. Only used for removing tiny flynns<br \/>\nInput:\u00a0\u00a0\u00a0 keepflynn\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn to survive the merge.<br \/>\nremoveflynn\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn to be removed.<br \/>\nReturns:\u00a0\u00a0\u00a0 1 if the flynns are merged, else 0.<\/p>\n<p>ElleNucleateFlynnFromNode<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleNucleateFlynnFromNode(int node, int *new)<br \/>\nDescription:\u00a0\u00a0\u00a0 Creates a new flynn around the node by adding double nodes on the boundaries and joining these new nodes. The position of the original node is changed. The variable new returns\u00a0 the index of the new flynn.<br \/>\nInput:\u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the node.<br \/>\nOutput:\u00a0\u00a0\u00a0 new\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the new flynn.<\/p>\n<p>ElleNumberOfGrains<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleNumberOfGrains()<br \/>\nDescription:\u00a0\u00a0\u00a0 Counts the number of active flynns. This functions is used by the statistics routine for a microstructure without parent flynns (single level)<br \/>\nReturns:\u00a0\u00a0\u00a0 The number of active flynns.<\/p>\n<p>ElleNumFlynnAttributes<\/p>\n<p>EllePromoteFlynn<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid EllePromoteFlynn(int flynnindex)<br \/>\nDescription:\u00a0\u00a0\u00a0 Raise the flynn one level in the hierarchy.<br \/>\nInput:\u00a0\u00a0\u00a0 flynnindex\u00a0\u00a0\u00a0 Specifies the flynn to be promoted.<\/p>\n<p>ElleRemoveFlynn<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleRemoveFlynn(int flynnindex)<br \/>\nDescription:\u00a0\u00a0\u00a0 Makes a flynn inactive after removing it from the hierarchy. Assumes the attributes have been removed.<br \/>\nInput:\u00a0\u00a0\u00a0 flynnindex\u00a0\u00a0\u00a0 Specifies the flynn to be removed.<\/p>\n<p>ElleRemoveFlynnAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleRemoveFlynnAttribute(int index, int idval)<br \/>\nDescription:\u00a0\u00a0\u00a0 Removes the attribute from the flynn\u2019s attribute list. No action if the attribute is not in the list of the specified flynn.<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nidval\u00a0\u00a0\u00a0 \u00a0Specifies the attribute.<\/p>\n<p>ElleSetDefaultFlynnRealAttrib<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleSetDefaultFlynnRealAttrib(double val,int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Set the default value for a flynn attribute. Commonly called when the \u201cDefault\u201d keyword occurs in an Elle file. Could also be used if a new attribute is initialised in a program and the program default value needs to be overridden.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The value should be the correct type for the attribute.<\/p>\n<p>ElleSetFlynnActive<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleSetFlynnActive(int index)<br \/>\nDescription:\u00a0\u00a0\u00a0 Makes a flynn active.<br \/>\nInputs: \u00a0\u00a0\u00a0 index \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn to be flagged as active.<\/p>\n<p>ElleSetFlynnCAxis, ElleSetFlynnEuler3<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleSetFlynnCAxis(int index, Coords_3D *val)<br \/>\nvoid ElleSetFlynnEuler3(int index, double alpha, double beta, double gamma)<br \/>\nDescription:\u00a0\u00a0\u00a0 The above functions set the value of a flynn attribute. If the attribute is not active or the flynn does not have the attribute the program will terminate. Always check using the functions ElleFlynnAttributeActive and ElleFlynnHasAttribute.<br \/>\nInput:\u00a0\u00a0\u00a0 The attribute value(s). The variables should be of the correct number and type for the attribute.<\/p>\n<p>ElleSetFlynnFirstNode<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleSetFlynnFirstNode(int index, int first)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the value of the flynn\u2019s first node (used to walk around the flynn).<br \/>\nInputs:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nfirst\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The node number of the first node.<\/p>\n<p>ElleSetFlynnIntAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleSetFlynnIntAttribute(int index, int val, int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 This function sets the value of an integer flynn attribute. If the attribute is not active or the flynn does not have the attribute the program will terminate. Always check using the functions ElleFlynnAttributeActive and ElleFlynnHasAttribute. ElleSetFlynnIntAttribute accepts only integer attributes as the third parameter (see the section on Flynn Attributes).<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nval\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The value for the attribute<br \/>\nid\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the attribute<\/p>\n<p>ElleSetFlynnRealAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleSetFlynnRealAttribute(int index, double val, int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 This function sets the value of a flynn attribute. If the attribute is not active or the flynn does not have the attribute the program will terminate. Always check using the functions ElleFlynnAttributeActive and ElleFlynnHasAttribute. ElleSetFlynnRealAttribute accepts only real attributes as the third parameter (see the section on Flynn Attributes).<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nval\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The value for the attribute<br \/>\nid\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the attribute<\/p>\n<p>ElleSplitFlynn<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleSplitFlynn(int index, int *child1, int *child2)<br \/>\nDescription:\u00a0\u00a0\u00a0 Splits a flynn into 2 sub flynns by a random walk. The new flynns are children of the original flynn.<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nOuput:\u00a0\u00a0\u00a0 child1, child2\u00a0\u00a0\u00a0 Are set to the indices of the new flynns.<br \/>\nReturns:\u00a0\u00a0\u00a0 0 if successful, else &gt; 0.<\/p>\n<p>ElleSplitFlynnandPromote<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleSplitFlynnandPromote(int index, int *c1, int *c2)<br \/>\nDescription:\u00a0\u00a0\u00a0 Splits a flynn into 2 sub flynns by a random walk. The new flynns are given the attributes of the original flynn which is then deleted.<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nOuput:\u00a0\u00a0\u00a0 c1, c2 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Are set to the indices of the new flynns.<br \/>\nReturns:\u00a0\u00a0\u00a0 1 if successful, else 0.<\/p>\n<p>ElleSplitFlynnChildrenOnArea<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleSplitFlynnChildrenOnArea(int index, double maxarea)<br \/>\nDescription:\u00a0\u00a0\u00a0 Attempts to split each child of a flynn by calling ElleSplitFlynnOnArea.<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nmaxarea\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The maximum flynn area limit.<\/p>\n<p>ElleSplitFlynnOnArea<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleSplitFlynnOnArea(int type, int index, double dx, double dy)<br \/>\nDescription:\u00a0\u00a0\u00a0 Attempts to split a flynn by recursively calling ElleSplitFlynnandPromote until all the new flynns have an area smaller than that set in the mineral database, if MINERAL attribute is active, or the global setting. dx, dy are used to control the direction of the split. If dx=dy=0, the function will generate a random vector to follow otherwise the flynn will be split in the direction specified by these parameters.\u00a0 The function will try the boundary nodes in turn until it can split the flynn in the specified direction with both new flynns having an area greater then the minimum area. The minimum area is taken from the mineral database, if MINERAL attribute is set, or from the global setting (see ElleSetFlynnMinArea())<br \/>\nInput:\u00a0\u00a0\u00a0 type\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 type of walk, random (type=RANDOM) or directed (type=DIRECT)<br \/>\nindex\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\ndx, dy\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specify the walk direction<\/p>\n<p>ElleSplitFlynnOnArea<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleSplitFlynnOnArea(int type, int index, double maxarea, double dx, double dy)<br \/>\nDescription:\u00a0\u00a0\u00a0 Attempts to split a flynn by recursively calling ElleSplitFlynnandPromote until all the new flynns have an area smaller than the specified limit. dx, dy are used to control the direction of the split. If dx=dy=0, the function will generate a random vector to follow otherwise the flynn will be split in the direction specified by these parameters.\u00a0 The function will try the boundary nodes in turn until it can split the flynn in the specified direction with both new flynns having an area greater then the minimum area. The minimum area is taken from the mineral database, if MINERAL attribute is set, or from the global setting (see ElleSetFlynnMinArea())<br \/>\nInput:\u00a0\u00a0\u00a0 type\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 type of walk, random (type=RANDOM) or directed (type=DIRECT)<br \/>\nindex\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nmaxarea\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The maximum flynn area limit.<br \/>\ndx, dy\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specify the walk direction<\/p>\n<p>ElleSplitWrappingFlynn<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleSplitWrappingFlynn(int index, int node1, int node2, int *child1, int *child2)<br \/>\nDescription:\u00a0\u00a0\u00a0 Splits a flynn into 2 sub flynns by a random walk starting on the shortest path from node1 to node2. The new flynns are given the attributes of the original flynn which is then deleted.<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nOuput:\u00a0\u00a0\u00a0 child1, child2\u00a0\u00a0\u00a0 Are set to the indices of the new flynns.<br \/>\nReturns:\u00a0\u00a0\u00a0 0 if successful, else &gt; 0.<\/p>\n<p>ElleWriteFlynnPolyFile<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleWriteFlynnPolyFile(int flynnid, char *fname)<br \/>\nDescription:\u00a0\u00a0\u00a0 Writes the flynn nodes in poly file format to the file, fname. The node identifier is the last entry on the line. The file can be viewed with Triangle\u2019s showme utility<br \/>\nInput:\u00a0\u00a0\u00a0 flynnid\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nfname\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The output filename.<\/p>\n<p>ElleWriteParentFlynn<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nint ElleWriteParentFlynn(int index, FILE *fp)<br \/>\nDescription:\u00a0\u00a0\u00a0 Used to write the list of child flynn numbers to an Elle file.<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the parent flynn.<br \/>\nfp\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Pointer to the FILE structure of the output file.<br \/>\nReturns:\u00a0\u00a0\u00a0 0 if successful, non-zero error number on failure.<\/p>\n<p>hasParent<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nunsigned char hasParent(int flynn1)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds whether the flynn has a parent (is a child).<br \/>\nInput:\u00a0\u00a0\u00a0 flynn1\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nReturns:\u00a0\u00a0\u00a0 True if flynn1 has a parent, else false.<\/p>\n<p>isChildOf<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nunsigned char isChildOf(int flynn1,int flynn2)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds whether flynn1 is a sub-region of flynn2.<br \/>\nInput:\u00a0\u00a0\u00a0 flynn1\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the child flynn.<br \/>\nflynn2\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the parent flynn.<br \/>\nReturns:\u00a0\u00a0\u00a0 True if flynn1 is a descendant of flynn2, else false.<\/p>\n<p>isFlynnIntegerAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nunsigned char isFlynnIntegerAttribute(int attribid)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds whether the attribute is one that store discrete values e.g. MINERAL. This type of attribute must have the same value for flynns to merge (see 3.1.1).<br \/>\nInput:\u00a0\u00a0\u00a0 attribid\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the attribute.<br \/>\nReturns:\u00a0\u00a0\u00a0 True if attribid is an attribute that represents integer values<\/p>\n<p>isParent<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nunsigned char isParent(int flynn1)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds whether the flynn is a parent (has at least one child).<br \/>\nInput:\u00a0\u00a0\u00a0 flynn1\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nReturns:\u00a0\u00a0\u00a0 True if flynn1 is a parent, else false.<\/p>\n<p><strong>6\u00a0 Node functions<\/strong><\/p>\n<p>ElleAddDoubles<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleAddDoubles()<br \/>\nDescription:\u00a0\u00a0\u00a0 Inserts new double nodes (see ElleInsertDoubleJ) halfway along segments which are longer than the maximum node separation. The active nodes are checked until no new nodes need to be added.<br \/>\nReturns: \u00a0\u00a0\u00a0 0.<\/p>\n<p>ElleCopyToPosition<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleCopyToPosition(int node, Coords *position)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the new node location without translating into the unit cell. The previous position is updated.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the node.<br \/>\nposition\u00a0\u00a0\u00a0 Points to a structure holding the new position.<\/p>\n<p>ElleCopyToPrevPosition<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleCopyToPrevPosition(int node, Coords *position)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the previous node location without translating into the unit cell.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the node.<br \/>\nposition\u00a0\u00a0\u00a0 Points to a structure holding the new values.<\/p>\n<p>ElleDeleteDoubleJ<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleDeleteDoubleJ(int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Deletes the specified node.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 id\u00a0\u00a0\u00a0 Specifies the index of the node to be deleted.<br \/>\nReturns: \u00a0\u00a0\u00a0 0 (topological inconsistencies cause the program to exit).<\/p>\n<p>ElleFindSpareNode<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleFindSpareNode()<br \/>\nDescription:\u00a0\u00a0\u00a0 Searches the node array for the first inactive entry (allocates a larger array if all entries are active).<br \/>\nReturns:\u00a0\u00a0\u00a0 The index of an inactive entry.<\/p>\n<p>ElleInitNodeAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleInitNodeAttribute(int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Activates a node attribute.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 id\u00a0\u00a0\u00a0 Specifies the attribute (see node attribute values).<\/p>\n<p>ElleInsertDoubleJ<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleInsertDoubleJ(int node1,int node2,int *nn,float frac)<br \/>\nDescription:\u00a0\u00a0\u00a0 Inserts a new double node between two neighbouring nodes and gives it attributes interpolated linearly from the neighbours.<br \/>\nInput:\u00a0\u00a0\u00a0 node1, node2\u00a0\u00a0\u00a0 The nodes to be separated by the new node.<br \/>\nfrac\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Determines the distance along the segment (from node1) to locate the new node.<br \/>\nOutput:\u00a0\u00a0\u00a0 nn\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 This will be set to the index of the new node.<br \/>\nReturns:\u00a0\u00a0\u00a0 0<\/p>\n<p>ElleIntrpAttributes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleIntrpAttributes(int n)<br \/>\nDescription:\u00a0\u00a0\u00a0 Performs a linear interpolation of active attributes for a new double node (assume triples are not inserted)<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 n\u00a0\u00a0\u00a0 specifies the new node<\/p>\n<p>ElleMaxNodeAttributes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleMaxNodeAttributes()<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the number of node attributes activated.<br \/>\nReturns:\u00a0\u00a0\u00a0 Number of node attributes (an active node attribute is assigned to all nodes).<\/p>\n<p>ElleMaxNodes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleMaxNodes()<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the current size of the node array.<br \/>\nReturns:\u00a0\u00a0\u00a0 The total number of entries in the node array, both active and inactive.<\/p>\n<p>ElleNeighbourNodes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleNeighbourNodes(int node, int *nbnodes)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the indices of a nodes neighbours<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the node.<br \/>\nOutput:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 nbnodes\u00a0\u00a0\u00a0 An existing array of 3 integers into which the neighbour indices are copied. If the node is double, the blank entry may be in any position.<br \/>\nReturns:\u00a0\u00a0\u00a0 0, if node is inactive the program terminates.<\/p>\n<p>ElleNeighbourRegion<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleNeighbourRegion(int node, int nb, ERegion *region)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the flynn to the left of the node-&gt;nb boundary.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the node.<br \/>\nnb\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the boundary.<br \/>\nOutput:\u00a0\u00a0\u00a0 region\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Set to the flynn id.<\/p>\n<p>ElleNodeAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\ndouble ElleNodeAttribute(int node, int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the value of a node attribute.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 Specifies the node.<br \/>\nid\u00a0\u00a0\u00a0 Specifies the attribute (see node attribute values).<br \/>\nReturns:\u00a0\u00a0\u00a0 The value of the attribute (an invalid id will terminate the program).<\/p>\n<p>ElleNodeAttributeList<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleNodeAttributeList(int **active, int *max)<br \/>\nDescription:\u00a0\u00a0\u00a0 Creates a list of active node attributes. Memory is allocated for the list so should be released when no longer needed.<br \/>\nOutput:\u00a0\u00a0\u00a0 active\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The address of a pointer to the list of attributes.<br \/>\nmax\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Set to the number of attributes.<\/p>\n<p>ElleNodeIsActive<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleNodeIsActive(int node)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the state of the specified node.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 The specified node.<br \/>\nReturns:\u00a0\u00a0\u00a0 If node is valid (&lt;ElleMaxNodes()), returns 1 if active else 0.<\/p>\n<p>ElleNodeIsDouble<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleNodeIsDouble(int node)<br \/>\nDescription:\u00a0\u00a0\u00a0 Counts the neighbours of the specified node.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 The specified node.<br \/>\nReturns:\u00a0\u00a0\u00a0 1 if there are two neighbours, else 0.<\/p>\n<p>ElleNodeIsTriple<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleNodeIsTriple(int node)<br \/>\nDescription:\u00a0\u00a0\u00a0 Counts the neighbours of the specified node.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 The specified node.<br \/>\nReturns:\u00a0\u00a0\u00a0 1 if there are three neighbours, else 0.<\/p>\n<p>ElleNodeNumAttributes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleNodeNumAttributes()<br \/>\nDescription:\u00a0\u00a0\u00a0 Counts the number of active node attributes.<br \/>\nReturns:\u00a0\u00a0\u00a0 The number of node attributes.<\/p>\n<p>ElleNodeOnRgnBnd<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleNodeOnRgnBnd(int node, ERegion id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Determines if the node is on the boundary of the flynn.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 Specifies the node.<br \/>\nid\u00a0\u00a0\u00a0 An integer specifying the flynn.<br \/>\nReturns:\u00a0\u00a0\u00a0 1 if true else 0.<\/p>\n<p>ElleNodePlotXY<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleNodePlotXY(int node, Coords *xy, Coords *prevxy)<br \/>\nDescription:\u00a0\u00a0\u00a0 Find the position of a node relative to a given location. This allows for wrapping around the unit cell and the coordinates returned may no be inside the unit cell. One example where this function is used: finding the locations of all nodes on a flynn boundary as the flynn may cross the edge of the unit cell.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the node.<br \/>\nprevxy\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The node position will be given relative to this location.<br \/>\nOutput:\u00a0\u00a0\u00a0 xy\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The node position.<\/p>\n<p>ElleNodePosition<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleNodePosition(int node, Coords *position)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the node location<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the node.<br \/>\nOutput:\u00a0\u00a0\u00a0 position\u00a0\u00a0\u00a0 Set to the node\u2019s location.<\/p>\n<p>ElleNodePrevPosition<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleNodePrevPosition(int node, Coords *previous)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the node\u2019s previous location.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the node.<br \/>\nOutput:\u00a0\u00a0\u00a0 position\u00a0\u00a0\u00a0 Set to the node\u2019s previous location.<\/p>\n<p>ElleNodeSeparation<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\ndouble ElleNodeSeparation(int node1, int node2)<br \/>\nDescription:\u00a0\u00a0\u00a0 Calculates the absolute distance between 2 nodes using the position of node2 relative to node1 (not the unit cell location).<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node1, node2\u00a0\u00a0\u00a0 The 2 nodes.<br \/>\nReturns:\u00a0\u00a0\u00a0 The distance between the nodes.<\/p>\n<p>ElleNodeUnitXY<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleNodeUnitXY(Coords *xy)<br \/>\nDescription:\u00a0\u00a0\u00a0 Converts x, y coordinates to unit cell coordinates.<br \/>\nInput\/Output:\u00a0\u00a0\u00a0 xy\u00a0\u00a0\u00a0 x and y values in a Coords structure.<\/p>\n<p>ElleNumberOfNodes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleNumberOfNodes(int *doubles, int *triples)<br \/>\nDescription:\u00a0\u00a0\u00a0 Counts the number of currently active nodes.<br \/>\nOutput:\u00a0\u00a0\u00a0 doubles\u00a0\u00a0\u00a0 Set to the number of active double nodes.<br \/>\nTriples\u00a0\u00a0\u00a0 Set to the number of active triple nodes.<\/p>\n<p>ElleRegions<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleRegions(int node, ERegion *rgn)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the flynns to the left of each segment (neighbour boundary).<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the node.<br \/>\nOutput:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 rgn\u00a0\u00a0\u00a0 An array of 3 integers into which the flynn indices are copied. If the node is double, the blank entry may be in any position.<br \/>\nReturns:\u00a0\u00a0\u00a0 0, if node is inactive the program terminates.<\/p>\n<p>ElleRelPosition<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleRelPosition(Coords *orig, int nb, Coords *xyrel, double *sep)<br \/>\nDescription:\u00a0\u00a0\u00a0 Finds the node location relative to a specified point and calculates the distance from this new origin. The relative location may not be within the unit cell.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 orig\u00a0\u00a0\u00a0 x,y coordinates of the new origin.<br \/>\nnb\u00a0\u00a0\u00a0 Index of the node.<br \/>\nOutput:\u00a0\u00a0\u00a0 xyrel\u00a0\u00a0\u00a0 The recalculated position of nb.<br \/>\nsep\u00a0\u00a0\u00a0 The absolute distance from the point (*orig) to nb.<\/p>\n<p>ElleSetNodeActive<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleSetNodeActive(int node)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the state of the specified node, allocating a larger node array if there are no spare entries.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 The index of the node.<\/p>\n<p>ElleSetNodeAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleSetNodeAttribute(int node, double val, int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Set the value of a floating point node attribute.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 Specifies the node.<br \/>\nval\u00a0\u00a0\u00a0 The attribute value.<br \/>\nid\u00a0\u00a0\u00a0 Specifies the attribute (see node attribute values).<\/p>\n<p>ElleSetPosition<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleSetPosition(int node, Coords *position)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the x, y coordinates of the node to the values in the position structure. The position is translated into the unit cell, if necessary. The current position is stored as the previous position before updating.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 specifies the node<br \/>\nposition\u00a0\u00a0\u00a0 points to a structure holding the new position<\/p>\n<p>ElleSetPrevPosition<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleSetPrevPosition(int node, Coords *position)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the x, y coordinates of the node\u2019s previous position. Normally done automatically to save the last position when a node is moved.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the node.<br \/>\nposition\u00a0\u00a0\u00a0 Points to a structure holding the new values.<\/p>\n<p>ElleSwitchTripleNodes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nint ElleSwitchTripleNodes(int node1,int node2)<br \/>\nDescription:\u00a0\u00a0\u00a0 Perform a triple switch of the specified nodes. The routine assumes they are both triples and will report topological problems if this is not true.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node1, node2\u00a0\u00a0\u00a0 Specify the nodes to switch.<br \/>\nReturns:\u00a0\u00a0\u00a0 0 if successful.<br \/>\nNon-zero if it could not resolve a valid topological problem (e.g. a wrapping region which could not be split.<\/p>\n<p>ElleSwitchTriples<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleSwitchTriples(int modfactor)<br \/>\nDescription:\u00a0\u00a0\u00a0 Forces switching of neighbouring triple nodes. Used to generate a starting structure from a regular grid.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 modfactor\u00a0\u00a0\u00a0 Specifies how many pairs of triples are switched (modfactor is 6 then every 6th pair is switched).<\/p>\n<p>ElleTotalNodeMass<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\ndouble ElleTotalNodeMass(int attrib_id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Find the total mass for concentration attribute<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 attrib_id\u00a0\u00a0\u00a0 Specifies the attribute (assumes the attribute is a concentration).<br \/>\nReturns:\u00a0\u00a0\u00a0 the mass for the nodes<\/p>\n<p>ElleUpdatePosition<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cnodes.h\u201d<br \/>\nvoid ElleUpdatePosition(int node, Coords *increment)<br \/>\nDescription:\u00a0\u00a0\u00a0 Moves the node by the increment x, y values. It is the same as ElleSetPosition once the new location is calculated but it also updates node and unode concentration attributes.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 node\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the node.<br \/>\nIncrement\u00a0\u00a0\u00a0 Specifies the changes to the x, y location.<\/p>\n<p><strong>7\u00a0\u00a0\u00a0 \u00a0Unode Functions<\/strong><\/p>\n<p>ElleGetFlynnUnodeList<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cinterface.h\u201d<br \/>\nvoid ElleGetFlynnUnodeList(int flynn_id, vector&lt;int&gt; &amp;l)<br \/>\nDescription:\u00a0\u00a0\u00a0 Find the unconnected nodes that lie inside the flynn specified by flynn_id.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 flynn_id\u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nOutput:\u00a0\u00a0\u00a0 l\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The list of the unode identifiers.<\/p>\n<p>ElleGetUnodeAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cunodes.h\u201d<br \/>\nvoid ElleGetUnodeAttribute(int id, double *val, const int attrib_id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Find the value of the attribute specified by attrib_id for the unconnected node specified by id.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 id\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the unode.<br \/>\nattrib_id\u00a0\u00a0\u00a0 The attribute identifier.<br \/>\nOutput:\u00a0\u00a0\u00a0 val\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The value of the specified attribute.<\/p>\n<p>ElleGetUnodePosition<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cunodes.h\u201d<br \/>\nvoid ElleGetUnodePosition(int id, Coords *xy)<br \/>\nDescription:\u00a0\u00a0\u00a0 Find the position of the unconnected node specified by id.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 id\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the unode.<br \/>\nOutput:\u00a0\u00a0\u00a0 xy\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The position of the unode.<\/p>\n<p>ElleInitUnodeAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cunodes.h\u201d<br \/>\nvoid ElleInitUnodeAttribute(int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 This attribute will become active for all unodes. All unodes will have the default value of this attribute unless the value is changed using ElleSetUnodeAttribute<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 id\u00a0\u00a0\u00a0 specifies the attribute<\/p>\n<p>ElleInitUnodes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cunodes.h\u201d<br \/>\nint ElleInitUnodes(int num_per_row)<br \/>\nDescription:\u00a0\u00a0\u00a0 Create unodes, arranged in the unit cell such that a unode is equidistant from its neighbours<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 num_per_row\u00a0\u00a0\u00a0 number of unodes in a row (preferably a multiple of 15)<br \/>\nReturns:\u00a0\u00a0\u00a0 0<\/p>\n<p>ElleMaxUnodes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cunodes.h\u201d<br \/>\nint ElleMaxUnodes()<br \/>\nDescription:\u00a0\u00a0\u00a0 Find the number of active unodes<br \/>\nReturns:\u00a0\u00a0\u00a0 the maximum index for the unconnected nodes<\/p>\n<p>ElleSetUnodeAttribute<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cunodes.h\u201d<br \/>\nvoid ElleSetUnodeAttribute(int id, double val, const int attrib_id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Set the value of the attribute specified by attrib_id for the unconnected node specified by id.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 id\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the unode.<br \/>\nattrib_id\u00a0\u00a0\u00a0 The attribute identifier.<br \/>\nval\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Set to the value of the specified attribute.<\/p>\n<p>ElleTotalUnodeMass<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cunodes.h\u201d<br \/>\ndouble ElleTotalUnodeMass(int attrib_id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Find the total mass for concentration attribute<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 attrib_id\u00a0\u00a0\u00a0 Specifies the attribute (assumes the attribute is a concentration).<br \/>\nReturns:\u00a0\u00a0\u00a0 the mass for the unconnected nodes<\/p>\n<p>ElleUnodeAttributeActive<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cunodes.h\u201d<br \/>\nunsigned char ElleUnodeAttributeActive(int id)<br \/>\nDescription:\u00a0\u00a0\u00a0 Find whether the attribute is active<br \/>\nReturns:\u00a0\u00a0\u00a0 1, if the attribute is active, else 0<\/p>\n<p>ElleUnodeROI<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cunodes.h\u201d<br \/>\ndouble ElleUnodeROI()<br \/>\nDescription:\u00a0\u00a0\u00a0 The ROI is twice the spacing between unodes (see 4.2.2)<br \/>\nReturns:\u00a0\u00a0\u00a0 the radius of the region of interest for an unconnected node<\/p>\n<p>ElleUnodesActive<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cunodes.h\u201d<br \/>\nint ElleUnodesActive()<br \/>\nDescription:\u00a0\u00a0\u00a0 Test whether unconnected nodes have been initialised for this experiment<br \/>\nReturns:\u00a0\u00a0\u00a0 1, if unconnected nodes are active, else 0<\/p>\n<p><strong> 8\u00a0 Triangulation functions<\/strong><\/p>\n<p>TriangulateUnodes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cunodes.h\u201d<br \/>\nvoid TriangulateUnodes(int flynn_id, struct triangulateio *out)<br \/>\nDescription:\u00a0\u00a0\u00a0 Triangulate the unconnected nodes within a flynn with its boundary nodes. No new nodes are inserted on the flynn boundary. The triangle attribute is calculated from the unode values for the attr parameter and node margin values, if active.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 flynn_id\u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nout\u00a0\u00a0\u00a0 pointer to a triangulateio structure. This should be Mesh.tri if the functions in triattrib.h are to be used (See 3.5).<br \/>\nattr\u00a0\u00a0\u00a0 specifies the triangle attribute to be calculated<br \/>\nReturns:\u00a0\u00a0\u00a0 1, if unconnected nodes are active, else 0<\/p>\n<p>TriangulateUnodes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cunodes.h\u201d<br \/>\nvoid TriangulateUnodes(int flynn_id, struct triangulateio *out)<br \/>\nDescription:\u00a0\u00a0\u00a0 Triangulate the unconnected nodes within a flynn and its boundary nodes. No new nodes are inserted on the flynn boundary. The triangle attribute will be calculated from the CONC_A values of the unodes and the margin values (N_MCONC_A) at the nodes, if active. It is equivalent to TriangulateUnodes(Flynn_id,out,CONC_A)<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 flynn_id\u00a0\u00a0\u00a0 Specifies the flynn.<br \/>\nout\u00a0\u00a0\u00a0 pointer to a triangulateio structure. This should be Mesh.tri if the functions in triattrib.h are to be used (see 8).<br \/>\nReturns:\u00a0\u00a0\u00a0 1, if unconnected nodes are active, else 0<\/p>\n<p>ElleClearTriAttributes<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201ctriattrib.h\u201d<br \/>\nvoid ElleClearTriAttributes()<br \/>\nDescription:\u00a0\u00a0\u00a0 Clear the attributes from Mesh<\/p>\n<p>ElleGetTriPtNeighbours<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201ctriattrib.h\u201d<br \/>\nvoid ElleGetTriPtNeighbours(int index, vector&lt;int&gt; &amp;nbnodes,<br \/>\nunsigned char bnd)<br \/>\nDescription:\u00a0\u00a0\u00a0 Puts the Elle identifiers of the triangulation neighbours in nbnodes. If bnd is set to 1 then all neighbours are included. If bnd is zero, only the non-boundary neighbours are listed. The neighbours are listed in anticlockwise order.<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the Elle unode identifier of the triangulation point.<br \/>\nbnd\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 0, do not include flynn boundary nodes<br \/>\n1, include flynn boundary nodes<br \/>\nOutput:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 nbnodes\u00a0\u00a0\u00a0 The list of nodes connected to the triangulation point with the Elle identifier, index.<br \/>\non_bnd\u00a0\u00a0\u00a0 corresponds to nbnodes, 0 for a unode, 1 for a boundary node<\/p>\n<p>ElleGetNodeTriPtNeighbours<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201ctriattrib.h\u201d<br \/>\nvoid ElleGetNodeTriPtNeighbours(int index, vector&lt;int&gt; &amp;nbnodes,<br \/>\nvector&lt;int&gt; &amp;on_bnd, int nb_id,<br \/>\nunsigned char bnd)<br \/>\nDescription:\u00a0\u00a0\u00a0 Puts the Elle identifiers of the triangulation neighbours in nbnodes. If bnd is set to 1 then all neighbours are included. If bnd is zero, only the non-boundary neighbours are listed. The neighbours are listed in anticlockwise order starting with nb_id, if found.<br \/>\nInput:\u00a0\u00a0\u00a0 index\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Specifies the Elle node identifier of the triangulation point.<br \/>\nbnd\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 0, do not include flynn boundary nodes<br \/>\n1, include flynn boundary nodes<br \/>\nnb_id\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 neighbouring flynn boundary node<br \/>\nOutput:\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 nbnodes\u00a0\u00a0\u00a0 The list of nodes connected to the triangulation point with the Elle identifier, index.<br \/>\non_bnd\u00a0\u00a0\u00a0 corresponds to nbnodes, 0 for a unode, 1 for a boundary node<\/p>\n<p>EllePlotTriangles<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201cdisplay.h\u201d<br \/>\nvoid EllePlotTriangles()<br \/>\nDescription:\u00a0\u00a0\u00a0 Plots triangulation data \u2013 currently used to plot the unode triangulation and by the diffusion example.<\/p>\n<p><strong>9\u00a0 Runtime settings<\/strong><\/p>\n<p>ElleSetSaveFileRoot<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetSaveFileRoot(char *name)<br \/>\nDescription:\u00a0\u00a0\u00a0 Specifies the root of the filename for any files written.<br \/>\nInput:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 String to be used.<\/p>\n<p>ElleSetSaveFrequency<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetSaveFrequency(int freq)<br \/>\nDescription:\u00a0\u00a0\u00a0 Specifies how often an Elle file should be saved eg if freq is n, a file will be saved after every nth stage. The filename will be a concatenation of the file root, the stage number and the \u201c.elle\u201d suffix.<br \/>\nInput:\u00a0\u00a0\u00a0 freq\u00a0\u00a0\u00a0 Specifies the interval for saving Elle files.<\/p>\n<p>ElleSetVerbose<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetVerbose(int state)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets a flag specifying whether the process should output information to the terminal during execution (Not properly implemented).<br \/>\nInput:\u00a0\u00a0\u00a0 0 or 1.<\/p>\n<p>ElleSetDisplay<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetDisplay(int state)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets a flag specifying whether the process should open an X window or run in batch mode. Display is usually set to 1 (for graphical display) while developing a process and set to 0 for background execution.<\/p>\n<p>ElleSetStages<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetStages(int state)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the number of times to run through a loop in the process [20] . See the template files.<\/p>\n<p>ElleSetInitFunction<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetInitFunction(ElleRunFunc myfunc)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the function to be run when the process is initialised (on startup, when an Elle data file is opened or when the process is rerun.<br \/>\nInput:\u00a0\u00a0\u00a0 myfunc\u00a0\u00a0\u00a0 The name of the function of type ElleRunFunc.<\/p>\n<p>ElleInitFunction<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nElleRunFunc ElleInitFunction()<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns a pointer to\u00a0 the function set by ElleSetInitFunction.<br \/>\nReturns:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The function of type ElleRunFunc. Returns 0 if ElleSetInitFunction has not been called.<\/p>\n<p>ElleSetRunFunction<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetRunFunction(ElleRunFunc myfunc)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the function to be run when the process is started or when the process is rerun.\u00a0 See the template files.<br \/>\nInput:\u00a0\u00a0\u00a0 myfunc\u00a0\u00a0\u00a0 The name of the function of type ElleRunFunc.<\/p>\n<p>ElleRunFunction<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nElleRunFunc ElleRunFunction()<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns a pointer to\u00a0 the function set by ElleSetRunFunction.<br \/>\nReturns:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The function of type ElleRunFunc. Returns 0 if ElleSetRunFunction has not been called.<\/p>\n<p>ElleSetExitFunction<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetExitFunction(ElleRunFunc myfunc)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the function to be run when the process is terminated. See the template files.<br \/>\nInput:\u00a0\u00a0\u00a0 myfunc\u00a0\u00a0\u00a0 The name of the function of type ElleRunFunc.<\/p>\n<p>ElleExitFunction<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nElleRunFunc ElleExitFunction()<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns a pointer to\u00a0 the function set by ElleSetExitFunction.<br \/>\nReturns:\u00a0\u00a0\u00a0 The function of type ElleRunFunc. Returns 0 if ElleSetExitFunction has not been called.<\/p>\n<p>ElleSetFile<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetFile(char *filename)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the Elle data file to be read when the process is started or when the process is rerun.<br \/>\nInput:\u00a0\u00a0\u00a0 filename\u00a0\u00a0\u00a0 The name of the Elle data file.<\/p>\n<p>ElleFile<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nchar *ElleFile()<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns a pointer to the name of the Elle data file.\u00a0 This may be an empty string if a file has not been opened.<br \/>\nReturns:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 Pointer to the Elle data file name.<\/p>\n<p>ElleSetSwitchdistance<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetSwitchdistance(double val)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the minimum separation distance for triple nodes. The value is used in the topology check routines to control triple switching.\u00a0 This function sets the minimum separation for double nodes to val and the maximum separation for double nodes to val*2.2<br \/>\nInput:\u00a0\u00a0\u00a0 val\u00a0\u00a0\u00a0 The minimum separation distance for triple nodes.<\/p>\n<p>ElleSwitchdistance<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\ndouble ElleSwitchdistance()<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns the setting for the minimum separation distance for triple nodes [0.025]. The value is used in the topology check routines to control triple switching.<br \/>\nReturns:\u00a0\u00a0\u00a0 \u00a0\u00a0\u00a0 The switch distance for triple nodes.<\/p>\n<p>ElleSetSpeedup<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetSpeedup(double val)<br \/>\nDescription:\u00a0\u00a0\u00a0 Limits the distance a node may move in any one time step.<br \/>\nInput:\u00a0\u00a0\u00a0 val\u00a0\u00a0\u00a0 The speedup value.<\/p>\n<p>ElleSpeedup<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\ndouble ElleSpeedup()<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns the speedup value \u2013 a parameter which limits the distance a node may move in any one time step.<br \/>\nReturns:\u00a0\u00a0\u00a0 The speedup value.<\/p>\n<p>EllemaxNodeSep<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\ndouble EllemaxNodeSep()<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns the maximum separation distance for double nodes. Check routines may insert nodes if this distance is exceeded. This value is set when the switch distance is set.<br \/>\nReturns:\u00a0\u00a0\u00a0 The maximum node separation.<\/p>\n<p>ElleminNodeSep<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\ndouble ElleminNodeSep()<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns the minimum separation distance for double nodes. Check routines may remove nodes if boundaries become shorter than the minimum. This value is set when the switch distance is set.<br \/>\nReturns:\u00a0\u00a0\u00a0 The minimum node separation.<\/p>\n<p>ElleReadOptionData<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nint ElleReadOptionData(FILE *fp,char *str)<br \/>\nDescription:\u00a0\u00a0\u00a0 Reads the data in the OPTIONS section of an Elle file.<br \/>\nInput:\u00a0\u00a0\u00a0 fp\u00a0\u00a0\u00a0 The pointer to the file stream opened for reading<br \/>\nstr\u00a0\u00a0\u00a0 A buffer into which lines from the file are read<br \/>\nReturns:\u00a0\u00a0\u00a0 0, if it reads the section successfully, else an error number<\/p>\n<p>ElleWriteOptionData<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nint ElleWriteOptionData(FILE *fp)<br \/>\nDescription:\u00a0\u00a0\u00a0 Writes the OPTIONS section of an Elle file.<br \/>\nInput:\u00a0\u00a0\u00a0 fp\u00a0\u00a0\u00a0 The pointer to the file stream opened for writing<br \/>\nReturns:\u00a0\u00a0\u00a0 0, if it writes the section successfully, else an error number<\/p>\n<p>ElleSaveFileRoot<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nchar *ElleSaveFileRoot(void)<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns a pointer to the string used as the root of the name for any files written<br \/>\nReturns:\u00a0\u00a0\u00a0 A char pointer.\u00a0 (This is the address of the field in the global structure)<\/p>\n<p>EllemaxStages<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nint EllemaxStages(void)<br \/>\nDescription:\u00a0\u00a0\u00a0 This function returns the setting for stages. The default is 20 and it may be reset by calling the function ElleSetStages() or via the Set Options dialog box (Run menu)<br \/>\nReturns:\u00a0\u00a0\u00a0 an integer value<\/p>\n<p>ElleDisplay<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nint ElleDisplay(void)<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns the value of a flag specifying whether the process should open an X window or run in batch mode<br \/>\nReturns:\u00a0\u00a0\u00a0 0 or 1<\/p>\n<p>ElleTemperature<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\ndouble ElleTemperature(void)<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns the current temperature value<br \/>\nReturns:\u00a0\u00a0\u00a0 a double value<\/p>\n<p>EllePressure<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\ndouble EllePressure(void)<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns the current pressure value<br \/>\nReturns:\u00a0\u00a0\u00a0 a double value<\/p>\n<p>ElleBoundaryWidth<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\ndouble ElleBoundaryWidth(void)<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns the boundary width value (assumed to be in metres). Default is 1e-9m.<br \/>\nReturns:\u00a0\u00a0\u00a0 a double value<\/p>\n<p>ElleUnitLength<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\ndouble ElleUnitLength(void)<br \/>\nDescription:\u00a0\u00a0\u00a0 Returns the length of the unit cell (assumed to be in metres). Default is 1cm.<br \/>\nReturns:\u00a0\u00a0\u00a0 a double value<\/p>\n<p>ElleSetUnitLength<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetUnitLength(double val)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the value used to scale the unit cell<br \/>\nInput:\u00a0\u00a0\u00a0 val\u00a0\u00a0\u00a0 The length value (assumed to be metres).<\/p>\n<p>ElleSetBoundaryWidth<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetBoundaryWidth(double val)<br \/>\nDescription:\u00a0\u00a0\u00a0 Changes the boundary width value applied to all grain boundaries<br \/>\nInput:\u00a0\u00a0\u00a0 val\u00a0\u00a0\u00a0 The pressure value.<\/p>\n<p>ElleSetPressure<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetPressure(double val)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the current pressure value<br \/>\nInput:\u00a0\u00a0\u00a0 val\u00a0\u00a0\u00a0 The new value.<\/p>\n<p>ElleSetTemperature<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleSetTemperature(double val)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the current temperature value<br \/>\nInput:\u00a0\u00a0\u00a0 val\u00a0\u00a0\u00a0 The new value.<\/p>\n<p>ElleSetCellBBox<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nint ElleSetCellBBox(Coords *baseleft, Coords *baseright,<br \/>\nCoords *topright, Coords *topleft)<br \/>\nDescription:\u00a0\u00a0\u00a0 Sets the bounding box for the unit cell.<br \/>\nReturns:\u00a0\u00a0\u00a0 0 if the values are set. Returns 1 if the coordinates of the corners do not seem topologically correct<\/p>\n<p>ElleCellBBox<br \/>\nSynopsis:\u00a0\u00a0\u00a0 #include \u201crunopts.h\u201d<br \/>\nvoid ElleCellBBox(CellData *data)<br \/>\nDescription:\u00a0\u00a0\u00a0 Copies the bounding box structure to the input variable.<br \/>\nInput:\u00a0\u00a0\u00a0 The address of a variable of type CellData<\/p>\n<p><span class=\"modifydate\"> Last Updated on Monday, 21 April 2008 11:30 <\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a list of Elle functions. It is not complete, and some functions may be out of date. But it is still very useful. &nbsp; 1\u00a0 Initialisation functions ElleInit Synopsis:\u00a0\u00a0\u00a0 #include \u201cinit.h\u201d int ElleInit() Description:\u00a0\u00a0\u00a0 Initialises the Elle data structures. This function must be called at the beginning of an Elle process. Returns: \u00a0\u00a0\u00a0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":59,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-69","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.ub.edu\/elle\/wp-json\/wp\/v2\/pages\/69","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ub.edu\/elle\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ub.edu\/elle\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ub.edu\/elle\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ub.edu\/elle\/wp-json\/wp\/v2\/comments?post=69"}],"version-history":[{"count":1,"href":"https:\/\/www.ub.edu\/elle\/wp-json\/wp\/v2\/pages\/69\/revisions"}],"predecessor-version":[{"id":70,"href":"https:\/\/www.ub.edu\/elle\/wp-json\/wp\/v2\/pages\/69\/revisions\/70"}],"up":[{"embeddable":true,"href":"https:\/\/www.ub.edu\/elle\/wp-json\/wp\/v2\/pages\/59"}],"wp:attachment":[{"href":"https:\/\/www.ub.edu\/elle\/wp-json\/wp\/v2\/media?parent=69"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}