Skip to content
Merged

Dev #172

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
bb84746
modified cmakelist modules
vickysharma0812 Sep 7, 2022
12430c3
modified base method
vickysharma0812 Sep 7, 2022
683bd8b
:mod globaldata
vickysharma0812 Sep 7, 2022
d7b5f45
:mod intvector
vickysharma0812 Sep 7, 2022
77c0b3b
:add multiindices
vickysharma0812 Sep 7, 2022
b0b4f23
:mod polynomial
vickysharma0812 Sep 7, 2022
75a2a44
:added legendre polynomial
vickysharma0812 Sep 7, 2022
2055e5f
:added recursive nodes
vickysharma0812 Sep 7, 2022
ea0081e
:mod jacobi polynomials
vickysharma0812 Sep 7, 2022
ff9865d
:modified line interpolation
vickysharma0812 Sep 7, 2022
40def95
:mod polynomial utility
vickysharma0812 Sep 7, 2022
33e67d9
:mod utility
vickysharma0812 Sep 7, 2022
12bc9df
:added push pop utility
vickysharma0812 Sep 7, 2022
205e6aa
:mod binom utility
vickysharma0812 Sep 7, 2022
4e707a9
:mod integer utility
vickysharma0812 Sep 7, 2022
8c9c339
:mod utility
vickysharma0812 Sep 7, 2022
b5a92fa
:mod cmakelist submodules
vickysharma0812 Sep 7, 2022
6067bb6
:mod intvector
vickysharma0812 Sep 7, 2022
0680c64
:mod polynomial
vickysharma0812 Sep 7, 2022
fae6868
:added recursive nodes
vickysharma0812 Sep 7, 2022
acb8314
:modified jacobi polynomial
vickysharma0812 Sep 7, 2022
3364d0d
:mod line interpolation
vickysharma0812 Sep 7, 2022
69d836c
:mod utility
vickysharma0812 Sep 7, 2022
49ce2fa
:added pushpop
vickysharma0812 Sep 7, 2022
b822897
:mod utility
vickysharma0812 Sep 7, 2022
0ffa8db
:added push pop
vickysharma0812 Sep 7, 2022
1ccb9f5
Legendr, Lobatto, and Unscaled Lobatto polynomials added.
vickysharma0812 Oct 8, 2022
f95bfa6
undefined
vickysharma0812 Oct 29, 2022
0d12939
undefined
vickysharma0812 Oct 29, 2022
ee1cf97
undefined
vickysharma0812 Oct 29, 2022
afe5457
undefined
vickysharma0812 Oct 29, 2022
8e321fd
undefined
vickysharma0812 Oct 29, 2022
79ae6d1
undefined
vickysharma0812 Oct 29, 2022
9d10439
undefined
vickysharma0812 Oct 29, 2022
48248e4
undefined
vickysharma0812 Oct 29, 2022
a54e584
undefined
vickysharma0812 Oct 29, 2022
b79d085
undefined
vickysharma0812 Oct 29, 2022
bd50894
undefined
vickysharma0812 Oct 29, 2022
293431b
undefined
vickysharma0812 Oct 29, 2022
db24be4
undefined
vickysharma0812 Oct 29, 2022
8ace540
undefined
vickysharma0812 Oct 29, 2022
85704e3
polynomials modified
vickysharma0812 Oct 31, 2022
1bfe579
TriangleInterpolation
vickysharma0812 Oct 31, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/modules/BaseMethod/src/BaseMethod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ MODULE BaseMethod
USE Utility
USE PolynomialUtility
USE BaseType
USE MultiIndices_Method
USE Random_Method
USE BoundingBox_Method
USE IntVector_Method
Expand Down
46 changes: 43 additions & 3 deletions src/modules/BaseType/src/BaseType.F90
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ MODULE BaseType
!> author: Vikas Sharma, Ph. D.
! date: 23 Feb 2021
! summary: Degree of freedom object type
!
!{!pages/DOF.md!}

TYPE :: DOF_
INTEGER(I4B), ALLOCATABLE :: map(:, :)
Expand Down Expand Up @@ -661,7 +659,7 @@ MODULE BaseType
PUBLIC :: ReferenceElementPointer_

