forked from idaholab/magpie
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Sebastian Schunert
committed
Feb 15, 2020
1 parent
6aa52dd
commit 4943a07
Showing
2 changed files
with
76 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/**********************************************************************/ | ||
/* DO NOT MODIFY THIS HEADER */ | ||
/* MAGPIE - Mesoscale Atomistic Glue Program for Integrated Execution */ | ||
/* */ | ||
/* Copyright 2017 Battelle Energy Alliance, LLC */ | ||
/* ALL RIGHTS RESERVED */ | ||
/**********************************************************************/ | ||
|
||
#ifdef GSL_ENABLED | ||
|
||
#pragma once | ||
|
||
#include "GeneralPostprocessor.h" | ||
|
||
// forward declarations | ||
class DPAPostprocessor; | ||
class NeutronDamageInterface; | ||
|
||
template <> | ||
InputParameters validParams<DPAPostprocessor>(); | ||
|
||
class DPAPostprocessor : public GeneralPostprocessor | ||
{ | ||
public: | ||
DPAPostprocessor(const InputParameters & parameters); | ||
virtual void execute() override {} | ||
virtual void initialize() override {} | ||
virtual Real getValue() override; | ||
|
||
protected: | ||
const NeutronDamageInterface * _damage_object; | ||
}; | ||
|
||
#endif |
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 */ | ||
/* MAGPIE - Mesoscale Atomistic Glue Program for Integrated Execution */ | ||
/* */ | ||
/* Copyright 2017 Battelle Energy Alliance, LLC */ | ||
/* ALL RIGHTS RESERVED */ | ||
/**********************************************************************/ | ||
|
||
#ifdef GSL_ENABLED | ||
|
||
#include "DPAPostprocessor.h" | ||
#include "NeutronDamageInterface.h" | ||
|
||
registerMooseObject("MagpieApp", DPAPostprocessor); | ||
|
||
template <> | ||
InputParameters | ||
validParams<DPAPostprocessor>() | ||
{ | ||
InputParameters params = validParams<GeneralPostprocessor>(); | ||
params.addRequiredParam<UserObjectName>( | ||
"dpa_object", "The neutronics damage object."); | ||
params.addClassDescription("Retrieves the dpa from a neutronics damage object. The neutronics " | ||
"damage object must inherit from NeutronDamageInterface."); | ||
return params; | ||
} | ||
|
||
DPAPostprocessor::DPAPostprocessor(const InputParameters & params) : GeneralPostprocessor(params) | ||
{ | ||
const UserObject * uo = &getUserObject<UserObject>("dpa_object"); | ||
_damage_object = dynamic_cast<const NeutronDamageInterface *>(uo); | ||
if (!_damage_object) | ||
paramError("dpa_object", "The provided UserObject does not inherit from NeutronDamageInterface."); | ||
} | ||
|
||
Real | ||
DPAPostprocessor::getValue() | ||
{ | ||
return _damage_object->getDPA(); | ||
} | ||
|
||
#endif |