<div dir="ltr"><div dir="auto"><div><span></span></div><div><div><span></span></div><div><div><span></span></div><div><div dir="ltr"><div>Matt,<br><br>I see how parameters (e.g., nu) change across the domain, but from what I understand they are all functions of the point coordinate x[ ]. This would be no problem if my parameters were analytical functions as shown in your examples or if the domain has several nicely layered regions which can be easily distinguished (i.e., I could simply use conditionals to determine a mesh point's region based on the coordinates).</div>


<div><br></div><div>However, what if I wanted nu (or any parameter for that matter) to be supplied through a user created data file? In PFLOTRAN, that's how physical data and parameters are associated with a given cell or mesh point. Here's the way I imagine my PETSc code would look using DMPlex:<br>

<br>1) Create DMPlex mesh from an input mesh file<br></div><div>2) Read data file that links physical parameters (e.g., diffusivity, source, etc) to DMPlex mesh points. This should create some sort of data structure or Vec that maps these parameters to the corresponding DMPlex mesh points. <br>
</div><div>3) Set up FEM discretization and boundary conditions. Like the physical parameters, boundary conditions are also generated/specified through the data file.<br></div><div>4) Solve problem<br></div><div>5) Post-process solution to mesh file.<br>
<br></div><div>In step 4, the pointwise functions f0_u, f1_u, g3_uu, etc are called upon for each element/mesh point iteration. I suppose my question is, is there any way to incorporate the data formulated from step 2 into said pointwise functions?<br>
<br>Thanks,<br>Justin<br></div>
</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 25, 2014 at 4:33 PM, Matthew Knepley <span dir="ltr"><<a href="mailto:knepley@gmail.com" target="_blank">knepley@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>On Mon, Aug 25, 2014 at 2:10 PM, Justin Chang <span dir="ltr"><<a href="mailto:jychang48@gmail.com" target="_blank">jychang48@gmail.com</a>></span> wrote:<br>




<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi all,<br><br>In the discretization schemes for the DMPlex FEM examples (ex12 and ex62), it lets us specify equations as pointwise functions. But what if I wanted to assign "regions" to different points within the domain? In one of my problems, I want the diffusivity tensor and/or forcing function to differ for various layers/regions within the computational domain. I would imagine calling something like DMPlexGetLabelValue() to identify a region associated with a given mesh point but is it possible to do something like this within the f0/f1/g3/etc functions?<br>




</div></blockquote><div><br></div></div><div>1) Changing parameters across the domain is straightforward. ex12 does this for "diffusivity".</div><div><br></div><div>2) Changing the function across the domain should probably be accomplished by changing</div>




<div>     a marker parameter, which is checked inside the function itself.</div><div><br></div><div>   Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">Thanks,<br>Justin<span><font color="#888888"><br></font></span></div><span><font color="#888888">
</font></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>




-- Norbert Wiener
</font></span></div></div>
</blockquote></div><br></div>
</div></div></div></div></div>