1. Matthew Turk
  2. enzo-dev-answer-testing

Commits

Davi...@gmail.com)  committed e59bb32

MakeFieldConservative: fix treatment of Radiation fields

  • Participants
  • Parent commits 2093b95
  • Branches week-of-code

Comments (0)

Files changed (3)

File src/enzo/FluxFix_Grid_CorrectForRefinedFluxes.C

View file
  • Ignore whitespace
 	  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++) {

File src/enzo/Grid_CorrectForRefinedFluxes.C

View file
  • Ignore whitespace
  
 	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++)

File src/enzo/MakeFieldConservative.C

View file
  • Ignore whitespace
     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;