dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #14114
demo that implements P2 quadratic triangles
DISCLAIMER: the gzipped file will be sent in a separate email.
I have done an example implementation that modifies the FFC generated
form.h file so that P2 iso-parametric elements can be computed. To look
at this, do the following:
1. uncompress and look at the PDF; it gives a short discussion.
2. compile and run it. it will generate a decent amount of output which
is self-explanatory. The most interesting part is at the end, which
indicates the max error between the entries of the matrix that DOLFIN
generates and an almost identical matrix that I created with my own code.
The error I get is 2.72E-9 using a 25 point quad rule in FFC. The matrix
created with my code uses a 37 point quad rule (which might be different
than what FFC uses; I didn't check). Note that there are only 2 triangles
in the example mesh (and only one is curved); the triangles only have a
diameter of approx 0.5.
3. The main.cpp is the main part of the demo. If you want to see what I
did, open the Poisson.h file and do a text search for "SWW". Please keep
in mind that this is just a first cut. The coding I inserted is not
efficient and contains some non-OOP pieces.
I think that, eventually, implementing non-linear maps should be done with
a class. I didn't do that here because this is just a test. And this
class should eventually be integrated (maybe abstractly) into UFC. I'm
not completely clear yet on how to do it. Any suggestions would be
welcome.
- Shawn