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)
POPULATE BACKGROUND AND BOUNDARY CONDITION ARRAYS
- IDEALLY ROOT ONLY SINCE IT INVOLVES FILE INPUT, ALTHOUGH THE INTERPOLATION MAY BE SLOW...
wind x2 current, note that all workers already have a copy of this.
wind x3 current
wind x2 current
wind x3 current
!!!!!!
INTEGRATE CONDUCTANCES AND CAPACITANCES FOR SOLVER COEFFICIENTS
PRODUCE A FIELD-INTEGRATED SOURCE TERM
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
note tha this solver is only valid for cartesian meshes, unless the inertial capacitance is set to zero
!note that either sigPint2 or 3 will work since this must be cartesian...
Dirichlet conditions - since this is field integrated we just copy BCs specified by user
to other locations along field line
potential is whatever user specifies, since we assume equipotential field lines,
it doesn't really matter whether we use Vmaxx1 or Vminx1.
Note however, tha thte boundary conditions subroutines should explicitly
set these to be equal with Dirichlet conditions, for consistency.
copy the potential across the ix1 direction; past this point there is no real difference with 3D,
note that this is still valid in curvilinear form
resolved 3D solve
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
in a 2D solve negate this due to it being a cross produce and the fact that we've permuted the 2 and 3 dimensions.
ZZZ - NOT JUST THIS WORKS WITH BACKGROUND FIELDS???
EXECUTE THE SOLVE WITH MUMPS AND SCALED TERMS
NOTE THE LACK OF A SPECIAL CASE HERE TO CHANGE THE POTENTIAL PROBLEM
- ONLY THE HALL TERM CHANGES (SINCE RELATED TO EXB) BUT THAT DOESN'T APPEAR IN THIS EQN!
!!!!!!!
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...)
ZZZ this is really bad needs to be a global test rather than having each worker test since there
is message passing embedded in here and everyone needs to do the same thing!!!
!!!!!!
Neumann conditions, this is boundary location-agnostic since both bottom and top FACs are known
- they have to be loaded into VVmaxx1 and Vminx1
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.