ROOT MPI COMM./SOLVE ROUTINE FOR POTENTIAL. THIS VERSION
INCLUDES THE POLARIZATION CURRENT TIME DERIVATIVE PART
AND CONVECTIVE PARTS IN MATRIX SOLUTION.
STATE VARIABLES VS2,3 INCLUDE GHOST CELLS. FOR NOW THE
POLARIZATION TERMS ARE PASSED BACK TO MAIN FN, EVEN THOUGH
THEY ARE NOT USED (THEY MAY BE IN THE FUTURE)
wind x2 current, note that all workers already have a copy of this.
wind x3 current
wind x2 current
wind x3 current
!!!!!!
Neumann conditions; incorporate a source term and execute the solve
workers don't have access to boundary conditions, unless root sends
need to pick out the ExB drift here (i.e. the drifts from highest altitudes);
but this is only valid for Cartesian, so it's okay for the foreseeable future
Dirichlet conditions
- since this is field integrated we just copy BCs specified by user to other locations along field line
ZZZ - conductivities need to be properly scaled here...
So does the source term... Maybe leave as broken for now since I don't really plan to use this code
!!!!!!!
STORE PREVIOUS TIME TOTAL FIELDS BEFORE UPDATING THE ELECTRIC FIELDS WITH NEW POTENTIAL
(OLD FIELDS USED TO CALCULATE POLARIZATION CURRENT)
causes major memory leak. maybe from arithmetic statement argument?
Left here as a 'lesson learned' (or is it a gfortran bug...)
Neumann conditions, this is boundary location-agnostic since both bottom and top FACs are known
- they have to be loaded into VVmaxx1 and Vminx1.
For numerical purposes we prefer to integrate from the location of nonzero current (usually highest altitude in open grid).
for a cartesian grid in the northern hemisphere (assumed) we have the x1-direction being against the magnetic field...
Dirichlet conditions - we need to integrate from the lowest altitude
(where FAC is known to be zero, note this is not necessarilty the logical bottom of the grid), upwards (to where it isn't)
!!!!!!!
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed
arrows point from an interface to procedures which implement that interface.
This could include the module procedures in a generic interface or the
implementation in a submodule of an interface in a parent module.