Skip to content

Commit

Permalink
fixed an error in RadiativeTransferReadParameters.C regarding dtPhoto…
Browse files Browse the repository at this point in the history
…n, also some minor changes

--HG--
branch : week-of-code
  • Loading branch information
Ji-hoon Kim committed Oct 12, 2009
1 parent 1500997 commit 1770707
Show file tree
Hide file tree
Showing 6 changed files with 216 additions and 35,664 deletions.
35,814 changes: 177 additions & 35,637 deletions input/metal_cool_ratios.dat

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/enzo/CommunicationTransferSubgridParticles.C
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ int CommunicationTransferSubgridParticles(LevelHierarchyEntry *LevelArray[],
(GridPointers, NumberOfGrids, StarsToMove, Zero, Zero,
StarSendList, KeepLocal, ParticlesAreLocal, COPY_OUT, TRUE);

/*
Grids[grid1]->GridData->TransferSubgridParticles
(GridPointers, NumberOfGrids, NumberToMove, Zero, Zero,
SendList, KeepLocal, ParticlesAreLocal, COPY_OUT, TRUE);
*/ //#####

delete [] SiblingList.GridList;

Expand Down
40 changes: 20 additions & 20 deletions src/enzo/Grid_ComputeRT_TimeStep.C
Original file line number Diff line number Diff line change
Expand Up @@ -269,30 +269,30 @@ float grid::ComputeRT_TimeStep()

/* Debugging info. */

// if (debug || NumberOfProcessors > 1) {
if (debug || NumberOfProcessors > 1) {
// if (debug) {
// printf("ComputeTimeStep = %"FSYM" (", dt);
// if (NumberOfBaryonFields > 0)
// printf("Bar = %"GSYM" ", dtBaryons);
// if (HydroMethod == Zeus_Hydro)
// printf("Vis = %"FSYM" ", dtViscous);
// if (ComovingCoordinates)
// printf("Exp = %"FSYM" ", dtExpansion);
// if (dtAcceleration != huge_number)
// printf("Acc = %"FSYM" ", dtAcceleration);
// if (NumberOfParticles)
// printf("Part = %"FSYM" ", dtParticles);
printf("ComputeTimeStep = %"FSYM" (", dt);
if (NumberOfBaryonFields > 0)
printf("Bar = %"GSYM" ", dtBaryons);
if (HydroMethod == Zeus_Hydro)
printf("Vis = %"FSYM" ", dtViscous);
if (ComovingCoordinates)
printf("Exp = %"FSYM" ", dtExpansion);
if (dtAcceleration != huge_number)
printf("Acc = %"FSYM" ", dtAcceleration);
if (NumberOfParticles)
printf("Part = %"FSYM" ", dtParticles);
// if (StarParticleFeedback >> POP3_STAR & 1 ||
// StarParticleFeedback >> STAR_CLUSTER & 1)
// printf("Star = %"FSYM" ", dtStar);
//#ifdef TRANSFER
// if (RadiationPressure && RadiativeTransfer && dtRadPressure < 100)
// printf("Rad = %"GSYM" ", dtRadPressure);
// if (dtSafetyVelocity != huge_number)
// printf("Saf = %"GSYM" ", dtSafetyVelocity);
//#endif /* TRANSFER */
// printf(")\n");
// }
#ifdef TRANSFER
if (RadiationPressure && RadiativeTransfer && dtRadPressure < 100)
printf("Rad = %"GSYM" ", dtRadPressure);
if (dtSafetyVelocity != huge_number)
printf("Saf = %"GSYM" ", dtSafetyVelocity);
#endif /* TRANSFER */
printf(")\n");
}

return dt;
}
8 changes: 5 additions & 3 deletions src/enzo/Grid_IdentifyColourFields.C
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ int grid::IdentifyColourFields(int &SNColourNum, int &MetalNum, int &MBHColourNu
Galaxy1ColourNum = FindField(Galaxy1Colour, FieldType, NumberOfBaryonFields);
Galaxy2ColourNum = FindField(Galaxy2Colour, FieldType, NumberOfBaryonFields);

/*
if ((SNColourNum < 0) && (MetalNum < 0) && (MBHColourNum < 0) &&
(Galaxy1ColourNum < 0) && (Galaxy2ColourNum < 0)) {
// fprintf(stderr, "No colour field identified; while this could happen, check if it was expected.\n");
// ENZO_FAIL("");
fprintf(stdout, "No colour field identified; while this could happen, check if it was expected.\n");
ENZO_FAIL("");
}

*/

return SUCCESS;
}

10 changes: 10 additions & 0 deletions src/enzo/OutputFromEvolveLevel.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ int Group_WriteAllData(char *basename, int filenumber, HierarchyEntry *TopGrid,
void my_exit(int status);
int GenerateGridArray(LevelHierarchyEntry *LevelArray[], int level,
HierarchyEntry **Grids[]);
int RebuildHierarchy(TopGridData *MetaData,
LevelHierarchyEntry *LevelArray[], int level); //#####

#define TIME_MESSAGING

Expand Down Expand Up @@ -204,6 +206,14 @@ int OutputFromEvolveLevel(LevelHierarchyEntry *LevelArray[],TopGridData *MetaDat
}

if( Write == TRUE ){

// Following ifdef is implemented to catch and redistribute all the particles/stars
// out of the grid boundary before outputing the data hierarchy
// Purely for test purpose, and not for public consumption yet. Ji-hoon Kim in Oct.2009
#ifndef CATCH_PARTICLES //#####
fprintf(stdout, "*** Rebuilding hierarchy before WriteAllData. ***\n");
RebuildHierarchy(MetaData, LevelArray, level);
#endif

LevelHierarchyEntry *Temp2 = LevelArray[0];
while (Temp2->NextGridThisLevel != NULL)
Expand Down
6 changes: 2 additions & 4 deletions src/enzo/RadiativeTransferReadParameters.C
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

int RadiativeTransferReadParameters(FILE *fptr)
{

int i;

char line[MAX_LINE_LENGTH], *dummy = new char[MAX_LINE_LENGTH];
Expand Down Expand Up @@ -69,7 +68,7 @@ int RadiativeTransferReadParameters(FILE *fptr)

/* read parameters */

ret += sscanf(line, "RadiativeTransferRadiationPressure = %"ISYM, \
ret += sscanf(line, "RadiativeTransferRadiationPressure = %"ISYM,
&RadiationPressure);
ret += sscanf(line, "RadiativeTransferSourceRadius = %"FSYM,
&RadiativeTransferSourceRadius);
Expand Down Expand Up @@ -103,8 +102,7 @@ int RadiativeTransferReadParameters(FILE *fptr)
&RadiativeTransferHIIRestrictedTimestep);
ret += sscanf(line, "RadiativeTransferAdaptiveTimestep = %"ISYM,
&RadiativeTransferAdaptiveTimestep);

ret += sscanf(line, "dtPhoton = %"FSYM, dtPhoton);
ret += sscanf(line, "dtPhoton = %"FSYM, &dtPhoton);

/* if the line is suspicious, issue a warning */

Expand Down

0 comments on commit 1770707

Please sign in to comment.