INTERFACE
PURE SUBROUTINE highorder_refelem(obj, order, highOrderobj, ipType)
SUBROUTINE highorder_refelem(obj, order, highOrderobj, ipType)
IMPORT :: ReferenceElement_, I4B
CLASS(ReferenceElement_), INTENT(IN) :: obj
INTEGER(I4B), INTENT(IN) :: order
Expand Down Expand Up @@ -1502,6 +1500,48 @@ END FUNCTION iface_TimeFunction

PUBLIC :: iface_TimeFunction

!----------------------------------------------------------------------------
!
!----------------------------------------------------------------------------

ABSTRACT INTERFACE
PURE FUNCTION iface_1DFunction(x) RESULT(ans)
IMPORT :: DFP
REAL(DFP), INTENT(IN) :: x
REAL(DFP) :: ans
END FUNCTION iface_1DFunction
END INTERFACE

PUBLIC :: iface_1DFunction

!----------------------------------------------------------------------------
!
!----------------------------------------------------------------------------

ABSTRACT INTERFACE
PURE FUNCTION iface_2DFunction(x, y) RESULT(ans)
IMPORT :: DFP
REAL(DFP), INTENT(IN) :: x, y
REAL(DFP) :: ans
END FUNCTION iface_2DFunction
END INTERFACE

PUBLIC :: iface_2DFunction

!----------------------------------------------------------------------------
!
!----------------------------------------------------------------------------

ABSTRACT INTERFACE
PURE FUNCTION iface_3DFunction(x, y, z) RESULT(ans)
IMPORT :: DFP
REAL(DFP), INTENT(IN) :: x, y, z
REAL(DFP) :: ans
END FUNCTION iface_3DFunction
END INTERFACE

PUBLIC :: iface_3DFunction

!----------------------------------------------------------------------------
! MultiIndices_
!----------------------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions src/modules/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ INCLUDE(${CMAKE_CURRENT_LIST_DIR}/Polynomial/CMakeLists.txt)
#BaseType
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/BaseType/CMakeLists.txt)

#MultiIndices
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/MultiIndices/CMakeLists.txt)

#OpenMP
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/OpenMP/CMakeLists.txt)

Expand Down
8 changes: 5 additions & 3 deletions src/modules/DOF/src/DOF_Method.F90
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
!

!> author: Vikas Sharma, Ph. D.
! date: 23 Feb 2021
! summary: This module contains methods of [[DOF_]] object
! date: 23 Feb 2021
! summary: This module contains methods of [[DOF_]] object
!
!# Introduction
!This module contains methods for derived type called [[DOF_]]
!
!{!pages/DOF.md!}

MODULE DOF_Method
USE GlobalData
Expand All @@ -35,4 +37,4 @@ MODULE DOF_Method
#include "./GetMethods.inc"
#include "./GetValueMethods.inc"

END MODULE DOF_Method
END MODULE DOF_Method
126 changes: 63 additions & 63 deletions src/modules/ErrorHandling/src/ErrorHandling.F90
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
! along with this program. If not, see <https: //www.gnu.org/licenses/>
!


!> [[ErrorHandling]] module contains error handling routines.

MODULE ErrorHandling
Expand All @@ -27,6 +26,7 @@ MODULE ErrorHandling
PUBLIC :: Errormsg, Warningmsg, fileError, AllocationErr

CONTAINS

