Structure for Neumann BC
This commit is contained in:
parent
e5519cee2d
commit
4da3bf120c
2 changed files with 48 additions and 0 deletions
|
|
@ -1056,6 +1056,33 @@ MODULE moduleMesh
|
||||||
|
|
||||||
end interface
|
end interface
|
||||||
|
|
||||||
|
! Neumann boundary condition (constant electric field normal to edge)
|
||||||
|
type, extends(boundaryEMGeneric):: boundaryEMNeumann
|
||||||
|
real(8):: electricField ! Electric field normal to the edge
|
||||||
|
contains
|
||||||
|
! boundaryEMGeneric deferred procedures
|
||||||
|
procedure, pass:: apply => applyNeumann
|
||||||
|
|
||||||
|
end type boundaryEMNeumann
|
||||||
|
|
||||||
|
interface
|
||||||
|
module subroutine initNeumann(self, config, object)
|
||||||
|
use json_module
|
||||||
|
|
||||||
|
class(boundaryEMGeneric), allocatable, intent(inout):: self
|
||||||
|
type(json_file), intent(inout):: config
|
||||||
|
character(:), allocatable, intent(in):: object
|
||||||
|
|
||||||
|
end subroutine initNeumann
|
||||||
|
|
||||||
|
module subroutine applyNeumann(self, vectorF)
|
||||||
|
class(boundaryEMNeumann), intent(in):: self
|
||||||
|
real(8), intent(inout):: vectorF(:)
|
||||||
|
|
||||||
|
end subroutine applyNeumann
|
||||||
|
|
||||||
|
end interface
|
||||||
|
|
||||||
! Floating: Floating surface, ie, zero net current
|
! Floating: Floating surface, ie, zero net current
|
||||||
type, extends(boundaryEMGeneric):: boundaryEMFloating
|
type, extends(boundaryEMGeneric):: boundaryEMFloating
|
||||||
real(8):: potential
|
real(8):: potential
|
||||||
|
|
|
||||||
|
|
@ -123,6 +123,27 @@ submodule(moduleMesh) boundaryEM
|
||||||
|
|
||||||
end subroutine updateDirichletTime
|
end subroutine updateDirichletTime
|
||||||
|
|
||||||
|
! Neumann constant value
|
||||||
|
! Init
|
||||||
|
module subroutine initNeumann(self, config, object)
|
||||||
|
use json_module
|
||||||
|
implicit none
|
||||||
|
|
||||||
|
class(boundaryEMGeneric), allocatable, intent(inout):: self
|
||||||
|
type(json_file), intent(inout):: config
|
||||||
|
character(:), allocatable, intent(in):: object
|
||||||
|
|
||||||
|
end subroutine initNeumann
|
||||||
|
|
||||||
|
! Apply
|
||||||
|
module subroutine applyNeumann(self, vectorF)
|
||||||
|
implicit none
|
||||||
|
|
||||||
|
class(boundaryEMNeumann), intent(in):: self
|
||||||
|
real(8), intent(inout):: vectorF(:)
|
||||||
|
|
||||||
|
end subroutine applyNeumann
|
||||||
|
|
||||||
! Floating surface
|
! Floating surface
|
||||||
! Init
|
! Init
|
||||||
module subroutine initFloating(self, config, object)
|
module subroutine initFloating(self, config, object)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue