Passing nNodes as argument
It seems that this improves results as passing the size of the arrays as an argument is better than getting it from self.
This commit is contained in:
parent
6f24b5f1f6
commit
15d64f3e68
8 changed files with 159 additions and 143 deletions
|
|
@ -362,7 +362,7 @@ MODULE moduleInput
|
|||
nodes = mesh%cells(e)%obj%getNodes()
|
||||
nNodes = mesh%cells(e)%obj%nNodes
|
||||
ALLOCATE(fPsi(1:nNodes))
|
||||
fPsi = mesh%cells(e)%obj%fPsi((/0.D0, 0.D0, 0.D0/))
|
||||
fPsi = mesh%cells(e)%obj%fPsi((/0.D0, 0.D0, 0.D0/), nNodes)
|
||||
ALLOCATE(source(1:nNodes))
|
||||
DO j = 1, nNodes
|
||||
source(j) = density(nodes(j))
|
||||
|
|
@ -380,7 +380,7 @@ MODULE moduleInput
|
|||
partNew%r = mesh%cells(e)%obj%randPos()
|
||||
partNew%xi = mesh%cells(e)%obj%phy2log(partNew%r)
|
||||
!Get mean velocity at particle position
|
||||
fPsi = mesh%cells(e)%obj%fPsi(partNew%xi)
|
||||
fPsi = mesh%cells(e)%obj%fPsi(partNew%xi, nNodes)
|
||||
DO j = 1, nNodes
|
||||
source(j) = velocity(nodes(j), 1)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue