Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'Numerical integration over an arbitrary 2D domain' topicStudent Support Forum > General > "Numerical integration over an arbitrary 2D domain"

< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic
Author Comment/Response
Michael
07/07/12 12:25pm

In Response To 'Re: Re: Numerical integration over an arbitrary...'
---------
Sorry about the link. I've attached a smaller version of the file. (BTW, if you decide you're interested, I figured out a way to speed up the piecewise parametrization of the polygon.)

If your mesher can output the triangles as the coordinates in a regular pattern, such as one point per line, the three coordinates on a line, every three lines denoting a triangle, like this:

1.11   1.12   1.13
1.21   1.22   1.23
1.31   1.32   1.33
2.11   2.12   2.13
2.21   2.22   2.23
2.31   2.32   2.33

[Two triangles, 1.xx and 2.xx]

then

Partition[Import["file", "Data"], 3]

will read the "file" and yield a list of triangles, each a list of points, like this:

{{{1.11, 1.12, 1.13}, {1.21, 1.22, 1.23}, {1.31, 1.32, 1.33}},
{{2.11, 2.12, 2.13}, {2.21, 2.22, 2.23}, {2.31, 2.32, 2.33}}}

There are many other variations, CSV, TSV, etc., that could be made to work, too, depending on the output formats available in your mesher tool.

You might look at the following to figure out if there are better ways to import the output of your mesher tool:

http://reference.wolfram.com/mathematica/guide/3DGeometryAndModelingFormats.html

http://reference.wolfram.com/mathematica/guide/ListingOfAllFormats.html


Attachment: LineIntegral-Polygon.nb, URL: ,

Subject (listing for 'Numerical integration over an arbitrary 2D domain')
Author Date Posted
Numerical integration over an arbitrary 2D domain Alfonso 06/30/12 12:26pm
Re: Numerical integration over an arbitrary 2D ... Michael 07/05/12 03:01am
Re: Re: Numerical integration over an arbitrary... Alfonso 07/06/12 02:14am
Re: Re: Re: Numerical integration over an arbit... Michael 07/07/12 12:25pm
Re: Re: Re: Re: Numerical integration over an a... Alfonso 07/08/12 03:49am
< Previous Comment | Next Comment >Help | Reply To Comment | Reply To Topic