Skip to content

Commit

Permalink
Merge pull request #436 from easifem-fortran/dev
Browse files Browse the repository at this point in the history
January release of easifem-classes (v.23.10.3)
  • Loading branch information
vickysharma0812 authored Jan 31, 2024
2 parents 2d2af0a + 7223edc commit 7a00086
Show file tree
Hide file tree
Showing 115 changed files with 14,808 additions and 6,020 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ DOMAIN_CLASS_EXCEPTION.txt
log.txt
Amat.txt
*Pmat.txt

settings.json
.vscode/
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools",
"cmake.configureOnOpen": false,
}
7 changes: 4 additions & 3 deletions classes.code-workspace
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{

"folders": [
{
"path": "."
}
],

"settings": {
"cmake.installPrefix": "/home/easifem/.easifem/classes",
"cmake.configureOnEdit": false,
"fortran-ls.autocompletePrefix": false,
"fortran-ls.displayVerWarning": false
}
}

}
5 changes: 5 additions & 0 deletions src/modules/AbstractKernel/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@ target_sources(
${src_path}/AbstractKernel_Class.F90
${src_path}/KernelAssembleMassMatrix_Method.F90
${src_path}/KernelAssembleStiffnessMatrix_Method.F90
${src_path}/KernelAssembleDiffusionMatrix_Method.F90
${src_path}/KernelAssembleDampingMatrix_Method.F90
${src_path}/KernelAssembleElastoDynaMatrix_Method.F90
${src_path}/KernelAssembleSTElastoDynaMatrix_Method.F90
${src_path}/KernelAssembleSTAcousticMatrix_Method.F90
${src_path}/KernelAssembleBodySource_Method.F90
${src_path}/KernelAssembleSurfaceSource_Method.F90
${src_path}/KernelAssemblePointSource_Method.F90
${src_path}/KernelTensorProperty_Method.F90
${src_path}/KernelScalarProperty_Method.F90
${src_path}/KernelMatrixField_Method.F90
${src_path}/KernelElasticityProperties_Method.F90
${src_path}/SDAlgorithms.F90
${src_path}/CSDAlgorithms.F90
${src_path}/VST2Algorithms.F90
${src_path}/KernelUtility.F90)
81 changes: 73 additions & 8 deletions src/modules/AbstractKernel/src/AbstractKernel_Class.F90
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ MODULE AbstractKernel_Class
!! Domain of the problem
TYPE(ReferenceLine_) :: refTimeElem
!! reference element for time domain
TYPE(ReferenceLine_) :: refLinTimeElem
TYPE(ReferenceLine_) :: refGeoTimeElem
!! reference element for time domain
TYPE(String) :: baseContinuityForSpace
!! Continuity of basis function in space
Expand Down Expand Up @@ -329,31 +329,31 @@ MODULE AbstractKernel_Class
!! INFO: This is used in space-time computation
TYPE(FiniteElementPointer_), ALLOCATABLE :: cellFE(:)
!! Cell finite element
TYPE(FiniteElementPointer_), ALLOCATABLE :: linCellFE(:)
TYPE(FiniteElementPointer_), ALLOCATABLE :: geoCellFE(:)
!! Linear cell finite element
TYPE(FiniteElementPointer_), ALLOCATABLE :: facetFE(:)
!! Facet finite element
TYPE(FiniteElementPointer_), ALLOCATABLE :: linFacetFE(:)
TYPE(FiniteElementPointer_), ALLOCATABLE :: geoFacetFE(:)
!! Linear facet finite element
TYPE(FiniteElementPointer_), ALLOCATABLE :: edgeFE(:)
!! Edge finite element
TYPE(FiniteElementPointer_), ALLOCATABLE :: linEdgeFE(:)
TYPE(FiniteElementPointer_), ALLOCATABLE :: geoEdgeFE(:)
!! Linear edge finite element
TYPE(FiniteElement_) :: timeFE
!! Time finite element
TYPE(FiniteElement_) :: linTimeFE
TYPE(FiniteElement_) :: geoTimeFE
!! Linear time finite element
TYPE(ElemshapeData_) :: linTimeElemSD
TYPE(ElemshapeData_) :: geoTimeElemSD
!! Element shape data on linear time element #STFEM
TYPE(ElemshapeData_) :: timeElemSD
!! Element shape data on time element #STFEM
TYPE(ElemshapeData_), ALLOCATABLE :: linSpaceElemSD(:)
TYPE(ElemshapeData_), ALLOCATABLE :: geoSpaceElemSD(:)
!! Element shape data on linear space (simplex) element
!! cell data only
TYPE(ElemshapeData_), ALLOCATABLE :: spaceElemSD(:)
!! Element shape data on space element
!! cell data only
TYPE(ElemshapeData_), ALLOCATABLE :: linSpaceElemSD_facet(:)
TYPE(ElemshapeData_), ALLOCATABLE :: geoSpaceElemSD_facet(:)
!! Element shape data on linear space (simplex) element
!! facet element
TYPE(ElemshapeData_), ALLOCATABLE :: spaceElemSD_facet(:)
Expand Down Expand Up @@ -415,6 +415,8 @@ MODULE AbstractKernel_Class
!! List of space-time scalar fields
CLASS(MatrixField_), POINTER :: stiffnessMat => NULL()
!! Global Stiffness matrix
CLASS(MatrixField_), POINTER :: diffusionMat => NULL()
!! Global diffusion matrix
CLASS(MatrixField_), POINTER :: massMat => NULL()
!! Global mass matrix
CLASS(MatrixField_), POINTER :: dampingMat => NULL()
Expand All @@ -427,6 +429,12 @@ MODULE AbstractKernel_Class
!! Vector field for nodal acceleration
CLASS(VectorField_), POINTER :: nodeCoord => NULL()
!! Vector field for nodal coordinates
CLASS(ScalarField_), POINTER :: pressure => NULL()
!! scalar field for nodal pressure
CLASS(ScalarField_), POINTER :: p_velocity => NULL()
!! scalar field for nodal pressure
CLASS(ScalarField_), POINTER :: p_acceleration => NULL()
!! scalar field for nodal pressure
TYPE(VectorMeshFieldPointer_), ALLOCATABLE :: solidMechData(:)
!! Constitutive data for solid materials
TYPE(AbstractScalarMeshFieldPointer_), ALLOCATABLE :: massDensity(:)
Expand Down Expand Up @@ -454,6 +462,12 @@ MODULE AbstractKernel_Class
TYPE(AbstractVectorMeshFieldPointer_), ALLOCATABLE :: strain(:)
!! Strain tensor
!! This will be a tensor mesh field
! TYPE(AbstractScalarMeshFieldPointer_), ALLOCATABLE, target:: phase_velocity(:)
!! phase_velocity
!! This will be a scalar mesh field
TYPE(AbstractScalarMeshFieldPointer_), ALLOCATABLE :: scalarCoefficient(:)
!! it can be phase velocity or coefficient of permiabillity for isotropic medium
!! this will be a scalar mesh field
CLASS(UserFunction_), POINTER :: bodySourceFunc => NULL()
!! body force function

Expand Down Expand Up @@ -631,6 +645,12 @@ MODULE AbstractKernel_Class
PROCEDURE, PUBLIC, PASS(obj) :: SetDampingProperties => &
& obj_SetDampingProperties
!! Set Lame parameters for isotropic elasticity
PROCEDURE, PUBLIC, PASS(obj) :: InitiateScalarCoefficient => &
& obj_InitiateScalarCoefficient

PROCEDURE, PUBLIC, PASS(obj) :: SetScalarCoefficient => &
& obj_SetScalarCoefficient

PROCEDURE, PUBLIC, PASS(obj) :: SetMaterialToDomain => &
& obj_SetMaterialToDomain
!! Set material to mesh
Expand Down Expand Up @@ -678,6 +698,8 @@ MODULE AbstractKernel_Class
PROCEDURE, PUBLIC, PASS(obj) :: AssembleMassMat => obj_AssembleMassMat
PROCEDURE, PUBLIC, PASS(obj) :: AssembleStiffnessMat => &
& obj_AssembleStiffnessMat
PROCEDURE, PUBLIC, PASS(obj) :: AssembleDiffusionMat => &
& obj_AssembleDiffusionMat
PROCEDURE, PUBLIC, PASS(obj) :: AssembleDampingMat => &
& obj_AssembleDampingMat
PROCEDURE, PUBLIC, PASS(obj) :: AssembleNitscheMat => &
Expand Down Expand Up @@ -1548,6 +1570,35 @@ MODULE SUBROUTINE obj_SetDampingProperties(obj)
END SUBROUTINE obj_SetDampingProperties
END INTERFACE

!----------------------------------------------------------------------------
! obj_InitiateScalarCoefficient@MaterialMethods
!----------------------------------------------------------------------------

!> author: Shion Shimizu
! date: 2024-01-06
! summary: Initiate scalar coefficient for diffusion matrix

INTERFACE
MODULE SUBROUTINE obj_InitiateScalarCoefficient(obj, varname)
CLASS(AbstractKernel_), INTENT(INOUT) :: obj
CHARACTER(*), OPTIONAL, INTENT(IN) :: varname
END SUBROUTINE obj_InitiateScalarCoefficient
END INTERFACE

!----------------------------------------------------------------------------
! obj_SetScalarCoefficient@MaterialMethods
!----------------------------------------------------------------------------

!> author: Shion Shimizu
! date: 2024-01-06
! summary: Set scalar coefficient for diffusion matrix

INTERFACE
MODULE SUBROUTINE obj_SetScalarCoefficient(obj, varname)
CLASS(AbstractKernel_), INTENT(INOUT) :: obj
CHARACTER(*), OPTIONAL, INTENT(IN) :: varname
END SUBROUTINE obj_SetScalarCoefficient
END INTERFACE
!----------------------------------------------------------------------------
! AddDirichletBC@BCMethods
!----------------------------------------------------------------------------
Expand Down Expand Up @@ -1870,6 +1921,20 @@ MODULE SUBROUTINE obj_AssembleStiffnessMat(obj)
END SUBROUTINE obj_AssembleStiffnessMat
END INTERFACE

!----------------------------------------------------------------------------
! AssembleDiffusionMat@AssembleTanmatMethods
!----------------------------------------------------------------------------

!> authors: Shion Shimizu
! date: 2024-01-04
! summary: This subroutine assembles the diffusion matrix of the system

INTERFACE
MODULE SUBROUTINE obj_AssembleDiffusionMat(obj)
CLASS(AbstractKernel_), INTENT(INOUT) :: obj
END SUBROUTINE obj_AssembleDiffusionMat
END INTERFACE

!----------------------------------------------------------------------------
! AssembleDampingMat@AssembleTanmatMethods
!----------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 7a00086

Please sign in to comment.