diff --git a/src/domain.cpp b/src/domain.cpp index 1223a83411..e2dea8373b 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -1209,6 +1209,10 @@ void Domain::add_region(int narg, char **arg) else error->all(FLERR,"Invalid region style"); + // initialize any region variables via init() + // in case region is used between runs, e.g. to print a variable + + regions[nregion]->init(); nregion++; } diff --git a/src/region.cpp b/src/region.cpp index 14f7155e4a..7e2532a8aa 100644 --- a/src/region.cpp +++ b/src/region.cpp @@ -397,8 +397,4 @@ void Region::options(int narg, char **arg) if (moveflag || rotateflag) dynamic = 1; else dynamic = 0; - - // initialize option variables in case region is used between runs - - init(); }