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:
Jorge Gonzalez 2023-01-05 21:22:13 +01:00
commit 15d64f3e68
8 changed files with 159 additions and 143 deletions

View file

@ -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)