Ok I see that it is better to use geometric conditions in the conditional
to assign the id¹s. I had in mind to directly assign the id¹s to the
elements I might be interested in in the mesh file, but I guess I would
have picked those elements using geometric considerations anyways at the
beginning.

What do you mean using parsed functions? Maybe passing something like
³x[0] < xmax && x[0] > xmin && y[0] < ymax && y[0] < ymin², but with
defined xmax, xmin, ymax, ymin? How would this functionality be integrated
in libMesh? The src/apps/meshbcids.C seems isolated.

Miguel



On 3/14/16, 6:51 PM, "Roy Stogner" <[email protected]> wrote:

>
>On Tue, 15 Mar 2016, Salazar De Troya, Miguel wrote:
>
>> I¹m interested in calculating QoI¹s in different regions of the
>> domain. I guess that I could include a conditional with the
>> subregion coordinates where I want the QoI to be calculated, but I
>> thought there should be a cleaner way.  Is using subdomains the way?
>
>I think conditionals look pretty clean, and (especially with parsed
>functions) they're very flexible, but using subdomains is more
>efficient.
>
>> If so, how can I assign subdomains in my .xda mesh file?
>
>What I did with a similar problem (assigning boundary ids) was to
>write src/apps/meshbcid.C, which does various tests while looping over
>elements and assigns ids accordingly.
>
>If I were to do it again I'd use a parsed function for the conditions.
>
>If you were to do so please send us a PR.  :-)
>---
>Roy


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231&iu=/4140
_______________________________________________
Libmesh-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libmesh-users

Reply via email to