Commits

Anonymous committed e59bb32

MakeFieldConservative: fix treatment of Radiation fields

Comments (0)

Files changed (3)

src/enzo/FluxFix_Grid_CorrectForRefinedFluxes.C

 	  if (HydroMethod != Zeus_Hydro) {
 
 	    for (field = 0; field < NumberOfBaryonFields; field++) 
-	      if (FieldTypeNoInterpolate(FieldType[field]) == FALSE &&
+	      if (FieldTypeIsRadiation(FieldType[field]) == FALSE &&
                   MakeFieldConservative(FieldType[field]) ) {
 		for (k = Start[2]; k <= End[2]; k++) {
 		  for (j = Start[1]; j <= End[1]; j++) {
 	
 	  if (HydroMethod != Zeus_Hydro)
 	    for (field = 0; field < NumberOfBaryonFields; field++)
-	      if (FieldTypeIsDensity(FieldType[field]) == FALSE &&
-		  FieldTypeNoInterpolate(FieldType[field]) == FALSE &&
-		  FieldTypeIsRadiation(FieldType[field]) == FALSE &&
+	      if ( FieldTypeIsRadiation(FieldType[field]) == FALSE &&
           MakeFieldConservative(FieldType[field]))
 		for (k = Start[2]; k <= End[2]; k++)
 		  for (j = Start[1]; j <= End[1]; j++) {

src/enzo/Grid_CorrectForRefinedFluxes.C

  
 	if (HydroMethod != Zeus_Hydro)
 	  for (field = 0; field < NumberOfBaryonFields; field++)
-	    if (
-                MakeFieldConservative(FieldType[field])
-           )
+	    if ( MakeFieldConservative(FieldType[field]) && (FieldTypeIsRadiation(FieldType[field]) == FALSE) )
                 
 	      //		(RadiativeCooling == 0 || (FieldType[field] != TotalEnergy &&
 	      //	 			 FieldType[field] != InternalEnergy)))
  
 	if (HydroMethod != Zeus_Hydro)
 	  for (field = 0; field < NumberOfBaryonFields; field++)
-	    if (FieldTypeIsDensity(FieldType[field]) == FALSE &&
-		FieldTypeIsRadiation(FieldType[field]) == FALSE &&
+	    if ( FieldTypeIsRadiation(FieldType[field]) == FALSE &&
         MakeFieldConservative(FieldType[field]))
         
 	      for (k = Start[2]; k <= End[2]; k++)

src/enzo/MakeFieldConservative.C

     FieldUndefined};
 
     if( FieldTypeIsDensity(field) ) MultiplyField = FALSE;
-    if( FieldTypeIsRadiation(field) ) MultiplyField = FALSE;
+    //if( FieldTypeIsRadiation(field) ) MultiplyField = FALSE;
     if( FieldTypeNoInterpolate( field ) ) MultiplyField = FALSE;
     if( (field >= Velocity1 && field <= Velocity3) && HydroMethod == Zeus_Hydro ) {
         MultiplyField = FALSE;