Skip to content

Commit 9287c5a

Browse files
Added DPF XML File content (#207)
1 parent 4495625 commit 9287c5a

File tree

2 files changed

+155
-0
lines changed

2 files changed

+155
-0
lines changed

docs/source/user_guide/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,5 @@ Additionally, :ref:`user_guide_plotting` describes how to plot results via PyVis
2424
operators
2525
fields_container
2626
plotting
27+
xmlfiles
2728
troubleshooting
Lines changed: 154 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,154 @@
1+
.. _user_guide_xmlfiles:
2+
3+
=============
4+
DPF XML Files
5+
=============
6+
This section describes the XML files associated with DataProcessingCore
7+
and DPF plugins. These DPF files work on both Windows and Linux
8+
operating systems. The files can contain content for both operating systems.
9+
10+
The XML files must be located alongside the plugin DLL files on Windows,
11+
or SO files on Linux.
12+
13+
DataProcessingCore File
14+
-----------------------
15+
The content and format of the DataProcessingCore.xml file is as follows:
16+
17+
.. code-block:: html
18+
19+
<?xml version="1.0"?>
20+
<DPF version="1.0">
21+
<Environment>
22+
<Linux>
23+
<ANSYS_ROOT_FOLDER>/usr/local/ansys_inc/v222</ANSYS_ROOT_FOLDER>
24+
</Linux>
25+
<Windows>
26+
<ANSYS_ROOT_FOLDER>E:\ANSYSDev\ANSYS Inc\v222</ANSYS_ROOT_FOLDER>
27+
</Windows>
28+
</Environment>
29+
<LoadOperators>
30+
<Linux>
31+
<native>
32+
<Path>libAns.Dpf.Native.so</Path>
33+
<Loader>LoadOperators</Loader>
34+
<UsePluginXml>false</UsePluginXml>
35+
</native>
36+
</Linux>
37+
<Windows>
38+
<Debug>
39+
<native>
40+
<Path>$(THIS_XML_FOLDER)\Ans.Dpf.NativeD.dll</Path>
41+
<Loader>LoadOperators</Loader>
42+
</native>
43+
</Debug>
44+
<Release>
45+
<native>
46+
<Path>Ans.Dpf.Native.dll</Path>
47+
<Loader>LoadOperators</Loader>
48+
</native>
49+
<fem_utils>
50+
<Path>$(THIS_XML_FOLDER)\Ans.Dpf.FEMUtils.dll</Path>
51+
<Loader>LoadOperators</Loader>
52+
<UsePluginXml>true</UsePluginXml>
53+
</fem_utils>
54+
</Release>
55+
</Windows>
56+
</LoadOperators>
57+
</DPF>
58+
59+
The DataProcessingCore.xml file is provided with the DPF software.
60+
Modify the file carefully to ensure that the DPF software operates correctly.
61+
62+
Some of the sections in the file are optional, and many of the sections
63+
have Windows and Linux specific subsections.
64+
65+
The ``<Environment>`` section is used only for defining the ROOT folder
66+
of the Ansys software. This is done with an ``<ANSYS_ROOT_FOLDER>`` tag.
67+
The root folder of the Ansys software ends with the v### folder.
68+
It could be something like ``C:\ansys_inc\v222``. The ANSYS_ROOT_FOLDER tag
69+
defines a variable like an environment variable that can be used in the other
70+
XML files. You might use it to find required third party software.
71+
72+
If the ANSYS_ROOT_FOLDER tag is not defined within the DataProcessing.xml file,
73+
the root folder is determined by either reading the AWP_ROOT### environment
74+
variable specific to the version of the DPF code. For example, if you are
75+
using V222 DPF code, it looks for AWP_ROOT222 to find the root folder.
76+
77+
If the ANSYS_ROOT_FOLDER tag is still not defined, the code attempts to find the
78+
root folder relative to the DataProcessingCore DLL/SO file. This only works
79+
if DataProcessingCore is located in its default location.
80+
81+
The ``<LoadOperators>`` section is used for loading the default plugins.
82+
The further subdividing of the plugins into ``<Debug>`` or ``<Release>``
83+
sections is optional. The ``<Debug>`` section would only be used with a
84+
debug version of the DataProcessingCore DLL/SO file.
85+
86+
The plugins to load are defined within their own section that is named
87+
by a tag like ``<native>`` or ``<fem_utils>``. This tag is used as
88+
the ``Key`` when loading the plugin. Each plugin must have a unique key.
89+
90+
Within the Key section are two tags that define the location of the plugin
91+
and the method of loading. The location is defined by the ``<Path>`` tag
92+
and the loading method is defined by the ``<Loader>`` tag.
93+
These are used as arguments to the loading plugin mechanism.
94+
95+
Currently, only ``LoadOperators`` is supported for the ``<Loader>`` tag.
96+
This loads all operators within the plugin.
97+
98+
The ``<Path>`` tag contains the location of the plugin to load.
99+
The normal mechanism that the OS uses to find a DLL/SO is used.
100+
The DLL could be in the Windows path, or the SO could be within
101+
the Linux LD_LIBRARY_PATH.
102+
103+
The ``<UsePluginXml>`` tag contains a value that must be set to
104+
``true`` or ``false``. It defines if the PLUGIN.XML file
105+
(defined in next section) will be used to load the plugin or not.
106+
This tag is optional. The default value is ``true``.
107+
108+
Any path specified with the XML file must adhere to the path conventions
109+
of the OS. “\\” for Windows and “/” for Linux.
110+
111+
Two pre-defined variables can be used to provide an absolute path to
112+
the plugin:
113+
114+
- ANSYS_ROOT_FOLDER as defined above.
115+
- THIS_XML_FOLDER defining the location of where the current XML file is located. In this case DataProcessingCore.xml.
116+
117+
Any other environment variable could be used. If you always had your plugins
118+
in a folder defined by the environment variable MY_PLUGINS,
119+
you could use that in the XML file.
120+
121+
The environment variables are specified the same way as ANSYS_ROOT_FOLDER
122+
or THIS_XML_FOLDER. They are defined as $(…).
123+
124+
In the Ansys installation, the default DataProcessingCore.xml file is located
125+
next to the DataProcessingCore DLL/SO file.
126+
If you want to use a different one, you can initialize DPF using a
127+
specific DataProcessingCore.xml file.
128+
129+
PLUGIN.XML File
130+
---------------
131+
The content and format of the Plugin.xml file is as follows:
132+
133+
.. code-block:: html
134+
135+
<?xml version="1.0"?>
136+
<DPF version="1.0">
137+
<Environment>
138+
<Linux>
139+
<LD_LIBRARY_PATH>$(ANSYS_ROOT_FOLDER)/aisol/dll/linx64:$(ANSYS_ROOT_FOLDER)/aisol/lib/linx64:$(ANSYS_ROOT_FOLDER)/tp/IntelMKL/2020.0.166/linx64/lib/intel64:$(LD_LIBRARY_PATH)</LD_LIBRARY_PATH>
140+
</Linux>
141+
<Windows>
142+
<MY_FOLDER>c:\temp</MY_FOLDER>
143+
<PATH>$(ANSYS_ROOT_FOLDER)\aisol\bin\winx64;$(ANSYS_ROOT_FOLDER)\tp\IntelMKL\2020.0.166\winx64;$(ANSYS_ROOT_FOLDER)\tp\IntelCompiler\2019.5.281\winx64;$(MY_FOLDER);$(PATH)</PATH>
144+
</Windows>
145+
</Environment>
146+
</DPF>
147+
148+
This file allows for a specific environment to be configured for loading a plugin.
149+
The ``<Environment>`` section within the plugin-specific XML file is defined
150+
the same way as the DataProcessingCore.xml file.
151+
152+
Any environment variables defined or used have the values at the time they are
153+
defined or used. You can effectively define a variable multiple times
154+
and keep appending it.

0 commit comments

Comments
 (0)