Now the deferred apply is pass and I made some generic boundaries to use internally
This commit is contained in:
parent
0ccf455986
commit
c1b6cf1b31
2 changed files with 216 additions and 219 deletions
|
|
@ -589,8 +589,8 @@ MODULE moduleMesh
|
|||
TYPE, abstract, PUBLIC:: boundaryGeneric
|
||||
character(:), allocatable:: name
|
||||
contains
|
||||
procedure, pass:: init => initBoundary
|
||||
procedure(boundary_interface), deferred, nopass:: apply
|
||||
procedure, pass:: init => initBoundary
|
||||
procedure(boundary_interface), deferred, pass:: apply
|
||||
|
||||
END TYPE boundaryGeneric
|
||||
|
||||
|
|
@ -607,13 +607,13 @@ MODULE moduleMesh
|
|||
end interface
|
||||
|
||||
abstract interface
|
||||
subroutine boundary_interface(edge, part, self)
|
||||
subroutine boundary_interface(self, edge, part)
|
||||
use moduleSpecies
|
||||
import boundaryGeneric, meshEdge
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
class(boundaryGeneric), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine
|
||||
|
||||
|
|
@ -622,28 +622,28 @@ MODULE moduleMesh
|
|||
!Reflecting boundary
|
||||
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryReflection
|
||||
CONTAINS
|
||||
procedure, nopass:: apply => reflection
|
||||
procedure, pass:: apply => reflection
|
||||
|
||||
END TYPE boundaryReflection
|
||||
|
||||
!Absorption boundary
|
||||
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryAbsorption
|
||||
CONTAINS
|
||||
procedure, nopass:: apply => absorption
|
||||
procedure, pass:: apply => absorption
|
||||
|
||||
END TYPE boundaryAbsorption
|
||||
|
||||
!Transparent boundary
|
||||
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryTransparent
|
||||
CONTAINS
|
||||
procedure, nopass:: apply => transparent
|
||||
procedure, pass:: apply => transparent
|
||||
|
||||
END TYPE boundaryTransparent
|
||||
|
||||
!Symmetry axis
|
||||
TYPE, PUBLIC, EXTENDS(boundaryGeneric):: boundaryAxis
|
||||
CONTAINS
|
||||
procedure, nopass:: apply => axis
|
||||
procedure, pass:: apply => axis
|
||||
|
||||
END TYPE boundaryAxis
|
||||
|
||||
|
|
@ -652,7 +652,7 @@ MODULE moduleMesh
|
|||
!Thermal velocity of the wall: square root(Wall temperature X specific heat)
|
||||
REAL(8):: vTh
|
||||
CONTAINS
|
||||
procedure, nopass:: apply => wallTemperature
|
||||
procedure, pass:: apply => wallTemperature
|
||||
|
||||
END TYPE boundaryWallTemperature
|
||||
|
||||
|
|
@ -666,7 +666,7 @@ MODULE moduleMesh
|
|||
REAL(8):: eThreshold
|
||||
REAL(8):: deltaV
|
||||
CONTAINS
|
||||
procedure, nopass:: apply => ionization
|
||||
procedure, pass:: apply => ionization
|
||||
|
||||
END TYPE boundaryIonization
|
||||
|
||||
|
|
@ -675,80 +675,99 @@ MODULE moduleMesh
|
|||
real(8):: alpha ! Reflection parameter
|
||||
integer, allocatable:: edges(:) !Array with edges
|
||||
contains
|
||||
procedure, nopass:: apply => quasiNeutrality
|
||||
procedure, pass:: apply => quasiNeutrality
|
||||
|
||||
end type boundaryQuasiNeutrality
|
||||
|
||||
!Wrapper for boundary types (one per species)
|
||||
interface
|
||||
module subroutine pointBoundaryFunction(edge, s)
|
||||
module subroutine reflection(self, edge, part)
|
||||
use moduleSpecies
|
||||
|
||||
class(boundaryReflection), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine reflection
|
||||
|
||||
module subroutine absorption(self, edge, part)
|
||||
use moduleSpecies
|
||||
|
||||
class(boundaryAbsorption), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine absorption
|
||||
|
||||
module subroutine transparent(self, edge, part)
|
||||
use moduleSpecies
|
||||
|
||||
class(boundaryTransparent), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine transparent
|
||||
|
||||
module subroutine axis(self, edge, part)
|
||||
use moduleSpecies
|
||||
|
||||
class(boundaryAxis), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine axis
|
||||
|
||||
module subroutine wallTemperature(self, edge, part)
|
||||
use moduleSpecies
|
||||
|
||||
class(boundaryWallTemperature), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine wallTemperature
|
||||
|
||||
module subroutine ionization(self, edge, part)
|
||||
use moduleSpecies
|
||||
|
||||
class(boundaryIonization), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine ionization
|
||||
|
||||
module subroutine quasiNeutrality(self, edge, part)
|
||||
use moduleSpecies
|
||||
|
||||
class(boundaryQuasiNeutrality), intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine quasiNeutrality
|
||||
|
||||
! Generic basic boundary conditions to use internally in the code
|
||||
module subroutine genericReflection(edge, part)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
integer, intent(in):: s !Species index
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine pointBoundaryFunction
|
||||
end subroutine genericReflection
|
||||
|
||||
module subroutine reflection(edge, part, self)
|
||||
use moduleSpecies
|
||||
module subroutine genericAbsorption(edge, part)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine reflection
|
||||
end subroutine genericAbsorption
|
||||
|
||||
module subroutine absorption(edge, part, self)
|
||||
use moduleSpecies
|
||||
module subroutine genericTransparent(edge, part)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
|
||||
end subroutine absorption
|
||||
|
||||
module subroutine transparent(edge, part, self)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine transparent
|
||||
|
||||
module subroutine axis(edge, part, self)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine axis
|
||||
|
||||
module subroutine wallTemperature(edge, part, self)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine wallTemperature
|
||||
|
||||
module subroutine ionization(edge, part, self)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine ionization
|
||||
|
||||
module subroutine quasiNeutrality(edge, part, self)
|
||||
use moduleSpecies
|
||||
|
||||
class(meshEdge), intent(inout):: edge
|
||||
class(particle), intent(inout):: part
|
||||
class(boundaryGeneric), optional, intent(in):: self
|
||||
|
||||
end subroutine quasiNeutrality
|
||||
end subroutine genericTransparent
|
||||
|
||||
end interface
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue