FacetBasis
Returns the facet basis.
Interface
- ܀ Interface
- ️܀ See example
- ↢
INTERFACE FacetBasis_Hexahedron
MODULE PURE FUNCTION FacetBasis_Hexahedron1( &
& n1, &
& n2, &
& x, &
& y, &
& z, &
& dim1, &
& dim2) &
& RESULT(ans)
INTEGER(I4B), INTENT(IN) :: n1
!! order along axis 1 of the face
!! it should be greater than 1
INTEGER(I4B), INTENT(IN) :: n2
!! order along axis 2 of the face
!! it should be greater than 1
REAL(DFP), INTENT(IN) :: x(:), y(:), z(:)
!! point of evaluation
!! these points should be between [-1, 1].
INTEGER(I4B), INTENT(IN) :: dim1
!! direction in n1 direction
INTEGER(I4B), INTENT(IN) :: dim2
!! direction in n2 direction
REAL(DFP) :: ans( &
& SIZE(x), &
& (n1 - 1_I4B) * (n1 - 1_I4B) + (n2 - 1_I4B) * (n2 - 1_I4B))
END FUNCTION FacetBasis_Hexahedron1
END INTERFACE FacetBasis_Hexahedron
n1, n2
These are order of approximations along the dim1
and dim2
axis.
dim1
, dim2
dim1
denotes the first local axis of the facet.dim2
denotes the second local axis of the facet.
dim-1
and dim-2
should be in lexographical order, that is, following combinations are allowed:
dim1 | dim2 |
---|---|
1 | 2 |
1 | 3 |
2 | 3 |
x
x
coordinate of all points.
y
y
coordinate of all points.
z
z
coordinate of all points.
PROGRAM main
USE easifemBase
USE easifemClasses
IMPLICIT NONE
REAL(DFP), ALLOCATABLE :: xxx(:, :, :), yyy(:, :, :), zzz(:, :, :), &
& x(:), y(:), z(:), basisValue(:, :), val(:, :, :)
TYPE(VTKPlot_) :: avtk
TYPE(string) :: label(2)
INTEGER(I4B) :: ii
x = linspace(-1.0_DFP, 1.0_DFP, 11)
y = linspace(-1.0_DFP, 1.0_DFP, 11)
z = linspace(-1.0_DFP, 1.0_DFP, 11)
CALL MeshGrid(xxx, yyy, zzz, x, y, z)
x = RESHAPE(xxx, [SIZE(xxx)])
y = RESHAPE(yyy, [SIZE(yyy)])
z = RESHAPE(zzz, [SIZE(zzz)])
basisValue = FacetBasis_Hexahedron(2, 2, x, y, z, dim1=1_I4B, dim2=2_I4B)
DO ii = 1, SIZE(label)
label(ii) = tostring(ii)
END DO
CALL avtk%Plot(xxx, yyy, zzz, basisValue, label, "xyFacetBasis.vts")
END PROGRAM main