|
| 1 | +! This program is a part of EASIFEM library |
| 2 | +! Copyright (C) 2020-2021 Vikas Sharma, Ph.D |
| 3 | +! |
| 4 | +! This program is free software: you can redistribute it and/or modify |
| 5 | +! it under the terms of the GNU General Public License as published by |
| 6 | +! the Free Software Foundation, either version 3 of the License, or |
| 7 | +! (at your option) any later version. |
| 8 | +! |
| 9 | +! This program is distributed in the hope that it will be useful, |
| 10 | +! but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | +! GNU General Public License for more details. |
| 13 | +! |
| 14 | +! You should have received a copy of the GNU General Public License |
| 15 | +! along with this program. If not, see <https: //www.gnu.org/licenses/> |
| 16 | +! |
| 17 | + |
| 18 | +MODULE AbstractFiniteElement_Class |
| 19 | +USE GlobalData |
| 20 | +USE AbstractRefElement_Class |
| 21 | +IMPLICIT NONE |
| 22 | +PRIVATE |
| 23 | + !! |
| 24 | +CHARACTER(LEN=*), PARAMETER :: modName = "AbstractFiniteElement_Class" |
| 25 | + |
| 26 | +!---------------------------------------------------------------------------- |
| 27 | +! AbstractRefElement_ |
| 28 | +!---------------------------------------------------------------------------- |
| 29 | + |
| 30 | +!> author: Vikas Sharma, Ph. D. |
| 31 | +! date: 27 Aug 2022 |
| 32 | +! summary: Abstract class for finite element is defined |
| 33 | +! |
| 34 | +!{!pages/AbstractFiniteElement_.md!} |
| 35 | + |
| 36 | +TYPE, ABSTRACT :: AbstractFiniteElement_ |
| 37 | + PRIVATE |
| 38 | + INTEGER(I4B) :: order = 0 |
| 39 | + !! Isotropic order of polynomial space |
| 40 | + INTEGER(I4B) :: refelem = 0 |
| 41 | + !! name of reference element |
| 42 | + INTEGER(I4B) :: polySpace = 0 |
| 43 | + !! name of polynomial space |
| 44 | + INTEGER(I4B) :: pointDOFType = 0 |
| 45 | + !! type of dof for shape function defined on vertex |
| 46 | + INTEGER(I4B) :: edgeDOFType = 0 |
| 47 | + !! type of dof for shape functions on edge |
| 48 | + INTEGER(I4B) :: faceDOFType = 0 |
| 49 | + !! type of dof for shape functions on face |
| 50 | + INTEGER(I4B) :: cellDOFType = 0 |
| 51 | + !! type of dof for shape functions in cell |
| 52 | + INTEGER(I4B) :: transformType = 0 |
| 53 | + !! type of Tranformation usef for polynomial space |
| 54 | + INTEGER(I4B) :: latticeType = 0 |
| 55 | + !! type of lattice (interpolation point type) point |
| 56 | + ! CLASS(AbstractRefElement_), POINTER :: refelem => NULL() |
| 57 | +CONTAINS |
| 58 | + !! |
| 59 | + !! @ConstructorMethods |
| 60 | + !! |
| 61 | + PROCEDURE(fe_Initiate), DEFERRED, PUBLIC, PASS(obj) :: Initiate |
| 62 | +END TYPE AbstractFiniteElement_ |
| 63 | +!! |
| 64 | +PUBLIC :: AbstractFiniteElement_ |
| 65 | +!! |
| 66 | +!---------------------------------------------------------------------------- |
| 67 | +! AbstractFiniteElementPointer_ |
| 68 | +!---------------------------------------------------------------------------- |
| 69 | + |
| 70 | +TYPE :: AbstractFiniteElementPointer_ |
| 71 | + CLASS(AbstractFiniteElement_), POINTER :: ptr => NULL() |
| 72 | +END TYPE AbstractFiniteElementPointer_ |
| 73 | + |
| 74 | +PUBLIC :: AbstractFiniteElementPointer_ |
| 75 | + |
| 76 | +!---------------------------------------------------------------------------- |
| 77 | +! Initiate@ConstructorMethods |
| 78 | +!---------------------------------------------------------------------------- |
| 79 | + |
| 80 | +!> author: Vikas Sharma, Ph. D. |
| 81 | +! date: 27 Aug 2022 |
| 82 | +! summary: Initiate the finite element |
| 83 | + |
| 84 | +ABSTRACT INTERFACE |
| 85 | + SUBROUTINE fe_Initiate(obj, elemType, feType, order, latticeType) |
| 86 | + IMPORT :: AbstractFiniteElement_, I4B |
| 87 | + CLASS(AbstractFiniteElement_), INTENT(INOUT) :: obj |
| 88 | + INTEGER(I4B), INTENT(IN) :: elemType |
| 89 | + INTEGER(I4B), INTENT(IN) :: feType |
| 90 | + INTEGER(I4B), INTENT(IN) :: order |
| 91 | + INTEGER(I4B), OPTIONAL, INTENT(IN) :: latticeType |
| 92 | + END SUBROUTINE fe_Initiate |
| 93 | +END INTERFACE |
| 94 | + |
| 95 | +END MODULE AbstractFiniteElement_Class |
0 commit comments