Must GetDP functions be specified only by using the mesh file's region number (the first of the tags given for each mesh element in the mesh file)? Or is it also possible to specify a function by reference to other tags or even the element number?<br>
<br>I ask because in my problem I do not know the charge distribution at the time I mesh the geometry. What I want to do is this:<br><ol><li>Mesh my geometry</li><li>Use the mesh as input to an independent calculation that determines the charge density that results from exposure of this sample to a beam of charged particles. (The charge density will be approximated as the total charge within each mesh element divided by that element's volume.)</li>
<li>Write GetDP's .pro file, including its definition of the "rho" function that defines the charge density. </li><li>Run GetDP to solve for the potentials.</li></ol>The problem, as you can see, is that when the mesher assigns region numbers in step 1 it must so so without knowledge of the charge distribution, since the latter is not determined until step 2. <br>
<br>If necessary, I can have my step 2 calculation include rewriting the mesh file with each mesh element, or at least those with non-zero charge, assigned a unique region number. That is what I am presently thinking I will need to do. --But this unnecessarily makes other function definitions more of a kludge. (Imagine I have a geometric region that is all the same dielectric constant but is divided into thousands of mesh elements each with different charge density. Possibly there is no escaping having thousands of rho[regionxxx] = *.*** lines in the .pro file, but must there also be a separate thousands of epsr[regionxxx] = sameDielectricConstantValue lines for the permittivity definition?) Is there a better way?<br>
<br>John<br><br>