@@ -61,9 +61,10 @@ DiffusionForConcInPhaseStrategy::DiffusionForConcInPhaseStrategy(
61
61
const int diffusion_coeff_a_id ,
62
62
const int diffusion_coeff_b_id ,
63
63
const std ::string & avg_func_type ,
64
- const std :: string & diff_interp_func_type ,
64
+ DiffusionInterpolationType diff_interp_type ,
65
65
CompositionStrategyMobilities * mobilities_strategy ,
66
66
FreeEnergyStrategy * free_energy_strategy ):
67
+ CompositionDiffusionStrategy (diff_interp_type ),
67
68
d_mobilities_strategy (mobilities_strategy ),
68
69
d_free_energy_strategy (free_energy_strategy )
69
70
{
@@ -82,7 +83,6 @@ DiffusionForConcInPhaseStrategy::DiffusionForConcInPhaseStrategy(
82
83
d_diffusion_coeff_b_id = diffusion_coeff_b_id ;
83
84
84
85
d_avg_func_type = avg_func_type ;
85
- d_diff_interp_func_type = diff_interp_func_type ;
86
86
87
87
d_with_third_phase = ( conc_b_scratch_id >=0 );
88
88
@@ -464,10 +464,8 @@ void DiffusionForConcInPhaseStrategy::setDiffCoeffInEachPhaseOnPatch(
464
464
465
465
if ( d_with_third_phase && d_same_composition_for_third_phase )
466
466
{
467
- double heta =
468
- FORT_INTERP_FUNC ( eta , d_diff_interp_func_type .c_str () );
469
467
for (unsigned short ic = 0 ;ic < d_ncompositions ;ic ++ ){
470
- c_s [ic ] = (1. - heta )* c_a [ic ]+ heta * c_b [ic ];
468
+ c_s [ic ] = (1. - eta )* c_a [ic ]+ eta * c_b [ic ];
471
469
}
472
470
computeLocalDiffusionMatrixA (temp , c_s );
473
471
for (int ic = 0 ;ic < nc2 ;ic ++ ){
@@ -536,10 +534,8 @@ void DiffusionForConcInPhaseStrategy::setDiffCoeffInEachPhaseOnPatch(
536
534
537
535
if ( d_with_third_phase && d_same_composition_for_third_phase )
538
536
{
539
- double heta =
540
- FORT_INTERP_FUNC ( eta , d_diff_interp_func_type .c_str () );
541
537
for (unsigned short ic = 0 ;ic < d_ncompositions ;ic ++ ){
542
- c_s [ic ] = (1. - heta )* c_a [ic ]+ heta * c_b [ic ];
538
+ c_s [ic ] = (1. - eta )* c_a [ic ]+ eta * c_b [ic ];
543
539
}
544
540
545
541
computeLocalDiffusionMatrixA (temp , c_s );
@@ -611,10 +607,8 @@ void DiffusionForConcInPhaseStrategy::setDiffCoeffInEachPhaseOnPatch(
611
607
612
608
if ( d_with_third_phase && d_same_composition_for_third_phase )
613
609
{
614
- double heta =
615
- FORT_INTERP_FUNC ( eta , d_diff_interp_func_type .c_str () );
616
610
for (unsigned short ic = 0 ;ic < d_ncompositions ;ic ++ ){
617
- c_s [ic ] = (1. - heta )* c_a [ic ]+ heta * c_b [ic ];
611
+ c_s [ic ] = (1. - eta )* c_a [ic ]+ eta * c_b [ic ];
618
612
}
619
613
620
614
computeLocalDiffusionMatrixA (temp , c_s );
@@ -782,6 +776,8 @@ void DiffusionForConcInPhaseStrategy::setDiffOnPatch(
782
776
kmin = pbox .lower (2 );
783
777
kmax = pbox .upper (2 );
784
778
#endif
779
+
780
+ const char interp_func = interpChar ();
785
781
786
782
// X-side
787
783
for ( int kk = kmin ; kk <= kmax ; kk ++ ) {
@@ -800,7 +796,7 @@ void DiffusionForConcInPhaseStrategy::setDiffOnPatch(
800
796
double hphi =
801
797
FORT_INTERP_FUNC (
802
798
phi ,
803
- d_diff_interp_func_type . c_str () );
799
+ & interp_func );
804
800
805
801
double heta = 0.0 ;
806
802
if ( d_with_third_phase ) {
@@ -809,7 +805,7 @@ void DiffusionForConcInPhaseStrategy::setDiffOnPatch(
809
805
heta =
810
806
FORT_INTERP_FUNC (
811
807
eta ,
812
- d_diff_interp_func_type . c_str () );
808
+ & interp_func );
813
809
}
814
810
815
811
for (unsigned int ic = 0 ;ic < nc2 ;ic ++ ){
@@ -844,7 +840,7 @@ void DiffusionForConcInPhaseStrategy::setDiffOnPatch(
844
840
double hphi =
845
841
FORT_INTERP_FUNC (
846
842
phi ,
847
- d_diff_interp_func_type . c_str () );
843
+ & interp_func );
848
844
849
845
double heta = 0.0 ;
850
846
if ( d_with_third_phase ) {
@@ -853,7 +849,7 @@ void DiffusionForConcInPhaseStrategy::setDiffOnPatch(
853
849
heta =
854
850
FORT_INTERP_FUNC (
855
851
eta ,
856
- d_diff_interp_func_type . c_str () );
852
+ & interp_func );
857
853
}
858
854
859
855
for (unsigned int ic = 0 ;ic < nc2 ;ic ++ ){
@@ -889,7 +885,7 @@ void DiffusionForConcInPhaseStrategy::setDiffOnPatch(
889
885
double hphi =
890
886
FORT_INTERP_FUNC (
891
887
phi ,
892
- d_diff_interp_func_type . c_str () );
888
+ & interp_func );
893
889
894
890
double heta = 0.0 ;
895
891
if ( d_with_third_phase ) {
@@ -898,7 +894,7 @@ void DiffusionForConcInPhaseStrategy::setDiffOnPatch(
898
894
heta =
899
895
FORT_INTERP_FUNC (
900
896
eta ,
901
- d_diff_interp_func_type . c_str () );
897
+ & interp_func );
902
898
}
903
899
904
900
for (unsigned int ic = 0 ;ic < nc2 ;ic ++ ){
0 commit comments