Skip to content

Commit bdaaa97

Browse files
Merge pull request #144 from vickysharma0812/dev
Refelement
2 parents 4001739 + 2e85df1 commit bdaaa97

28 files changed

+3372
-2
lines changed
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
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

src/modules/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ INCLUDE(${CMAKE_CURRENT_LIST_DIR}/Jacobi1D/CMakeLists.txt)
156156
# PolynomialFactory
157157
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/PolynomialFactory/CMakeLists.txt)
158158

159+
# RefElement
160+
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/RefElement/CMakeLists.txt)
161+
159162
# Tree3R
160163
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/Tree3R/CMakeLists.txt)
161164

src/modules/Polynomial3D/src/Polynomial3D_Class.F90

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ MODULE Polynomial3D_Class
3030
!> authors: Vikas Sharma, Ph. D.
3131
! date: 26 July 2022
3232
! summary: Polynomial3D class is defined
33-
!
3433

3534
TYPE, EXTENDS( AbstractFunction3D_ ) :: Polynomial3D_
3635
PRIVATE

src/modules/RefElement/CMakeLists.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
SET(src_path "${CMAKE_CURRENT_LIST_DIR}/src/")
19+
TARGET_SOURCES(
20+
${PROJECT_NAME} PRIVATE
21+
${src_path}/Topology_Class.F90
22+
${src_path}/AbstractRefElement_Class.F90
23+
${src_path}/RefPoint_Class.F90
24+
${src_path}/RefLine_Class.F90
25+
${src_path}/RefTriangle_Class.F90
26+
${src_path}/RefQuadrangle_Class.F90
27+
${src_path}/RefTetrahedron_Class.F90
28+
${src_path}/RefHexahedron_Class.F90
29+
${src_path}/RefPrism_Class.F90
30+
${src_path}/RefPyramid_Class.F90
31+
${src_path}/RefElementFactory.F90
32+
)

0 commit comments

Comments
 (0)