Added one new header file DerivativeAlgorithm.H which includes the derivative kernels to calculate dP/dz, d2P/dz2 and dphi/dz. This will simplify the functions CalculateTDGL_RHS and ComputePoissonRHS by just calling the appropriate kernel functions. This will also get us prepared to add more terms of TDGL energy.
The following input file is used to evaluate the difference between the output multifabs before and after this PR. Here's the result for ./ComparePlotfiles3d.gnu.ex infile1 = plt_new/plt00000004/ reffile = plt_old/plt00000004/
The variables are listed below:
"P","Phi","PoissonRHS","Ex","Ey","Ez","holes","electrons","charge"
It should be noted that:
The DoubleDPDz and DPDz functions still remain the previous 1st order one-sided derivative for P_BC_flag_hi == 1. As I have noticed well-above machine precision discrepancy with the 2nd order one-sided derivative compared to the current development branch.
In ComputeEfromPhi function, the calculation of Ex, Ey and Ez is still hard coded. We should update them with the new kernels in DerivativeAlgorithm.H.
Added one new header file
DerivativeAlgorithm.H
which includes the derivative kernels to calculatedP/dz
,d2P/dz2
anddphi/dz
. This will simplify the functionsCalculateTDGL_RHS
andComputePoissonRHS
by just calling the appropriate kernel functions. This will also get us prepared to add more terms of TDGL energy.The following input file is used to evaluate the difference between the output multifabs before and after this PR. Here's the result for
./ComparePlotfiles3d.gnu.ex infile1 = plt_new/plt00000004/ reffile = plt_old/plt00000004/
The variables are listed below: "P","Phi","PoissonRHS","Ex","Ey","Ez","holes","electrons","charge"
It should be noted that:
DoubleDPDz
andDPDz
functions still remain the previous 1st order one-sided derivative forP_BC_flag_hi == 1
. As I have noticed well-above machine precision discrepancy with the 2nd order one-sided derivative compared to the currentdevelopment
branch.ComputeEfromPhi
function, the calculation ofEx
,Ey
andEz
is still hard coded. We should update them with the new kernels inDerivativeAlgorithm.H
.