An update will be applied December 9th, between 12PM and 1:00PM EST (UTC -5:00). The site may be slow during that time.

Commit 4ec4b264 authored by ghweber's avatar ghweber
Browse files

Merged Chombo bug fix from 2.7RC into trunk.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@23129 18c085ea-50e0-402c-830e-de6fd14e8384
parent 942e1f04
...@@ -930,7 +930,7 @@ avtChomboFileFormat::InitializeReader(void) ...@@ -930,7 +930,7 @@ avtChomboFileFormat::InitializeReader(void)
int rr_tmp; int rr_tmp;
H5Aread(rr_id, H5T_NATIVE_INT, &rr_tmp); H5Aread(rr_id, H5T_NATIVE_INT, &rr_tmp);
for (int d = 0; d<std::max(dimension, 3); ++d) for (int d = 0; d<std::min(dimension, 3); ++d)
refinement_ratio[i].push_back(rr_tmp); refinement_ratio[i].push_back(rr_tmp);
} }
H5Aclose(rr_id); H5Aclose(rr_id);
...@@ -1476,15 +1476,15 @@ avtChomboFileFormat::CalculateDomainNesting(void) ...@@ -1476,15 +1476,15 @@ avtChomboFileFormat::CalculateDomainNesting(void)
// //
// Calculate what the refinement ratio is from one level to the next. // Calculate what the refinement ratio is from one level to the next.
// //
std::vector<double> cs(std::max(dimension, 3)); std::vector<double> cs(std::min(dimension, 3));
for (level = 0 ; level < num_levels ; level++) for (level = 0 ; level < num_levels ; level++)
{ {
if (level == 0) if (level == 0)
dn->SetLevelRefinementRatios(level, std::vector<int>(std::max(dimension, 3), 1)); dn->SetLevelRefinementRatios(level, std::vector<int>(std::min(dimension, 3), 1));
else else
dn->SetLevelRefinementRatios(level, refinement_ratio[level-1]); dn->SetLevelRefinementRatios(level, refinement_ratio[level-1]);
for (int d=0; d < (std::max(dimension, 3)) ; ++d) for (int d=0; d < (std::min(dimension, 3)) ; ++d)
cs[d] = dx[level][d]*aspectRatio[d]; cs[d] = dx[level][d]*aspectRatio[d];
dn->SetLevelCellSizes(level, cs); dn->SetLevelCellSizes(level, cs);
} }
...@@ -1493,12 +1493,12 @@ avtChomboFileFormat::CalculateDomainNesting(void) ...@@ -1493,12 +1493,12 @@ avtChomboFileFormat::CalculateDomainNesting(void)
// This multiplier will be needed to find out if patches are nested. // This multiplier will be needed to find out if patches are nested.
// //
std::vector< std::vector<int> > multiplier(num_levels); std::vector< std::vector<int> > multiplier(num_levels);
for (int d = 0; d < std::max(dimension, 3); ++d) for (int d = 0; d < std::min(dimension, 3); ++d)
multiplier[num_levels-1].push_back(1); multiplier[num_levels-1].push_back(1);
for (level = num_levels-2 ; level >= 0 ; level--) for (level = num_levels-2 ; level >= 0 ; level--)
{ {
multiplier[level].resize(std::max(dimension, 3)); multiplier[level].resize(std::min(dimension, 3));
for (int d = 0; d < std::max(dimension, 3); ++d) for (int d = 0; d < std::min(dimension, 3); ++d)
multiplier[level][d] = multiplier[level+1][d]*refinement_ratio[level][d]; multiplier[level][d] = multiplier[level+1][d]*refinement_ratio[level][d];
} }
visitTimer->StopTimer(t1, "Setting up domain nesting: part 1"); visitTimer->StopTimer(t1, "Setting up domain nesting: part 1");
......
...@@ -289,7 +289,7 @@ avtAMRStitchCellFilter::PreExecute(void) ...@@ -289,7 +289,7 @@ avtAMRStitchCellFilter::PreExecute(void)
if (refRatio.size() != topologicalDimension) if (refRatio.size() != topologicalDimension)
EXCEPTION1(ImproperUseException, EXCEPTION1(ImproperUseException,
"Refinement ratio provided by database via domain nesting is invalid. " "Refinement ratio provided by database via domain nesting is invalid. "
"Expected a vector of length three."); "Expected a vector of length equal to topological dataset dimension.");
logicalDomainBoundingBox[l].resize(6); logicalDomainBoundingBox[l].resize(6);
logicalDomainBoundingBox[l][0] = refRatio[0] * logicalDomainBoundingBox[l-1][0]; logicalDomainBoundingBox[l][0] = refRatio[0] * logicalDomainBoundingBox[l-1][0];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment