Skip to content

Commit

Permalink
Switch to Moose::GenericType (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
dschwen committed May 9, 2024
1 parent 0a79432 commit 276e9c6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions include/functions/PiecewiseMultiInterpolationFromReporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class PiecewiseMultiInterpolationFromReporter : public Function, public Reporter

/// convert cartesian+time coordinates into grid coordinates
template <bool is_ad>
MooseADWrapper<GridPoint, is_ad> pointInGrid(const MooseADWrapper<Real, is_ad> & t,
const MooseADWrapper<Point, is_ad> & p) const;
Moose::GenericType<GridPoint, is_ad> pointInGrid(const Moose::GenericType<Real, is_ad> & t,
const Moose::GenericType<Point, is_ad> & p) const;

/**
* This does the core work. Given a point, pt, defined
Expand Down
2 changes: 1 addition & 1 deletion include/functions/PiecewiseMultilinearFromReporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ class PiecewiseMultilinearFromReporter : public PiecewiseMultiInterpolationFromR

private:
template <bool is_ad>
MooseADWrapper<Real, is_ad> sampleInternal(const MooseADWrapper<GridPoint, is_ad> pt) const;
Moose::GenericType<Real, is_ad> sampleInternal(const Moose::GenericType<GridPoint, is_ad> pt) const;
};
8 changes: 4 additions & 4 deletions src/functions/PiecewiseMultiInterpolationFromReporter.C
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ PiecewiseMultiInterpolationFromReporter::PiecewiseMultiInterpolationFromReporter
}

template <bool is_ad>
MooseADWrapper<PiecewiseMultiInterpolationFromReporter::GridPoint, is_ad>
PiecewiseMultiInterpolationFromReporter::pointInGrid(const MooseADWrapper<Real, is_ad> & t,
const MooseADWrapper<Point, is_ad> & p) const
Moose::GenericType<PiecewiseMultiInterpolationFromReporter::GridPoint, is_ad>
PiecewiseMultiInterpolationFromReporter::pointInGrid(const Moose::GenericType<Real, is_ad> & t,
const Moose::GenericType<Point, is_ad> & p) const
{
// convert the inputs to an input to the sample function using _axes
MooseADWrapper<GridPoint, is_ad> point_in_grid(_dim);
Moose::GenericType<GridPoint, is_ad> point_in_grid(_dim);
for (unsigned int i = 0; i < _dim; ++i)
{
if (_axes[i] < 3)
Expand Down
8 changes: 4 additions & 4 deletions src/functions/PiecewiseMultilinearFromReporter.C
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ PiecewiseMultilinearFromReporter::sample(const ADGridPoint & pt) const
}

template <bool is_ad>
MooseADWrapper<Real, is_ad>
PiecewiseMultilinearFromReporter::sampleInternal(const MooseADWrapper<GridPoint, is_ad> pt) const
Moose::GenericType<Real, is_ad>
PiecewiseMultilinearFromReporter::sampleInternal(const Moose::GenericType<GridPoint, is_ad> pt) const
{
/*
* left contains the indices of the point to the 'left', 'down', etc, of pt
Expand All @@ -63,8 +63,8 @@ PiecewiseMultilinearFromReporter::sampleInternal(const MooseADWrapper<GridPoint,
* those vertices, and weighting the contributions to the
* final result depending on the distance of pt from the vertex
*/
MooseADWrapper<Real, is_ad> f = 0;
MooseADWrapper<Real, is_ad> weight;
Moose::GenericType<Real, is_ad> f = 0;
Moose::GenericType<Real, is_ad> weight;
GridIndex arg(_dim);
// number of points in hypercube = 2^_dim
for (unsigned int i = 0; i < (1u << _dim); ++i)
Expand Down

0 comments on commit 276e9c6

Please sign in to comment.