Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
r13957
- Loading branch information
Showing
3 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
framework/include/base/CoupleableMooseVariableDependencyIntermediateInterface.h
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,46 @@ | ||
/****************************************************************/ | ||
/* DO NOT MODIFY THIS HEADER */ | ||
/* MOOSE - Multiphysics Object Oriented Simulation Environment */ | ||
/* */ | ||
/* (c) 2010 Battelle Energy Alliance, LLC */ | ||
/* ALL RIGHTS RESERVED */ | ||
/* */ | ||
/* Prepared by Battelle Energy Alliance, LLC */ | ||
/* Under Contract No. DE-AC07-05ID14517 */ | ||
/* With the U. S. Department of Energy */ | ||
/* */ | ||
/* See COPYRIGHT for full restrictions */ | ||
/****************************************************************/ | ||
|
||
#ifndef COUPLEABLEMOOSEVARIABLEDEPENDENCYINTERMEDIATEINTERFACE_H | ||
#define COUPLEABLEMOOSEVARIABLEDEPENDENCYINTERMEDIATEINTERFACE_H | ||
|
||
#include "Coupleable.h" | ||
#include "MooseVariableInterface.h" | ||
#include "MooseVariableDependencyInterface.h" | ||
|
||
/** | ||
* Intermediate base class that ties together all the interfaces for getting | ||
* MooseVariables with the MooseVariableDependencyInterface | ||
*/ | ||
class CoupleableMooseVariableDependencyIntermediateInterface : | ||
public Coupleable, | ||
public ScalarCoupleable, | ||
public MooseVariableInterface, | ||
public MooseVariableDependencyInterface | ||
{ | ||
public: | ||
CoupleableMooseVariableDependencyIntermediateInterface(InputParameters & parameters, bool nodal) : | ||
Coupleable(parameters, nodal), | ||
ScalarCoupleable(parameters), | ||
MooseVariableInterface(parameters, nodal) | ||
{ | ||
const std::vector<MooseVariable *> & coupled_vars = getCoupledMooseVars(); | ||
for(unsigned int i=0; i<coupled_vars.size(); i++) | ||
addMooseVariableDependency(coupled_vars[i]); | ||
|
||
addMooseVariableDependency(mooseVariable()); | ||
} | ||
}; | ||
|
||
#endif // COUPLEABLEMOOSEVARIABLEDEPENDENCYINTERMEDIATEINTERFACE_H |
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,42 @@ | ||
/****************************************************************/ | ||
/* DO NOT MODIFY THIS HEADER */ | ||
/* MOOSE - Multiphysics Object Oriented Simulation Environment */ | ||
/* */ | ||
/* (c) 2010 Battelle Energy Alliance, LLC */ | ||
/* ALL RIGHTS RESERVED */ | ||
/* */ | ||
/* Prepared by Battelle Energy Alliance, LLC */ | ||
/* Under Contract No. DE-AC07-05ID14517 */ | ||
/* With the U. S. Department of Energy */ | ||
/* */ | ||
/* See COPYRIGHT for full restrictions */ | ||
/****************************************************************/ | ||
|
||
#ifndef MOOSEVARIABLEDEPENDENCYINTERFACE_H | ||
#define MOOSEVARIABLEDEPENDENCYINTERFACE_H | ||
|
||
#include <set> | ||
|
||
class MooseVariableDependencyInterface | ||
{ | ||
public: | ||
MooseVariableDependencyInterface() {} | ||
|
||
/** | ||
* Retrieve the set of MooseVariables that _this_ object depends on. | ||
* @return The MooseVariables that MUST be reinited before evaluating this object | ||
*/ | ||
const std::set<MooseVariable *> & getMooseVariableDependencies() { return _moose_variable_dependencies; } | ||
|
||
protected: | ||
|
||
/** | ||
* Call this function ot add the passed in MooseVariable as a variable that _this_ object depends on. | ||
*/ | ||
void addMooseVariableDependency(MooseVariable * var) { _moose_variable_dependencies.insert(var); } | ||
|
||
private: | ||
std::set<MooseVariable *> _moose_variable_dependencies; | ||
}; | ||
|
||
#endif // MOOSEVARIABLEDEPENDENCYINTERFACE_H |
46 changes: 46 additions & 0 deletions
46
framework/include/base/NeighborCoupleableMooseVariableDependencyIntermediateInterface.h
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,46 @@ | ||
/****************************************************************/ | ||
/* DO NOT MODIFY THIS HEADER */ | ||
/* MOOSE - Multiphysics Object Oriented Simulation Environment */ | ||
/* */ | ||
/* (c) 2010 Battelle Energy Alliance, LLC */ | ||
/* ALL RIGHTS RESERVED */ | ||
/* */ | ||
/* Prepared by Battelle Energy Alliance, LLC */ | ||
/* Under Contract No. DE-AC07-05ID14517 */ | ||
/* With the U. S. Department of Energy */ | ||
/* */ | ||
/* See COPYRIGHT for full restrictions */ | ||
/****************************************************************/ | ||
|
||
#ifndef NEIGHBORCOUPLEABLEMOOSEVARIABLEDEPENDENCYINTERMEDIATEINTERFACE_H | ||
#define NEIGHBORCOUPLEABLEMOOSEVARIABLEDEPENDENCYINTERMEDIATEINTERFACE_H | ||
|
||
#include "Coupleable.h" | ||
#include "MooseVariableInterface.h" | ||
#include "MooseVariableDependencyInterface.h" | ||
|
||
/** | ||
* Intermediate base class that ties together all the interfaces for getting | ||
* MooseVariables with the MooseVariableDependencyInterface | ||
*/ | ||
class NeighborCoupleableMooseVariableDependencyIntermediateInterface : | ||
public NeighborCoupleable, | ||
public ScalarCoupleable, | ||
public NeighborMooseVariableInterface, | ||
public MooseVariableDependencyInterface | ||
{ | ||
public: | ||
NeighborCoupleableMooseVariableDependencyIntermediateInterface(InputParameters & parameters, bool nodal) : | ||
NeighborCoupleable(parameters, nodal), | ||
ScalarCoupleable(parameters), | ||
NeighborMooseVariableInterface(parameters, nodal) | ||
{ | ||
const std::vector<MooseVariable *> & coupled_vars = getCoupledMooseVars(); | ||
for(unsigned int i=0; i<coupled_vars.size(); i++) | ||
addMooseVariableDependency(coupled_vars[i]); | ||
|
||
addMooseVariableDependency(mooseVariable()); | ||
} | ||
}; | ||
|
||
#endif // NEIGHBORCOUPLEABLEMOOSEVARIABLEDEPENDENCYINTERMEDIATEINTERFACE_H |