!----------------------------------------------------------------------------
! Errormsg
!----------------------------------------------------------------------------
Expand All @@ -45,25 +45,25 @@ MODULE ErrorHandling
! )
! ```

SUBROUTINE Errormsg( msg, file, routine, line, unitno )
CHARACTER( LEN = * ), INTENT( IN ) :: msg
SUBROUTINE Errormsg(msg, file, routine, line, unitno)
CHARACTER(LEN=*), INTENT(IN) :: msg
!! Message
CHARACTER( LEN = * ), INTENT( IN ) :: file
CHARACTER(LEN=*), INTENT(IN) :: file
!! Name of the file
CHARACTER( LEN = * ), INTENT( IN ) :: routine
CHARACTER(LEN=*), INTENT(IN) :: routine
!! Name of the routine where error has occured
INTEGER( I4B ), INTENT( IN ) :: line
INTEGER(I4B), INTENT(IN) :: line
!! line number where error has occured
INTEGER( I4B ), OPTIONAL, INTENT( IN ) :: unitno
INTEGER(I4B), OPTIONAL, INTENT(IN) :: unitno
!! Unit number
!!
CALL Display( file, "ERROR :: In file :: ", unitno = unitno )
CALL Display( LINE, "at line number :: ", unitno = unitno )
CALL Display( " ", "in routine named :: "// TRIM(routine) // &
& " with following message :: ", unitno = unitno )
CALL Dashline(unitno = unitno)
CALL Display( msg, unitno = unitno )
CALL Dashline(unitno = unitno)
CALL Display(file, "ERROR :: In file :: ", unitno=unitno)
CALL Display(LINE, "at line number :: ", unitno=unitno)
CALL Display(" ", "in routine named :: "//TRIM(routine)// &
& " with following message :: ", unitno=unitno)
CALL Dashline(unitno=unitno)
CALL Display(msg, unitno=unitno)
CALL Dashline(unitno=unitno)
END SUBROUTINE Errormsg

!----------------------------------------------------------------------------
Expand All @@ -74,26 +74,26 @@ END SUBROUTINE Errormsg
!
! This subroutine prints the warning message

SUBROUTINE Warningmsg( msg, file, routine, line, unitno )
SUBROUTINE Warningmsg(msg, file, routine, line, unitno)
!! This subroutine prints the warning message
CHARACTER( LEN = * ), INTENT( IN ) :: msg
CHARACTER(LEN=*), INTENT(IN) :: msg
!! Message
CHARACTER( LEN = * ), INTENT( IN ) :: file
CHARACTER(LEN=*), INTENT(IN) :: file
!! Name of the file
CHARACTER( LEN = * ), INTENT( IN ) :: routine
CHARACTER(LEN=*), INTENT(IN) :: routine
!! Name of the routine where error has occured
INTEGER( I4B ), OPTIONAL, INTENT( IN ) :: unitno
INTEGER(I4B), OPTIONAL, INTENT(IN) :: unitno
!! file id to write the message to
INTEGER( I4B ), INTENT( IN ) :: line
INTEGER(I4B), INTENT(IN) :: line
!! line number
!!
CALL Display( file, "WARNING :: In file ::", unitno = unitno )
CALL Display( LINE, "line number ::", unitno = unitno )
CALL Display( " ", "in routine named :: "// TRIM(routine) // &
& " with following message :: ", unitno = unitno )
CALL Dashline(unitno = unitno)
CALL Display( msg, unitno = unitno )
CALL Dashline(unitno = unitno)
CALL Display(file, "WARNING :: In file ::", unitno=unitno)
CALL Display(LINE, "line number ::", unitno=unitno)
CALL Display(" ", "in routine named :: "//TRIM(routine)// &
& " with following message :: ", unitno=unitno)
CALL Dashline(unitno=unitno)
CALL Display(msg, unitno=unitno)
CALL Dashline(unitno=unitno)
END SUBROUTINE Warningmsg

!----------------------------------------------------------------------------
Expand All @@ -104,46 +104,46 @@ END SUBROUTINE Warningmsg
!
! This subroutine prints error while handling a file

SUBROUTINE fileError(istat, filename, flg, unitno, file, routine, line )
SUBROUTINE fileError(istat, filename, flg, unitno, file, routine, line)
! Dummy argumnet
INTEGER( I4B ), INTENT( IN ) :: istat
INTEGER(I4B), INTENT(IN) :: istat
!! Result of iostat=istat for open,read,write,close
CHARACTER(len=*), INTENT( IN ) :: filename
CHARACTER(len=*), INTENT(IN) :: filename
!! Name of the file (IO related)
INTEGER( I4B ), INTENT( IN ) :: flg
INTEGER(I4B), INTENT(IN) :: flg
!! IO_OPEN=Open, IO_READ=Read, IO_WRITE=Write, IO_CLOSE=Close
INTEGER( I4B ), OPTIONAL, INTENT( IN ) :: unitno
INTEGER(I4B), OPTIONAL, INTENT(IN) :: unitno
!! file id to write the error to
CHARACTER( LEN = * ), INTENT( IN ) :: file, routine
CHARACTER(LEN=*), INTENT(IN) :: file, routine
!! Name of the source code file and routine name
INTEGER( I4B ), INTENT( IN ) :: line
INTEGER(I4B), INTENT(IN) :: line
!! line number
!!
! Define internal variables
CHARACTER(len=:),allocatable :: Amsg
CHARACTER(len=:), allocatable :: Amsg
!!
! Return if no error
IF ( istat == 0 ) THEN
IF (istat == 0) THEN
RETURN
END IF
!!
Amsg = ""
!!
SELECT CASE(flg)
CASE(OPT_OPEN)
Amsg='Opening file: '// TRIM(filename)
CASE(OPT_READ)
Amsg='Reading from: '// TRIM(filename)
CASE(OPT_WRITE)
Amsg='Writing to file: '// TRIM(filename)
CASE(OPT_CLOSE)
Amsg='Closing file: '// TRIM(filename)
SELECT CASE (flg)
CASE (OPT_OPEN)
Amsg = 'Opening file: '//TRIM(filename)
CASE (OPT_READ)
Amsg = 'Reading from: '//TRIM(filename)
CASE (OPT_WRITE)
Amsg = 'Writing to file: '//TRIM(filename)
CASE (OPT_CLOSE)
Amsg = 'Closing file: '//TRIM(filename)
CASE DEFAULT
Amsg='Error:Invalid error flag [1-4]'
Amsg = 'Error:Invalid error flag [1-4]'
END SELECT
!!
CALL Errormsg( msg=Amsg, unitno=unitno, file=file, line=line, &
& routine=routine )
CALL Errormsg(msg=Amsg, unitno=unitno, file=file, line=line, &
& routine=routine)
!!
END SUBROUTINE fileError

Expand All @@ -160,33 +160,33 @@ END SUBROUTINE fileError
! allocate(x(nz,ny,nx), stat=istat); call AllocationErr(istat,'x',1)
! deallocate(x, stat=istat); call AllocationErr(istat,'x',2)

SUBROUTINE AllocationErr( istat, amsg, alloc, unitno, file, routine, line)
INTEGER( I4B ), INTENT( IN ) :: istat
SUBROUTINE AllocationErr(istat, amsg, alloc, unitno, file, routine, line)
INTEGER(I4B), INTENT(IN) :: istat
!! results of stat=istat in (de)allocate
CHARACTER(LEN=*), INTENT( IN ) :: amsg
CHARACTER(LEN=*), INTENT(IN) :: amsg
!! Message associated with the (de)allocate
INTEGER( I4B ), INTENT( IN ) :: alloc
INTEGER(I4B), INTENT(IN) :: alloc
!! For OPT_ALLOC = allocate, for OPT_DEALLOC = deallocate
INTEGER( I4B ), OPTIONAL, INTENT( IN ) :: unitno
INTEGER(I4B), OPTIONAL, INTENT(IN) :: unitno
!! Optional file id to write the message to
CHARACTER( LEN = * ), INTENT( IN ) :: file, routine
CHARACTER(LEN=*), INTENT(IN) :: file, routine
!! filename and routine name
INTEGER( I4B ), INTENT( IN ) :: line
INTEGER(I4B), INTENT(IN) :: line
!!
! Define internal variables
CHARACTER( LEN = : ), ALLOCATABLE :: tmp
CHARACTER(LEN=:), ALLOCATABLE :: tmp
!!
IF ( istat == 0 ) RETURN
IF (istat == 0) RETURN
!!
tmp = ""
SELECT CASE( alloc )
CASE( OPT_ALLOC )
tmp='Allocating Memory: '// TRIM( amsg )
CASE( OPT_DEALLOC )
tmp='Deallocating Memory: '// TRIM( amsg )
SELECT CASE (alloc)
CASE (OPT_ALLOC)
tmp = 'Allocating Memory: '//TRIM(amsg)
CASE (OPT_DEALLOC)
tmp = 'Deallocating Memory: '//TRIM(amsg)
END SELECT
!!
CALL Errormsg( msg=tmp, unitno=unitno, file=file, line=line, &
CALL Errormsg(msg=tmp, unitno=unitno, file=file, line=line, &
& routine=routine)
!!
END SUBROUTINE AllocationErr
Expand Down
Loading