Methods
ConvectiveMatrix 1β
Interface:
MODULE PURE FUNCTION ConvectiveMatrix(test, trial, term1, &
& term2, opt) RESULT(Ans)
CLASS(ElemshapeData_), INTENT(IN) :: test
CLASS(ElemshapeData_), INTENT(IN) :: trial
INTEGER(I4B), INTENT(IN) :: term1
!! del_x, del_y, del_z, del_x_all, del_none
INTEGER(I4B), INTENT(IN) :: term2
!! del_x, del_y, del_z, del_x_all, del_none
INTEGER( I4B ), OPTIONAL, INTENT( IN ) :: opt
!! Option for number of diagonal copies
REAL(DFP), ALLOCATABLE :: ans(:, :)
END FUNCTION ConvectiveMatrix
Following matrices can be calculated based on the value of term1
and term2
.
term1=del_none, term2=del_x
term1=del_none, term2=del_y
term1=del_none, term2=del_z
term1=del_x, term2=del_none
term1=del_y, term2=del_none
term1=del_z, term2=del_none
term1=del_none, term2=del_x_all
opt=1
term1=del_none, term2=del_x_all
opt=2
term1=del_x_all, term2=del_none
opt=1
term1=del_x_all, term2=del_none
opt=2
Convective Matrix 2β
Interface:
MODULE PURE FUNCTION ConvectiveMatrix(test, trial, c, crank, term1, &
& term2, opt) RESULT(Ans)
CLASS(ElemshapeData_), INTENT(IN) :: test
CLASS(ElemshapeData_), INTENT(IN) :: trial
TYPE(FEVariable_), INTENT(IN) :: c
!! scalar variable
TYPE(FEVariableScalar_), INTENT(IN) :: crank
!! scalar variable
INTEGER(I4B), INTENT(IN) :: term1
!! del_x, del_y, del_z, del_x_all, del_none
INTEGER(I4B), INTENT(IN) :: term2
!! del_x, del_y, del_z, del_x_all, del_none
INTEGER( I4B ), OPTIONAL, INTENT( IN ) :: opt
!! number of copies
REAL(DFP), ALLOCATABLE :: ans(:, :)
END FUNCTION ConvectiveMatrix
!!! note "" Here is some scalar variable, it may be some constant, function of space coordinates given in terms of spatial nodal variable or quadrature variable
Following matrices can be computed by using this interface:
term1=del_none, term2=del_x
term1=del_none, term2=del_y
term1=del_none, term2=del_z
term1=del_none, term2=del_x_all
opt=1
term1=del_none, term2=del_x_all
opt=2
term1=del_x, term2=del_none
term1=del_y, term2=del_none
term1=del_z, term2=del_none
term1=del_x_all, term2=del_none
opt=1
term1=del_x_all, term2=del_none
opt=2
You can learn more from examples given below:
- [[ConvectiveMatrix_test_21]] Line2 [[ReferenceLine_]]
- [[ConvectiveMatrix_test_22]] Line2 [[ReferenceLine_]], c is nodal variable
- [[ConvectiveMatrix_test_23]] Line2 [[ReferenceLine_]], c is quadrature variable
- [[ConvectiveMatrix_test_24]] linear [[ReferenceTriangle_]]
- [[ConvectiveMatrix_test_25]] high order [[ReferenceTriangle_]]
- [[ConvectiveMatrix_test_26]] mixed FEM [[ReferenceTriangle_]]
- [[ConvectiveMatrix_test_27]] linear [[ReferenceQuadrangle_]]
- [[ConvectiveMatrix_test_28]] higher order [[ReferenceQuadrangle_]]
- [[ConvectiveMatrix_test_29]] mixed FEM [[ReferenceQuadrangle_]]
- [[ConvectiveMatrix_test_30]] linear [[ReferenceTetrahedron_]]
- [[ConvectiveMatrix_test_31]] higher order [[ReferenceTetrahedron_]]
- [[ConvectiveMatrix_test_32]] mixed FEM [[ReferenceTetrahedron_]]
ConvectiveMatrix 3β
Interface:
MODULE PURE FUNCTION ConvectiveMatrix(test, trial, c, crank, term1, &
& term2, opt) RESULT(Ans)
CLASS(ElemshapeData_), INTENT(IN) :: test
CLASS(ElemshapeData_), INTENT(IN) :: trial
TYPE(FEVariable_), INTENT(IN) :: c
!! It can be a scalar or vector variable
TYPE(FEVariableVector_), INTENT(IN) :: crank
!! It can be a scalar or vector variable
INTEGER(I4B), INTENT(IN) :: term1
!! del_x, del_y, del_z, del_x_all, del_none
INTEGER(I4B), INTENT(IN) :: term2
!! del_x, del_y, del_z, del_x_all, del_none
INTEGER( I4B ), OPTIONAL, INTENT( IN ) :: opt
!! number of copies
REAL(DFP), ALLOCATABLE :: ans(:, :)
END FUNCTION ConvectiveMatrix
!!! note "Convective velocity"
C(:,:)
is a two dimensional array. It represents the spatial nodal values of convective velocity. The shape of C
is (NSD, NNS)
. The first index of C
denotes the spatial coordinates. The second index denotes the spatial nodal number. In this case, convective velocity varies in the space.
!!! note "Convective velocity"
C(:)
is a vector. It represents the spatial coordinates of convective velocity. The shape of C
is (NSD)
. The first index of C
denotes the spatial coordinates. In this case, convective velocity remains constant in the space.
Following matrices can be computed from this interface:
term1=del_none, term2=del_x
term1=del_x, term2=del_none
You can learn about this method from following pages
- [[ConvectiveMatrix_test_1]] β Line2 [[ReferenceLine_]] Constant velocity
- [[ConvectiveMatrix_test_2]] β Line2 [[ReferenceLine_]] Nodal values of velocity
- [[ConvectiveMatrix_test_3]] β Line2 [[ReferenceLine_]] Quadrature values of velocity
- [[ConvectiveMatrix_test_4]] β Line3 [[ReferenceLine_]] Nodal values of velocity
- [[ConvectiveMatrix_test_5]] β Line3 [[ReferenceLine_]] Quadrature values of velocity
- [[ConvectiveMatrix_test_6]] β mixed FEM for [[ReferenceLine_]]
- [[ConvectiveMatrix_test_7]] β for [[ReferenceTriangle_]]
- [[ConvectiveMatrix_test_8]] β for [[ReferenceTriangle_]] higher order
- [[ConvectiveMatrix_test_9]] β for [[ReferenceTriangle_]] mixed FEM
- [[ConvectiveMatrix_test_10]] β for [[ReferenceQuadrangle_]]
- [[ConvectiveMatrix_test_11]] β for [[ReferenceQuadrangle_]] for higher order
- [[ConvectiveMatrix_test_12]] β for [[ReferenceQuadrangle_]] for mixed FEM
- [[ConvectiveMatrix_test_13]] β for [[ReferenceTetrahedron_]]
- [[ConvectiveMatrix_test_14]] β for [[ReferenceTetrahedron_]] for higher order
- [[ConvectiveMatrix_test_15]] β for [[ReferenceTetrahedron_]] for mixed FEM
TODOβ
Now consider the following terms in a PDE.
where, , and . For this we may need to compute the following matrices.
- TODO Implement these methods.
We may want to compute following matrices
- TODO Implement these methods.
Examplesβ
| | | | | :------------------------------------------- | :------------------------------------------- | :------------------------------------------ | --- | | π©± Example 1 | π¬ Example 2 | 𧡠Example 3 | | | π Example 4 | π΅οΈββοΈ Example 5 | π― Example 6 | | | π Example 7 | ποΈ Example 8 | π Example 9 | | | βΊ Example 10 | π΄οΈ Example 11 | |