A workaround
The random position for edges in the axis is corrected so that there is a more uniform charge density in the axis. Still, things are not perfect and this is something to really look into in the future.
This commit is contained in:
parent
4cadfe5367
commit
cd7bf66bd8
1 changed files with 6 additions and 0 deletions
|
|
@ -226,6 +226,12 @@ MODULE moduleMesh2DCyl
|
||||||
REAL(8):: p1(1:2), p2(1:2)
|
REAL(8):: p1(1:2), p2(1:2)
|
||||||
|
|
||||||
rnd = random()
|
rnd = random()
|
||||||
|
IF (self%r(1) == 0.D0 .OR. &
|
||||||
|
self%r(2) == 0.D0) THEN
|
||||||
|
rnd = rnd**(1.D0/3.D0)
|
||||||
|
|
||||||
|
END IF
|
||||||
|
|
||||||
p1 = (/self%z(1), self%r(1) /)
|
p1 = (/self%z(1), self%r(1) /)
|
||||||
p2 = (/self%z(2), self%r(2) /)
|
p2 = (/self%z(2), self%r(2) /)
|
||||||
r(1:2) = (1.D0 - rnd)*p1 + rnd*p2
|
r(1:2) = (1.D0 - rnd)*p1 + rnd*p2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue