File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -500,7 +500,9 @@ FABio::read_header (std::istream& is,
500500 //
501501 // Set the FArrayBox to the appropriate size.
502502 //
503- f.resize (bx,nvar);
503+ if (f.box () != bx || f.nComp () != nvar) {
504+ f.resize (bx,nvar);
505+ }
504506 is.ignore (BL_IGNORE_MAX, ' \n ' );
505507 switch (typ_in)
506508 {
@@ -527,7 +529,9 @@ FABio::read_header (std::istream& is,
527529 //
528530 // Set the FArrayBox to the appropriate size.
529531 //
530- f.resize (bx,nvar);
532+ if (f.box () != bx || f.nComp () != nvar) {
533+ f.resize (bx,nvar);
534+ }
531535 is.ignore (BL_IGNORE_MAX, ' \n ' );
532536 fio = new FABio_binary (rd);
533537 }
@@ -575,7 +579,9 @@ FABio::read_header (std::istream& is,
575579 //
576580 // Set the FArrayBox to the appropriate size.
577581 //
578- f.resize (bx,nvar);
582+ if (f.box () != bx || f.nComp () != nvar) {
583+ f.resize (bx,nvar);
584+ }
579585 is.ignore (BL_IGNORE_MAX, ' \n ' );
580586 switch (typ_in)
581587 {
@@ -604,7 +610,9 @@ FABio::read_header (std::istream& is,
604610 //
605611 // Set the FArrayBox to the appropriate size.
606612 //
607- f.resize (bx,nvar);
613+ if (f.box () != bx || f.nComp () != nvar) {
614+ f.resize (bx,nvar);
615+ }
608616 is.ignore (BL_IGNORE_MAX, ' \n ' );
609617 fio = new FABio_binary (rd);
610618 }
You can’t perform that action at this time.
0 commit comments