Skip to content

Commit dc2e6ff

Browse files
authored
Merge pull request #220 from vickysharma0812/shion
Update in AbstractBC_Class
2 parents 0c58297 + 479b7f9 commit dc2e6ff

File tree

4 files changed

+172
-1
lines changed

4 files changed

+172
-1
lines changed

src/modules/AbstractBC/src/AbstractBC_Class.F90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ MODULE SUBROUTINE bc_Set(obj, constantNodalValue, spaceNodalValue, &
492492
REAL(DFP), OPTIONAL, INTENT(IN) :: spaceNodalValue(:)
493493
REAL(DFP), OPTIONAL, INTENT(IN) :: timeNodalValue(:)
494494
REAL(DFP), OPTIONAL, INTENT(IN) :: spaceTimeNodalValue(:, :)
495-
TYPE(UserFunction_), POINTER, OPTIONAL, INTENT(IN) :: userFunction
495+
TYPE(UserFunction_), TARGET, OPTIONAL, INTENT(IN) :: userFunction
496496
END SUBROUTINE bc_Set
497497
END INTERFACE
498498

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+
SUBMODULE(LinearPoroElasticModel_Class) GetMethods
19+
IMPLICIT NONE
20+
CONTAINS
21+
22+
!----------------------------------------------------------------------------
23+
! lpem_GetElasticParam
24+
!----------------------------------------------------------------------------
25+
26+
MODULE PROCEDURE lpem_GetElasticParam
27+
IF (PRESENT(PoissonRatio)) PoissonRatio = obj%nu
28+
IF (PRESENT(ShearModulus)) ShearModulus = obj%G
29+
IF (PRESENT(YoungsModulus)) YoungsModulus = obj%E
30+
IF (PRESENT(lambda)) lambda = obj%lambda
31+
END PROCEDURE lpem_GetElasticParam
32+
33+
!----------------------------------------------------------------------------
34+
! lpem_GetC
35+
!----------------------------------------------------------------------------
36+
37+
MODULE PROCEDURE lpem_GetC
38+
C = obj%C
39+
END PROCEDURE lpem_GetC
40+
41+
!----------------------------------------------------------------------------
42+
! lpem_GetInvC
43+
!----------------------------------------------------------------------------
44+
45+
MODULE PROCEDURE lpem_GetInvC
46+
InvC = obj%InvC
47+
END PROCEDURE lpem_GetInvC
48+
49+
!----------------------------------------------------------------------------
50+
! GetElasticityType
51+
!----------------------------------------------------------------------------
52+
53+
MODULE PROCEDURE lpem_GetElasticityType
54+
ans = obj%elasticityType
55+
END PROCEDURE lpem_GetElasticityType
56+
57+
!----------------------------------------------------------------------------
58+
! GetParam
59+
!----------------------------------------------------------------------------
60+
61+
MODULE PROCEDURE lpem_GetParam
62+
IF (PRESENT(elasticityType)) elasticityType = obj%elasticityType
63+
IF (PRESENT(nu)) nu = obj%nu
64+
IF (PRESENT(G)) G = obj%G
65+
IF (PRESENT(youngsModulus)) youngsModulus = obj%E
66+
IF (PRESENT(lambda)) lambda = obj%lambda
67+
IF (PRESENT(C)) C = obj%C
68+
IF (PRESENT(invC)) invC = obj%invC
69+
END PROCEDURE lpem_GetParam
70+
71+
END SUBMODULE GetMethods
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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+
SUBMODULE(NewtonianFluidModel_Class) GetMethods
19+
IMPLICIT NONE
20+
CONTAINS
21+
22+
!----------------------------------------------------------------------------
23+
!
24+
!----------------------------------------------------------------------------
25+
26+
MODULE PROCEDURE nfm_GetDynamicViscosity
27+
DynamicViscosity = obj%Mu
28+
END PROCEDURE nfm_GetDynamicViscosity
29+
30+
!----------------------------------------------------------------------------
31+
!
32+
!----------------------------------------------------------------------------
33+
34+
MODULE PROCEDURE nfm_GetModelParameters
35+
INTEGER(I4B) :: ierr
36+
IF (obj%isInitiated()) THEN
37+
ierr = param%set(key=myprefix//"/name", &
38+
& VALUE="NewtonianFluidModel")
39+
ierr = param%set(key=myprefix//"/dynamicViscosity", VALUE=obj%Mu)
40+
END IF
41+
END PROCEDURE nfm_GetModelParameters
42+
43+
!----------------------------------------------------------------------------
44+
!
45+
!----------------------------------------------------------------------------
46+
47+
MODULE PROCEDURE nfm_GetPrefix
48+
ans = myprefix
49+
END PROCEDURE nfm_GetPrefix
50+
51+
!----------------------------------------------------------------------------
52+
! GetParam
53+
!----------------------------------------------------------------------------
54+
55+
MODULE PROCEDURE nfm_GetParam
56+
IF (PRESENT(dynamicViscosity)) dynamicViscosity = obj%mu
57+
END PROCEDURE nfm_GetParam
58+
59+
END SUBMODULE GetMethods
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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+
SUBMODULE(NewtonianFluidModel_Class) SetMethods
19+
IMPLICIT NONE
20+
CONTAINS
21+
22+
!----------------------------------------------------------------------------
23+
!
24+
!----------------------------------------------------------------------------
25+
26+
MODULE PROCEDURE nfm_SetModelParameters
27+
INTEGER(I4B) :: ierr
28+
IF (param%IsPresent(key=myprefix//"/dynamicViscosity")) THEN
29+
ierr = param%Get(key=myprefix//"/dynamicViscosity", VALUE=obj%mu)
30+
END IF
31+
END PROCEDURE nfm_SetModelParameters
32+
33+
!----------------------------------------------------------------------------
34+
! SetParam
35+
!----------------------------------------------------------------------------
36+
37+
MODULE PROCEDURE nfm_SetParam
38+
IF (PRESENT(dynamicViscosity)) obj%mu = dynamicViscosity
39+
END PROCEDURE nfm_SetParam
40+
41+
END SUBMODULE SetMethods

0 commit comments

Comments
 (0)