-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28083 from ddm42/next_PR2
Explicit Dynamics: Initial Condition for Solution Time Derivatives
- Loading branch information
Showing
27 changed files
with
721 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
//* This file is part of the MOOSE framework | ||
//* https://www.mooseframework.org | ||
//* | ||
//* All rights reserved, see COPYRIGHT for full restrictions | ||
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT | ||
//* | ||
//* Licensed under LGPL 2.1, please see LICENSE for details | ||
//* https://www.gnu.org/licenses/lgpl-2.1.html | ||
|
||
#pragma once | ||
|
||
#include "InputParameters.h" | ||
|
||
/** | ||
* InitialConditionInterface serves as the abstract class for InitialConditions, | ||
* FVInitialConditions, and ScalarInitialConditions | ||
*/ | ||
class InitialConditionInterface | ||
{ | ||
public: | ||
/** | ||
* Constructor | ||
* | ||
* @param parameters The parameters object holding data for the class to use. | ||
*/ | ||
InitialConditionInterface(const InputParameters & parameters); | ||
|
||
virtual ~InitialConditionInterface(); | ||
|
||
static InputParameters validParams(); | ||
|
||
/** | ||
* Retrieves the state of this initial condition. | ||
* @return The state of this initial condition. | ||
*/ | ||
unsigned short getState() const; | ||
|
||
protected: | ||
// variable used when applying initial conditions to previous states | ||
unsigned short _my_state; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//* This file is part of the MOOSE framework | ||
//* https://www.mooseframework.org | ||
//* | ||
//* All rights reserved, see COPYRIGHT for full restrictions | ||
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT | ||
//* | ||
//* Licensed under LGPL 2.1, please see LICENSE for details | ||
//* https://www.gnu.org/licenses/lgpl-2.1.html | ||
|
||
#include "InitialConditionInterface.h" | ||
#include "InputParameters.h" | ||
#include "MooseEnum.h" | ||
|
||
InputParameters | ||
InitialConditionInterface::validParams() | ||
{ | ||
InputParameters params = emptyInputParameters(); | ||
|
||
MooseEnum stateEnum("CURRENT=0 OLD=1 OLDER=2", "CURRENT"); | ||
params.addParam<MooseEnum>( | ||
"state", | ||
stateEnum, | ||
"This parameter is used to set old state solutions at the start of simulation. If specifying " | ||
"multiple states at the start of simulation, use one IC object for each state being " | ||
"specified. The states are CURRENT=0 OLD=1 OLDER=2. States older than 2 are not currently " | ||
"supported. When the user only specifies current state, the solution is copied to the old " | ||
"and older states, as expected. This functionality is mainly used for dynamic simulations " | ||
"with explicit time integration schemes, where old solution states are used in the velocity " | ||
"and acceleration approximations."); | ||
|
||
return params; | ||
} | ||
|
||
InitialConditionInterface::InitialConditionInterface(const InputParameters & parameters) | ||
: _my_state(parameters.get<MooseEnum>("state")) | ||
{ | ||
} | ||
|
||
InitialConditionInterface::~InitialConditionInterface() {} | ||
|
||
unsigned short | ||
InitialConditionInterface::getState() const | ||
{ | ||
return _my_state; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.