Integration classes
This class and its sub-classes provide support for numeric integration over common element domains.
Implement most of the methods presented in http://me.rice.edu/~akin/Elsevier/Chap_10.pdf.
Usage:
Instantiate the Integration object most suitable for your element domain. Provide
order
as the highest polynomial order of the function you want to integrate exactly.call
points()
orweights()
orparameters()
to obatin a list of integration point coordinates or weights or both, respectively.
Integrating a 4th-order function f(s,t) over a triangular domain
integrator = TriangleIntegration(order=4)
F = 0.0
xis, wis = integrator.parameters()
for xi, wi in zip(xis, wis):
F += f(xi[0], xi[1]) * J(xi[0], xi[1]) * wi
print(f"Int_A f(s,t) dA = {F}")
Integrating a tri-quadratic function g(s,t,u) over a brick-shaped domain
integrator = BrickIntegration(order=2)
F = 0.0
xis, wis = integrator.parameters()
for xi, wi in zip(xis, wis):
F += g(xi[0], xi[1], xi[2]) * J(xi[0], xi[1], xi[2]) * wi
print(f"Int_V g(s,t,u) dV = {F}")
Abstract Integration Class
- class femedu.utilities.Integration.Integration(order=1, dimension=1)
Abstract interface definition for all Integration classes.
Triangular domain integration for polynomial of order <= p
For internal use only.
- gauss1D(nGP, biunit=False)
Gauss integration data for
nGP
on the domain \([-1,+1]\)For internal use only.
- parameters()
This is a short form of
xi = points() w = weights()
- Returns:
list of integration point coordinates, list of weights for those points
- points()
- Returns:
list of integration point coordinates
- weights()
- Returns:
list of weights for all integration points
Derived Classes
- class femedu.utilities.LineIntegration.LineIntegration(order=2)
Provides integration points and weights for 1D integration
- class femedu.utilities.TriangleIntegration.TriangleIntegration(order=2)
Provides integration points and weights for a triangular domain (2d)
- class femedu.utilities.QuadIntegration.QuadIntegration(order=2)
Provides integration points and weights for quadrilateral domains (2D)
- class femedu.utilities.TetraIntegration.TetraIntegration(order=2)
Provides integration points and weights for tetrahedral domains
- class femedu.utilities.BrickIntegration.BrickIntegration(order=2)
Provides integration points and weights for brick-like domains (3d)