Tempus  Version of the Day
Time Integration
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Tempus_UnitTest_Subcycling.cpp
Go to the documentation of this file.
1 // @HEADER
2 // ****************************************************************************
3 // Tempus: Copyright (2017) Sandia Corporation
4 //
5 // Distributed under BSD 3-clause license (See accompanying file Copyright.txt)
6 // ****************************************************************************
7 // @HEADER
8 
11 #include "Teuchos_TimeMonitor.hpp"
12 #include "Teuchos_DefaultComm.hpp"
13 
14 #include "Thyra_VectorStdOps.hpp"
15 #include "NOX_Thyra.H"
16 
17 #include "Tempus_StepperFactory.hpp"
18 #include "Tempus_StepperForwardEuler.hpp"
19 #include "Tempus_StepperBackwardEuler.hpp"
20 
21 #include "Tempus_StepperSubcycling.hpp"
28 
29 #include "../TestModels/SinCosModel.hpp"
30 #include "../TestUtils/Tempus_ConvergenceTestUtils.hpp"
31 
32 #include <fstream>
33 #include <vector>
34 
35 namespace Tempus_Unit_Test {
36 
37 using Teuchos::RCP;
38 using Teuchos::rcp;
39 using Teuchos::rcp_const_cast;
40 using Teuchos::rcp_dynamic_cast;
42 using Teuchos::sublist;
43 using Teuchos::getParametersFromXmlFile;
44 
46 
47 
48 // ************************************************************
49 // ************************************************************
50 TEUCHOS_UNIT_TEST(Subcycling, Default_Construction)
51 {
52  auto model = rcp(new Tempus_Test::SinCosModel<double>());
53  auto modelME = rcp_dynamic_cast<const Thyra::ModelEvaluator<double> > (model);
54 
55  // Setup SolutionHistory ------------------------------------
56  auto inArgsIC = model->getNominalValues();
57  auto icSolution =rcp_const_cast<Thyra::VectorBase<double> >(inArgsIC.get_x());
58  auto icState = Tempus::createSolutionStateX(icSolution);
59  auto solutionHistory = rcp(new Tempus::SolutionHistory<double>());
60  solutionHistory->addState(icState);
61  solutionHistory->initWorkingState();
62 
63  // Default construction.
64  auto stepper = rcp(new Tempus::StepperSubcycling<double>());
65  auto stepperBE = Tempus::createStepperBackwardEuler(modelME, Teuchos::null);
66  stepper->setSubcyclingStepper(stepperBE);
67  stepper->setInitialConditions(solutionHistory);
68  stepper->initialize();
69  TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
70 
71  // Default values for construction.
75  auto solver = rcp(new Thyra::NOXNonlinearSolver());
76  solver->setParameterList(Tempus::defaultSolverParameters());
77 
78  bool useFSAL = stepper->getUseFSAL();
79  std::string ICConsistency = stepper->getICConsistency();
80  bool ICConsistencyCheck = stepper->getICConsistencyCheck();
81 
82  // Test the set functions
83  stepper->setSolver(solver); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
84  stepper->setAppAction(modifier); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
85  stepper->setAppAction(modifierX); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
86  stepper->setAppAction(observer); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
87  stepper->setUseFSAL(useFSAL); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
88  stepper->setICConsistency(ICConsistency); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
89  stepper->setICConsistencyCheck(ICConsistencyCheck); stepper->initialize(); TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
90 
91 
92  // Full argument list construction.
93  auto scIntegrator = Teuchos::rcp(new Tempus::IntegratorBasic<double>());
94  auto stepperFE = Tempus::createStepperForwardEuler(modelME, Teuchos::null);
95  scIntegrator->setStepper(stepperFE);
96  scIntegrator->setSolutionHistory(solutionHistory);
97  scIntegrator->initialize();
98 
100  model,scIntegrator, useFSAL, ICConsistency, ICConsistencyCheck,modifier));
101  TEUCHOS_TEST_FOR_EXCEPT(!stepper->isInitialized());
102 
103  // Test stepper properties.
104  TEUCHOS_ASSERT(stepper->getOrder() == 1);
105 }
106 
107 
108 // ************************************************************
109 // ************************************************************
110 TEUCHOS_UNIT_TEST(Subcycling, MaxTimeStepDoesNotChangeDuring_takeStep)
111 {
112  // Setup the stepper ----------------------------------------
113  auto model = rcp(new Tempus_Test::SinCosModel<double>());
114  auto modelME = rcp_dynamic_cast<const Thyra::ModelEvaluator<double> > (model);
115  auto stepper = rcp(new Tempus::StepperSubcycling<double>());
116  auto stepperBE = Tempus::createStepperBackwardEuler(modelME, Teuchos::null);
117  stepper->setSubcyclingStepper(stepperBE);
118 
119  // Setup SolutionHistory ------------------------------------
120  auto inArgsIC = model->getNominalValues();
121  auto icSolution =rcp_const_cast<Thyra::VectorBase<double> >(inArgsIC.get_x());
122  auto icState = Tempus::createSolutionStateX(icSolution);
123  auto solutionHistory = rcp(new Tempus::SolutionHistory<double>());
124  solutionHistory->addState(icState);
125  solutionHistory->initWorkingState();
126 
127  // Ensure ICs are consistent and stepper memory is set (e.g., xDot is set).
128  stepper->setInitialConditions(solutionHistory);
129  stepper->initialize();
130 
131  // Test
132  stepper->setSubcyclingInitTimeStep(0.25);
133  stepper->setSubcyclingMaxTimeStep(0.5);
134  double maxTimeStep_Set = stepper->getSubcyclingMaxTimeStep();
135  stepper->takeStep(solutionHistory);
136  double maxTimeStep_After = stepper->getSubcyclingMaxTimeStep();
137 
138  TEST_FLOATING_EQUALITY(maxTimeStep_Set, maxTimeStep_After, 1.0e-14 );
139 }
140 
141 
142 // ************************************************************
143 // ************************************************************
144 class StepperSubcyclingModifierTest
145  : virtual public Tempus::StepperSubcyclingModifierBase<double>
146 {
147 public:
148 
150  StepperSubcyclingModifierTest()
151  : testBEGIN_STEP(false), testEND_STEP(false),
152  testCurrentValue(-0.99), testWorkingValue(-0.99),
153  testDt(1.5), testName("")
154  {}
156  virtual ~StepperSubcyclingModifierTest(){}
157 
159  virtual void modify(
163  {
164  switch(actLoc) {
166  {
167  testBEGIN_STEP = true;
168  auto x = sh->getCurrentState()->getX();
169  testCurrentValue = get_ele(*(x), 0);
170  testName = "Subcycling - Modifier";
171  stepper->setStepperName(testName);
172  break;
173  }
175  {
176  testEND_STEP = true;
177  auto x = sh->getWorkingState()->getX();
178  testWorkingValue = get_ele(*(x), 0);
179  testDt = sh->getWorkingState()->getTimeStep()/10.0;
180  sh->getWorkingState()->setTimeStep(testDt);
181  break;
182  }
183  default:
184  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error,
185  "Error - unknown action location.\n");
186  }
187  }
188 
189  bool testBEGIN_STEP;
190  bool testEND_STEP;
191  double testCurrentValue;
192  double testWorkingValue;
193  double testDt;
194  std::string testName;
195 };
196 
197 TEUCHOS_UNIT_TEST(Subcycling, AppAction_Modifier)
198 {
199  // Setup the SinCosModel ------------------------------------
200  auto model = rcp(new Tempus_Test::SinCosModel<double>());
201  auto modelME = rcp_dynamic_cast<const Thyra::ModelEvaluator<double> > (model);
202 
203  // Setup Stepper for field solve ----------------------------
204  auto stepper = rcp(new Tempus::StepperSubcycling<double>());
205  auto stepperFE = Tempus::createStepperForwardEuler(modelME, Teuchos::null);
206  auto modifier = rcp(new StepperSubcyclingModifierTest());
207  stepper->setAppAction(modifier);
208  stepper->setSubcyclingStepper(stepperFE);
209 
210  stepper->setSubcyclingMinTimeStep (15);
211  stepper->setSubcyclingInitTimeStep (15.0);
212  stepper->setSubcyclingMaxTimeStep (15.0);
213  stepper->setSubcyclingMaxFailures (10);
214  stepper->setSubcyclingMaxConsecFailures(5);
215  stepper->setSubcyclingScreenOutputIndexInterval(1);
216  stepper->setSubcyclingPrintDtChanges(true);
217 
218  // Setup TimeStepControl ------------------------------------
219  auto timeStepControl = rcp(new Tempus::TimeStepControl<double>());
220  timeStepControl->setInitIndex(0);
221  timeStepControl->setInitTime (0.0);
222  timeStepControl->setFinalTime(1.0);
223  timeStepControl->setInitTimeStep(15.0);
224  timeStepControl->initialize();
225 
226  // Setup initial condition SolutionState --------------------
227  auto inArgsIC = model->getNominalValues();
228  auto icSolution = rcp_const_cast<Thyra::VectorBase<double> > (inArgsIC.get_x());
229  auto icState = Tempus::createSolutionStateX(icSolution);
230  icState->setTime (timeStepControl->getInitTime());;
231  icState->setIndex (timeStepControl->getInitIndex());
232  icState->setTimeStep(0.0); // dt for ICs are indicated by zero.
233  icState->setSolutionStatus(Tempus::Status::PASSED); // ICs are passing.
234 
235  // Setup SolutionHistory ------------------------------------
236  auto solutionHistory = rcp(new Tempus::SolutionHistory<double>());
237  solutionHistory->setName("Forward States");
238  solutionHistory->setStorageType(Tempus::STORAGE_TYPE_STATIC);
239  solutionHistory->setStorageLimit(2);
240  solutionHistory->addState(icState);
241 
242  // Ensure ICs are consistent and stepper memory is set (e.g., xDot is set).
243  stepper->setInitialConditions(solutionHistory);
244  stepper->initialize();
245 
246  // Take one time step.
247  stepper->setInitialConditions(solutionHistory);
248  solutionHistory->initWorkingState();
249  solutionHistory->getWorkingState()->setTimeStep(15.0);
250  stepper->takeStep(solutionHistory);
251 
252  // Testing that each ACTION_LOCATION has been called.
253  TEST_COMPARE(modifier->testBEGIN_STEP, ==, true);
254  TEST_COMPARE(modifier->testEND_STEP, ==, true);
255 
256  // Testing that values can be set through the Modifier.
257  auto x = solutionHistory->getCurrentState()->getX();
258  TEST_FLOATING_EQUALITY(modifier->testCurrentValue, get_ele(*(x), 0), 1.0e-14);
259  x = solutionHistory->getWorkingState()->getX();
260  TEST_FLOATING_EQUALITY(modifier->testWorkingValue, get_ele(*(x), 0), 1.0e-14);
261  auto Dt = solutionHistory->getWorkingState()->getTimeStep();
262  TEST_FLOATING_EQUALITY(modifier->testDt, Dt, 1.0e-14);
263 
264  TEST_COMPARE(modifier->testName, ==, "Subcycling - Modifier");
265 }
266 
267 // ************************************************************
268 // ************************************************************
269 class StepperSubcyclingObserverTest
270  : virtual public Tempus::StepperSubcyclingObserverBase<double>
271 {
272 public:
273 
275  StepperSubcyclingObserverTest()
276  : testBEGIN_STEP(false), testEND_STEP(false),
277  testCurrentValue(-0.99), testWorkingValue(-0.99),
278  testDt(15.0), testName("Subcyling")
279  {}
280 
282  virtual ~StepperSubcyclingObserverTest(){}
283 
285  virtual void observe(
289  {
290  switch(actLoc) {
292  {
293  testBEGIN_STEP = true;
294  auto x = sh->getCurrentState()->getX();
295  testCurrentValue = get_ele(*(x), 0);
296  break;
297  }
299  {
300  testEND_STEP = true;
301  auto x = sh->getWorkingState()->getX();
302  testWorkingValue = get_ele(*(x), 0);
303  break;
304  }
305  default:
306  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error,
307  "Error - unknown action location.\n");
308  }
309  }
310 
311  bool testBEGIN_STEP;
312  bool testEND_STEP;
313  double testCurrentValue;
314  double testWorkingValue;
315  double testDt;
316  std::string testName;
317 };
318 
319 TEUCHOS_UNIT_TEST(Subcycling, AppAction_Observer)
320 {
321  // Setup the SinCosModel ------------------------------------
322  auto model = rcp(new Tempus_Test::SinCosModel<double>());
323  auto modelME = rcp_dynamic_cast<const Thyra::ModelEvaluator<double> > (model);
324 
325  // Setup Stepper for field solve ----------------------------
326  auto stepper = rcp(new Tempus::StepperSubcycling<double>());
327  auto stepperFE = Tempus::createStepperForwardEuler(modelME, Teuchos::null);
328  auto observer = rcp(new StepperSubcyclingObserverTest());
329  stepper->setAppAction(observer);
330  stepper->setSubcyclingStepper(stepperFE);
331 
332  stepper->setSubcyclingMinTimeStep (15);
333  stepper->setSubcyclingInitTimeStep (15.0);
334  stepper->setSubcyclingMaxTimeStep (15.0);
335  stepper->setSubcyclingMaxFailures (10);
336  stepper->setSubcyclingMaxConsecFailures(5);
337  stepper->setSubcyclingScreenOutputIndexInterval(1);
338  stepper->setSubcyclingPrintDtChanges(true);
339 
340  // Setup TimeStepControl ------------------------------------
341  auto timeStepControl = rcp(new Tempus::TimeStepControl<double>());
342  timeStepControl->setInitIndex(0);
343  timeStepControl->setInitTime (0.0);
344  timeStepControl->setFinalTime(1.0);
345  timeStepControl->setInitTimeStep(15.0);
346  timeStepControl->initialize();
347 
348  // Setup initial condition SolutionState --------------------
349  auto inArgsIC = model->getNominalValues();
350  auto icSolution = rcp_const_cast<Thyra::VectorBase<double> > (inArgsIC.get_x());
351  auto icState = Tempus::createSolutionStateX(icSolution);
352  icState->setTime (timeStepControl->getInitTime());;
353  icState->setIndex (timeStepControl->getInitIndex());
354  icState->setTimeStep(0.0); // dt for ICs are indicated by zero.
355  icState->setSolutionStatus(Tempus::Status::PASSED); // ICs are passing.
356 
357  // Setup SolutionHistory ------------------------------------
358  auto solutionHistory = rcp(new Tempus::SolutionHistory<double>());
359  solutionHistory->setName("Forward States");
360  solutionHistory->setStorageType(Tempus::STORAGE_TYPE_STATIC);
361  solutionHistory->setStorageLimit(2);
362  solutionHistory->addState(icState);
363 
364  // Ensure ICs are consistent and stepper memory is set (e.g., xDot is set).
365  stepper->setInitialConditions(solutionHistory);
366  stepper->initialize();
367 
368  // Take one time step.
369  stepper->setInitialConditions(solutionHistory);
370  solutionHistory->initWorkingState();
371  solutionHistory->getWorkingState()->setTimeStep(15.0);
372  stepper->takeStep(solutionHistory);
373 
374  // Testing that each ACTION_LOCATION has been called.
375  TEST_COMPARE(observer->testBEGIN_STEP, ==, true);
376  TEST_COMPARE(observer->testEND_STEP, ==, true);
377 
378  // Testing that values can be observed through the observer.
379  auto x = solutionHistory->getCurrentState()->getX();
380  TEST_FLOATING_EQUALITY(observer->testCurrentValue, get_ele(*(x), 0), 1.0e-14);
381  x = solutionHistory->getWorkingState()->getX();
382  TEST_FLOATING_EQUALITY(observer->testWorkingValue, get_ele(*(x), 0), 1.0e-14);
383  TEST_FLOATING_EQUALITY(observer->testDt, 15.0, 1.0e-14);
384 
385  TEST_COMPARE(observer->testName, ==, "Subcyling");
386 }
387 
388  // ************************************************************
389  // ************************************************************
390 class StepperSubcyclingModifierXTest
391  : virtual public Tempus::StepperSubcyclingModifierXBase<double>
392 {
393 public:
394 
396  StepperSubcyclingModifierXTest()
397  : testX_BEGIN_STEP(false), testXDOT_END_STEP(false),
398  testX(-0.99), testXDot(-0.99),
399  testDt(1.5), testTime(1.5)
400  {}
401 
403  virtual ~StepperSubcyclingModifierXTest(){}
404 
406  virtual void modify(
408  const double time, const double dt,
410  {
411  switch(modType) {
413  {
414  testX_BEGIN_STEP = true;
415  testX = get_ele(*(x), 0);
416  testDt = dt;
417  break;
418  }
420  {
421  testXDOT_END_STEP = true;
422  testXDot = get_ele(*(x), 0);
423  testTime = time;
424  break;
425  }
426  default:
427  TEUCHOS_TEST_FOR_EXCEPTION(true, std::logic_error,
428  "Error - unknown action location.\n");
429  }
430  }
431 
432  bool testX_BEGIN_STEP;
433  bool testXDOT_END_STEP;
434  double testX;
435  double testXDot;
436  double testDt;
437  double testTime;
438 };
439 
440 TEUCHOS_UNIT_TEST(Subcycling, AppAction_ModifierX)
441 {
442  // Setup the SinCosModel ------------------------------------
443  auto model = rcp(new Tempus_Test::SinCosModel<double>());
444  auto modelME = rcp_dynamic_cast<const Thyra::ModelEvaluator<double> > (model);
445 
446  // Setup Stepper for field solve ----------------------------
447  auto stepper = rcp(new Tempus::StepperSubcycling<double>());
448  auto stepperFE = Tempus::createStepperForwardEuler(modelME, Teuchos::null);
449  auto modifierX = rcp(new StepperSubcyclingModifierXTest());
450  stepper->setAppAction(modifierX);
451  stepper->setSubcyclingStepper(stepperFE);
452 
453  stepper->setSubcyclingMinTimeStep (15);
454  stepper->setSubcyclingInitTimeStep (15.0);
455  stepper->setSubcyclingMaxTimeStep (15.0);
456  stepper->setSubcyclingMaxFailures (10);
457  stepper->setSubcyclingMaxConsecFailures(5);
458  stepper->setSubcyclingScreenOutputIndexInterval(1);
459  stepper->setSubcyclingPrintDtChanges(true);
460 
461  // Setup TimeStepControl ------------------------------------
462  auto timeStepControl = rcp(new Tempus::TimeStepControl<double>());
463  timeStepControl->setInitIndex(0);
464  timeStepControl->setInitTime (0.0);
465  timeStepControl->setFinalTime(1.0);
466  timeStepControl->setInitTimeStep(15.0);
467  timeStepControl->initialize();
468 
469  // Setup initial condition SolutionState --------------------
470  auto inArgsIC = model->getNominalValues();
471  auto icSolution = rcp_const_cast<Thyra::VectorBase<double> > (inArgsIC.get_x());
472  auto icSolutionDot = rcp_const_cast<Thyra::VectorBase<double> > (inArgsIC.get_x_dot());
473  auto icState = Tempus::createSolutionStateX(icSolution,icSolutionDot);
474  icState->setTime (timeStepControl->getInitTime());;
475  icState->setIndex (timeStepControl->getInitIndex());
476  icState->setTimeStep(0.0); // dt for ICs are indicated by zero.
477  icState->setSolutionStatus(Tempus::Status::PASSED); // ICs are passing.
478 
479  // Setup SolutionHistory ------------------------------------
480  auto solutionHistory = rcp(new Tempus::SolutionHistory<double>());
481  solutionHistory->setName("Forward States");
482  solutionHistory->setStorageType(Tempus::STORAGE_TYPE_STATIC);
483  solutionHistory->setStorageLimit(2);
484  solutionHistory->addState(icState);
485 
486  // Ensure ICs are consistent and stepper memory is set (e.g., xDot is set).
487  stepper->setInitialConditions(solutionHistory);
488  stepper->initialize();
489 
490  // Take one time step.
491  stepper->setInitialConditions(solutionHistory);
492  solutionHistory->initWorkingState();
493  solutionHistory->getWorkingState()->setTimeStep(15.0);
494  stepper->takeStep(solutionHistory);
495 
496  // Take one time step.
497  stepper->setInitialConditions(solutionHistory);
498  solutionHistory->initWorkingState();
499  solutionHistory->getWorkingState()->setTimeStep(15.0);
500  stepper->takeStep(solutionHistory);
501 
502  // Testing that each ACTION_LOCATION has been called.
503  TEST_COMPARE(modifierX->testX_BEGIN_STEP, ==, true);
504  TEST_COMPARE(modifierX->testXDOT_END_STEP, ==, true);
505 
506  // Testing that values can be set through the Modifier.
507  auto x = solutionHistory->getCurrentState()->getX();
508  TEST_FLOATING_EQUALITY(modifierX->testX, get_ele(*(x), 0), 1.0e-14);
509  // Temporary memory for xDot is not guarranteed to exist outside the Stepper.
510  auto xDot = solutionHistory->getWorkingState()->getXDot();
511  if (xDot == Teuchos::null) xDot = stepper->getStepperXDot();
512 
513  TEST_FLOATING_EQUALITY(modifierX->testXDot, get_ele(*(xDot), 0),1.0e-14);
514  auto Dt = solutionHistory->getWorkingState()->getTimeStep();
515  TEST_FLOATING_EQUALITY(modifierX->testDt, Dt, 1.0e-14);
516 
517  auto time = solutionHistory->getWorkingState()->getTime();
518  TEST_FLOATING_EQUALITY(modifierX->testTime, time, 1.0e-14);
519 }
520 
521 } // namespace Tempus_Test
Teuchos::RCP< SolutionState< Scalar > > createSolutionStateX(const Teuchos::RCP< Thyra::VectorBase< Scalar > > &x, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xdot=Teuchos::null, const Teuchos::RCP< Thyra::VectorBase< Scalar > > &xdotdot=Teuchos::null)
Nonmember constructor from non-const solution vectors, x.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
#define TEST_COMPARE(v1, comp, v2)
#define TEST_FLOATING_EQUALITY(v1, v2, tol)
Sine-Cosine model problem from Rythmos. This is a canonical Sine-Cosine differential equation with a...
Teuchos::RCP< Teuchos::ParameterList > defaultSolverParameters()
Returns the default solver ParameterList for implicit Steppers.
Teuchos::RCP< StepperForwardEuler< Scalar > > createStepperForwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
TEUCHOS_UNIT_TEST(BackwardEuler, Default_Construction)
TimeStepControl manages the time step size. There several mechanisms that effect the time step size a...
virtual void modify(Teuchos::RCP< Thyra::VectorBase< double > >, const double, const double, const MODIFIER_TYPE modType)=0
Modify solution based on the MODIFIER_TYPE.
SolutionHistory is basically a container of SolutionStates. SolutionHistory maintains a collection of...
ACTION_LOCATION
Indicates the location of application action (see algorithm).
Keep a fix number of states.
Teuchos::RCP< StepperBackwardEuler< Scalar > > createStepperBackwardEuler(const Teuchos::RCP< const Thyra::ModelEvaluator< Scalar > > &model, Teuchos::RCP< Teuchos::ParameterList > pl)
Nonmember constructor - ModelEvaluator and ParameterList.
virtual ModelEvaluatorBase::InArgs< Scalar > getNominalValues() const =0
#define TEUCHOS_ASSERT(assertion_test)
#define TEUCHOS_TEST_FOR_EXCEPT(throw_exception_test)
MODIFIER_TYPE
Indicates the location of application action (see algorithm).