Inject fixed. Now getting close to input
This commit is contained in:
parent
70f6db0883
commit
5dfc8d4ce9
2 changed files with 67 additions and 46 deletions
|
|
@ -1128,12 +1128,35 @@ MODULE moduleInput
|
|||
!Builds the K matrix for the Particles mesh
|
||||
CALL mesh%constructGlobalK()
|
||||
|
||||
!Assign the procedure to find a volume for meshColl
|
||||
!Assign the procedure to find a cell for meshColl
|
||||
IF (doubleMesh) THEN
|
||||
findCellColl => findCellCollMesh
|
||||
! Link edges with cells in meshColl
|
||||
DO e=1, mesh%numEdges
|
||||
nVolColl = findCellBrute(meshColl, mesh%edges(e)%obj%randPos())
|
||||
IF (nVolColl > 0) THEN
|
||||
mesh%edges(e)%obj%eColl => meshColl%cells(nVolColl)%obj
|
||||
|
||||
ELSE
|
||||
CALL criticalError("No connection between edge and meshColl", "initInject")
|
||||
|
||||
END IF
|
||||
|
||||
end do
|
||||
|
||||
ELSE
|
||||
findCellColl => findCellSameMesh
|
||||
! Link edges with cells in meshColl
|
||||
DO e=1, mesh%numEdges
|
||||
IF (ASSOCIATED(mesh%edges(e)%obj%e1)) THEN
|
||||
mesh%edges(e)%obj%eColl => mesh%edges(e)%obj%e1
|
||||
|
||||
ELSE
|
||||
mesh%edges(e)%obj%eColl => mesh%edges(e)%obj%e2
|
||||
|
||||
END IF
|
||||
|
||||
end do
|
||||
|
||||
END IF
|
||||
|
||||
|
|
@ -1142,10 +1165,35 @@ MODULE moduleInput
|
|||
do b = 1, nBoundariesParticle
|
||||
select type(bound => boundariesParticle(b)%obj)
|
||||
type is(boundaryQuasiNeutrality)
|
||||
! Loop over all physical surfaces
|
||||
do ps = 1, nPhysicalSurfaces
|
||||
do s = 1, nSpecies
|
||||
if (associated(physicalSurfaces(ps)%particles(s), bound)) then
|
||||
! Loop over all physical surfaces
|
||||
do ps = 1, nPhysicalSurfaces
|
||||
! Loop over all species
|
||||
do s = 1, nSpecies
|
||||
! If the boundary for the species is linked to the one analysing, add the edges
|
||||
if (associated(physicalSurfaces(ps)%particles(s), bound)) then
|
||||
bound%edges = [bound%edges, physicalSurfaces(ps)%edges]
|
||||
end if
|
||||
|
||||
end do
|
||||
|
||||
end do
|
||||
|
||||
end select
|
||||
|
||||
end do
|
||||
|
||||
! EM Boundaries
|
||||
do b = 1, nBoundariesEM
|
||||
select type(bound => boundariesEM(b)%obj)
|
||||
type is(boundaryEMDirichlet)
|
||||
! Loop over all physical surfaces
|
||||
do ps = 1, nPhysicalSurfaces
|
||||
! If the boundary for the species is linked to the one analysing, add the edges
|
||||
if (associated(physicalSurfaces(ps)%EM, bound)) then
|
||||
bound%nodes = [bound%nodes, physicalSurfaces(ps)%nodes]
|
||||
end if
|
||||
|
||||
end do
|
||||
|
||||
end select
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue