Skip to content

Commit

Permalink
Create NearestPointLayeredIntegral idaholab#14717
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentlaboure committed Feb 19, 2020
1 parent bdf2a0d commit 98460e0
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
37 changes: 37 additions & 0 deletions framework/include/userobject/NearestPointLayeredIntegral.h
@@ -0,0 +1,37 @@
//* 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

// MOOSE includes
#include "ElementIntegralVariableUserObject.h"
#include "NearestPointBase.h"
#include "LayeredIntegral.h"

// Forward Declarations
class NearestPointLayeredIntegral;

template <>
InputParameters validParams<NearestPointLayeredIntegral>();

/**
* This UserObject computes integrals of a variable storing partial
* sums for the specified number of intervals in a direction (x,y,z).
*
* Given a list of points this object computes the layered integral
* closest to each one of those points.
*/
class NearestPointLayeredIntegral
: public NearestPointBase<LayeredIntegral, ElementIntegralVariableUserObject>
{
public:
static InputParameters validParams();

NearestPointLayeredIntegral(const InputParameters & parameters);
};
30 changes: 30 additions & 0 deletions framework/src/userobject/NearestPointLayeredIntegral.C
@@ -0,0 +1,30 @@
//* 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

// MOOSE includes
#include "NearestPointLayeredIntegral.h"
#include "LayeredIntegral.h"

registerMooseObject("MooseApp", NearestPointLayeredIntegral);

defineLegacyParams(NearestPointLayeredIntegral);

InputParameters
NearestPointLayeredIntegral::validParams()
{
InputParameters params =
nearestPointBaseValidParams<LayeredIntegral, ElementIntegralVariableUserObject>();

return params;
}

NearestPointLayeredIntegral::NearestPointLayeredIntegral(const InputParameters & parameters)
: NearestPointBase<LayeredIntegral, ElementIntegralVariableUserObject>(parameters)
{
}

0 comments on commit 98460e0

Please sign in to comment.