Skip to content

Commit

Permalink
add missing files #1386
Browse files Browse the repository at this point in the history
r13957
  • Loading branch information
friedmud authored and permcody committed Feb 14, 2014
1 parent 70e94ae commit a555243
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 0 deletions.
@@ -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
42 changes: 42 additions & 0 deletions framework/include/base/MooseVariableDependencyInterface.h
@@ -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
@@ -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

0 comments on commit a555243

Please sign in to comment.