Skip to content
Permalink
Browse files

Merge pull request #13490 from aeslaughter/const-getFunction-13480

Updates framework and modules to use const Function
  • Loading branch information...
lindsayad committed May 29, 2019
2 parents 9482487 + 35e1ffc commit 4ce690f1cc69d98f1e54b2ed1b932f6dbb2cee1f
Showing with 344 additions and 471 deletions.
  1. +1 −2 framework/include/auxkernels/AuxKernel.h
  2. +1 −2 framework/include/auxkernels/ElementL2ErrorFunctionAux.h
  3. +1 −2 framework/include/auxkernels/FunctionAux.h
  4. +1 −2 framework/include/auxkernels/FunctionScalarAux.h
  5. +1 −2 framework/include/auxkernels/VectorFunctionAux.h
  6. +1 −2 framework/include/bcs/ADFunctionDirichletBC.h
  7. +1 −1 framework/include/bcs/ADFunctionPresetBC.h
  8. +4 −4 framework/include/bcs/ADVectorFunctionDirichletBC.h
  9. +1 −2 framework/include/bcs/DGFunctionDiffusionDirichletBC.h
  10. +1 −2 framework/include/bcs/FunctionDirichletBC.h
  11. +1 −1 framework/include/bcs/FunctionGradientNeumannBC.h
  12. +1 −2 framework/include/bcs/FunctionNeumannBC.h
  13. +1 −2 framework/include/bcs/FunctionPenaltyDirichletBC.h
  14. +3 −4 framework/include/bcs/FunctionPeriodicBoundary.h
  15. +1 −2 framework/include/bcs/FunctionPresetBC.h
  16. +4 −4 framework/include/bcs/VectorFunctionDirichletBC.h
  17. +1 −1 framework/include/controls/ConditionalFunctionEnableControl.h
  18. +1 −2 framework/include/controls/RealFunctionControl.h
  19. +1 −2 framework/include/dirackernels/FunctionDiracSource.h
  20. +1 −2 framework/include/functions/Axisymmetric2D3DSolutionFunction.h
  21. +7 −8 framework/include/functions/BicubicSplineFunction.h
  22. +2 −3 framework/include/functions/CompositeFunction.h
  23. +1 −2 framework/include/functions/ConstantFunction.h
  24. +7 −8 framework/include/functions/Function.h
  25. +3 −4 framework/include/functions/FunctionInterface.h
  26. +1 −2 framework/include/functions/ImageFunction.h
  27. +4 −5 framework/include/functions/LinearCombinationFunction.h
  28. +4 −4 framework/include/functions/MooseParsedFunction.h
  29. +1 −2 framework/include/functions/MooseParsedFunctionWrapper.h
  30. +3 −4 framework/include/functions/MooseParsedGradFunction.h
  31. +3 −4 framework/include/functions/MooseParsedVectorFunction.h
  32. +3 −4 framework/include/functions/PiecewiseBase.h
  33. +1 −2 framework/include/functions/PiecewiseBilinear.h
  34. +4 −5 framework/include/functions/PiecewiseConstant.h
  35. +4 −5 framework/include/functions/PiecewiseLinear.h
  36. +3 −4 framework/include/functions/PiecewiseMultiInterpolation.h
  37. +1 −2 framework/include/functions/PiecewiseMulticonstant.h
  38. +1 −2 framework/include/functions/PiecewiseMultilinear.h
  39. +2 −3 framework/include/functions/SolutionFunction.h
  40. +4 −5 framework/include/functions/SplineFunction.h
  41. +1 −2 framework/include/functions/VectorPostprocessorFunction.h
  42. +1 −2 framework/include/ics/FunctionIC.h
  43. +1 −2 framework/include/ics/FunctionScalarIC.h
  44. +4 −4 framework/include/ics/VectorFunctionIC.h
  45. +1 −2 framework/include/indicators/AnalyticalIndicator.h
  46. +1 −1 framework/include/kernels/ADBodyForce.h
  47. +1 −2 framework/include/kernels/BodyForce.h
  48. +4 −5 framework/include/kernels/VectorBodyForce.h
  49. +1 −2 framework/include/materials/GenericFunctionMaterial.h
  50. +1 −2 framework/include/nodalkernels/UserForcingFunctionNodalKernel.h
  51. +1 −2 framework/include/postprocessors/ElementH1SemiError.h
  52. +1 −2 framework/include/postprocessors/ElementL2Error.h
  53. +3 −4 framework/include/postprocessors/ElementVectorL2Error.h
  54. +1 −2 framework/include/postprocessors/ElementW1pError.h
  55. +1 −1 framework/include/postprocessors/FunctionElementIntegral.h
  56. +1 −2 framework/include/postprocessors/FunctionSideIntegral.h
  57. +1 −2 framework/include/postprocessors/FunctionValuePostprocessor.h
  58. +1 −2 framework/include/postprocessors/NodalL2Error.h
  59. +1 −2 framework/include/postprocessors/ScalarL2Error.h
  60. +1 −2 framework/include/timesteppers/FunctionDT.h
  61. +2 −3 framework/include/timesteppers/IterationAdaptiveDT.h
  62. +0 −1 framework/include/utils/BicubicSplineInterpolation.h
  63. +1 −2 framework/include/utils/ImageSampler.h
  64. +1 −1 framework/include/utils/LinearInterpolation.h
  65. +1 −2 framework/include/vectorpostprocessors/LineFunctionSampler.h
  66. +6 −6 framework/src/bcs/FunctionPeriodicBoundary.C
  67. +1 −1 framework/src/functions/Axisymmetric2D3DSolutionFunction.C
  68. +4 −4 framework/src/functions/BicubicSplineFunction.C
  69. +2 −2 framework/src/functions/CompositeFunction.C
  70. +1 −1 framework/src/functions/ConstantFunction.C
  71. +7 −7 framework/src/functions/Function.C
  72. +4 −4 framework/src/functions/FunctionInterface.C
  73. +1 −1 framework/src/functions/ImageFunction.C
  74. +4 −4 framework/src/functions/LinearCombinationFunction.C
  75. +4 −4 framework/src/functions/MooseParsedFunction.C
  76. +3 −3 framework/src/functions/MooseParsedGradFunction.C
  77. +3 −3 framework/src/functions/MooseParsedVectorFunction.C
  78. +3 −3 framework/src/functions/PiecewiseBase.C
  79. +1 −1 framework/src/functions/PiecewiseBilinear.C
  80. +4 −4 framework/src/functions/PiecewiseConstant.C
  81. +4 −4 framework/src/functions/PiecewiseLinear.C
  82. +2 −2 framework/src/functions/PiecewiseMultiInterpolation.C
  83. +1 −1 framework/src/functions/PiecewiseMulticonstant.C
  84. +1 −1 framework/src/functions/PiecewiseMultilinear.C
  85. +2 −2 framework/src/functions/SolutionFunction.C
  86. +4 −4 framework/src/functions/SplineFunction.C
  87. +1 −1 framework/src/functions/VectorPostprocessorFunction.C
  88. +3 −2 framework/src/timesteppers/FunctionDT.C
  89. +1 −1 framework/src/timesteppers/IterationAdaptiveDT.C
  90. +1 −1 framework/src/utils/ImageSampler.C
  91. +1 −1 framework/src/utils/LinearInterpolation.C
  92. +1 −2 modules/functional_expansion_tools/include/functions/FunctionSeries.h
  93. +3 −4 modules/functional_expansion_tools/include/functions/MemoizedFunctionInterface.h
  94. +3 −3 modules/functional_expansion_tools/src/functions/FunctionSeries.C
  95. +6 −4 modules/functional_expansion_tools/src/functions/MemoizedFunctionInterface.C
  96. +2 −3 modules/heat_conduction/include/bcs/ConvectiveFluxFunction.h
  97. +1 −2 modules/heat_conduction/include/bcs/RadiativeHeatFluxBCBase.h
  98. +1 −2 modules/heat_conduction/include/materials/AnisoHeatConductionMaterial.h
  99. +1 −1 modules/heat_conduction/include/materials/GapConductance.h
  100. +2 −3 modules/heat_conduction/include/materials/HeatConductionMaterial.h
  101. +2 −3 modules/level_set/include/functions/LevelSetOlssonBubble.h
  102. +2 −9 modules/level_set/include/functions/LevelSetOlssonVortex.h
  103. +1 −2 modules/level_set/include/kernels/LevelSetForcingFunctionSUPG.h
  104. +2 −2 modules/level_set/src/functions/LevelSetOlssonBubble.C
  105. +9 −8 modules/level_set/src/functions/LevelSetOlssonVortex.C
  106. +1 −2 modules/misc/include/kernels/CoefDiffusion.h
  107. +1 −2 modules/misc/include/postprocessors/InternalVolume.h
  108. +3 −4 modules/navier_stokes/include/kernels/INSMass.h
  109. +1 −2 modules/navier_stokes/include/kernels/INSMomentumBase.h
  110. +3 −4 modules/navier_stokes/include/materials/INSADMaterial.h
  111. +2 −3 modules/navier_stokes/include/tests/WedgeFunction.h
  112. +1 −1 modules/navier_stokes/src/tests/WedgeFunction.C
  113. +1 −2 modules/navier_stokes/test/include/kernels/Advection.h
  114. +3 −4 modules/phase_field/include/materials/ExternalForceDensityMaterial.h
  115. +1 −2 modules/porous_flow/include/bcs/PorousFlowHalfCubicSink.h
  116. +1 −2 modules/porous_flow/include/bcs/PorousFlowSink.h
  117. +1 −2 modules/porous_flow/include/dirackernels/PorousFlowPeacemanBorehole.h
  118. +2 −3 modules/porous_flow/include/functions/MovingPlanarFront.h
  119. +1 −1 modules/porous_flow/src/functions/MovingPlanarFront.C
  120. +1 −1 modules/richards/include/bcs/Q2PPiecewiseLinearSink.h
  121. +1 −1 modules/richards/include/bcs/RichardsExcav.h
  122. +1 −1 modules/richards/include/bcs/RichardsHalfGaussianSink.h
  123. +1 −1 modules/richards/include/bcs/RichardsPiecewiseLinearSink.h
  124. +1 −2 modules/richards/include/dirackernels/PeacemanBorehole.h
  125. +1 −1 modules/richards/include/functions/Grad2ParsedFunction.h
  126. +1 −1 modules/richards/include/functions/GradParsedFunction.h
  127. +1 −1 modules/richards/include/functions/RichardsExcavGeom.h
  128. +1 −2 modules/richards/include/postprocessors/Q2PPiecewiseLinearSinkFlux.h
  129. +1 −2 modules/richards/include/postprocessors/RichardsExcavFlow.h
  130. +1 −2 modules/richards/include/postprocessors/RichardsHalfGaussianSinkFlux.h
  131. +1 −2 modules/richards/include/postprocessors/RichardsPiecewiseLinearSinkFlux.h
  132. +1 −1 modules/richards/src/functions/Grad2ParsedFunction.C
  133. +1 −1 modules/richards/src/functions/GradParsedFunction.C
  134. +1 −1 modules/richards/src/functions/RichardsExcavGeom.C
  135. +1 −2 modules/solid_mechanics/include/materials/ConstitutiveModel.h
  136. +2 −3 modules/solid_mechanics/include/materials/IsotropicPlasticity.h
  137. +1 −1 modules/solid_mechanics/include/materials/IsotropicTempDepHardening.h
  138. +4 −4 modules/solid_mechanics/include/materials/SolidModel.h
  139. +3 −3 modules/solid_mechanics/src/materials/IsotropicPlasticity.C
  140. +2 −2 modules/solid_mechanics/src/materials/IsotropicTempDepHardening.C
  141. +1 −1 modules/tensor_mechanics/include/bcs/ADPressure.h
  142. +1 −2 modules/tensor_mechanics/include/bcs/DisplacementAboutAxis.h
  143. +3 −4 modules/tensor_mechanics/include/bcs/InteractionIntegralBenchmarkBC.h
  144. +1 −2 modules/tensor_mechanics/include/bcs/PresetAcceleration.h
  145. +1 −2 modules/tensor_mechanics/include/bcs/PresetDisplacement.h
  146. +1 −2 modules/tensor_mechanics/include/bcs/PresetVelocity.h
  147. +1 −2 modules/tensor_mechanics/include/bcs/Pressure.h
  148. +1 −2 modules/tensor_mechanics/include/kernels/Gravity.h
  149. +1 −1 modules/tensor_mechanics/include/kernels/OutOfPlanePressure.h
  150. +1 −2 modules/tensor_mechanics/include/materials/ADComputeElasticityTensorBase.h
  151. +1 −2 modules/tensor_mechanics/include/materials/ADComputeStressBase.h
  152. +1 −2 modules/tensor_mechanics/include/materials/ComputeEigenstrainFromInitialStress.h
  153. +1 −2 modules/tensor_mechanics/include/materials/ComputeElasticityBeam.h
  154. +1 −2 modules/tensor_mechanics/include/materials/ComputeElasticityTensorBase.h
  155. +1 −2 modules/tensor_mechanics/include/materials/ComputeInstantaneousThermalExpansionFunctionEigenstrain.h
  156. +1 −2 modules/tensor_mechanics/include/materials/ComputeMeanThermalExpansionFunctionEigenstrain.h
  157. +1 −2 modules/tensor_mechanics/include/materials/ComputeStressBase.h
  158. +2 −3 modules/tensor_mechanics/include/materials/IsotropicPlasticityStressUpdate.h
  159. +1 −1 modules/tensor_mechanics/include/materials/TemperatureDependentHardeningStressUpdate.h
  160. +1 −2 modules/tensor_mechanics/include/nodalkernels/NodalGravity.h
  161. +1 −2 modules/tensor_mechanics/include/userobjects/GeneralizedPlaneStrainUserObject.h
  162. +2 −2 modules/tensor_mechanics/src/materials/TemperatureDependentHardeningStressUpdate.C
  163. +1 −2 modules/xfem/include/dirackernels/XFEMPressure.h
  164. +3 −4 modules/xfem/include/userobjects/MeshCut3DUserObject.h
  165. +1 −2 test/include/auxkernels/FunctionDerivativeAux.h
  166. +1 −2 test/include/auxkernels/FunctionGradAux.h
  167. +1 −2 test/include/bcs/BiharmonicLapBC.h
  168. +1 −2 test/include/bcs/DGFunctionConvectionDirichletBC.h
  169. +1 −2 test/include/bcs/DGMDDBC.h
  170. +1 −2 test/include/bcs/FunctionPenaltyFluxBC.h
  171. +1 −2 test/include/bcs/VectorCurlBC.h
  172. +4 −5 test/include/bcs/VectorCurlPenaltyDirichletBC.h
  173. +3 −4 test/include/bcs/VectorPenaltyDirichletBC.h
  174. +1 −2 test/include/functions/ClampTestFunction.h
  175. +1 −2 test/include/functions/MTPiecewiseConst1D.h
  176. +1 −2 test/include/functions/MTPiecewiseConst2D.h
  177. +1 −2 test/include/functions/MTPiecewiseConst3D.h
  178. +1 −2 test/include/functions/PolyTestFunction.h
  179. +1 −2 test/include/functions/PostprocessorFunction.h
  180. +1 −2 test/include/functions/SmootherStepTestFunction.h
  181. +1 −2 test/include/functions/TimestepSetupFunction.h
  182. +1 −2 test/include/kernels/DiffTensorKernel.h
  183. +1 −2 test/include/kernels/FuncCoefDiffusion.h
  184. +2 −3 test/include/kernels/LinearVectorPoisson.h
  185. +1 −2 test/include/kernels/SplineFFn.h
  186. +3 −4 test/include/kernels/VectorFEWave.h
  187. +1 −1 test/src/functions/ClampTestFunction.C
  188. +1 −1 test/src/functions/MTPiecewiseConst1D.C
  189. +1 −1 test/src/functions/MTPiecewiseConst2D.C
  190. +1 −1 test/src/functions/MTPiecewiseConst3D.C
  191. +1 −1 test/src/functions/PolyTestFunction.C
  192. +1 −1 test/src/functions/PostprocessorFunction.C
  193. +1 −1 test/src/functions/SmootherStepTestFunction.C
  194. +1 −1 test/src/functions/TimestepSetupFunction.C
  195. +1 −1 test/src/kernels/SplineFFn.C
@@ -81,7 +81,7 @@ class AuxKernelTempl : public MooseObject,
* Nodal or elemental kernel?
* @return true if this is a nodal kernel, otherwise false
*/
bool isNodal() { return _nodal; }
bool isNodal() const { return _nodal; }

/**
* Get a reference to a variable this kernel is action on
@@ -306,4 +306,3 @@ AuxKernelTempl<ComputeValueType>::getUserObjectByName(const UserObjectName & nam
_depend_uo.insert(name);
return UserObjectInterface::getUserObjectByName<T>(name);
}

@@ -43,6 +43,5 @@ class ElementL2ErrorFunctionAux : public ElementLpNormAux
virtual Real computeValue() override;

/// Function representing the exact solution.
Function & _func;
const Function & _func;
};

@@ -34,6 +34,5 @@ class FunctionAux : public AuxKernel
virtual Real computeValue() override;

/// Function being used to compute the value of this kernel
Function & _func;
const Function & _func;
};

@@ -28,6 +28,5 @@ class FunctionScalarAux : public AuxScalarKernel
protected:
virtual Real computeValue() override;

std::vector<Function *> _functions;
std::vector<const Function *> _functions;
};

@@ -34,6 +34,5 @@ class VectorFunctionAux : public VectorAuxKernel
virtual RealVectorValue computeValue() override;

/// Function being used to compute the value of this kernel
Function & _function;
const Function & _function;
};

@@ -31,8 +31,7 @@ class ADFunctionDirichletBC : public ADNodalBC<compute_stage>
virtual ADReal computeQpResidual() override;

/// The function describing the Dirichlet condition
Function & _function;
const Function & _function;

usingNodalBCMembers;
};

@@ -35,7 +35,7 @@ class ADFunctionPresetBC : public ADPresetNodalBC<compute_stage>
virtual ADReal computeQpValue() override;

/// Function being used for evaluation of this BC
Function & _func;
const Function & _func;

usingPresetNodalBCMembers;
};
@@ -31,14 +31,14 @@ class ADVectorFunctionDirichletBC : public ADVectorNodalBC<compute_stage>
virtual ADRealVectorValue computeQpResidual() override;

/// Optional vectorValue function
Function * _function;
const Function * _function;

/// x component function
Function & _function_x;
const Function & _function_x;
/// y component function
Function & _function_y;
const Function & _function_y;
/// z component function
Function & _function_z;
const Function & _function_z;

/// The value for this BC
RealVectorValue _values;
@@ -41,10 +41,9 @@ class DGFunctionDiffusionDirichletBC : public IntegratedBC
virtual Real computeQpJacobian() override;

private:
Function & _func;
const Function & _func;

Real _epsilon;
Real _sigma;
const MaterialProperty<Real> & _diff;
};

@@ -36,6 +36,5 @@ class FunctionDirichletBC : public NodalBC
virtual Real computeQpResidual() override;

/// The function being used for evaluation
Function & _func;
const Function & _func;
};

@@ -30,6 +30,6 @@ class FunctionGradientNeumannBC : public IntegratedBC
virtual Real computeQpResidual() override;

/// The function being used for setting the value
Function & _exact_solution;
const Function & _exact_solution;
const Real _coeff;
};
@@ -30,6 +30,5 @@ class FunctionNeumannBC : public IntegratedBC
virtual Real computeQpResidual() override;

/// The function being used for setting the value
Function & _func;
const Function & _func;
};

@@ -37,9 +37,8 @@ class FunctionPenaltyDirichletBC : public IntegratedBC
virtual Real computeQpResidual() override;
virtual Real computeQpJacobian() override;

Function & _func;
const Function & _func;

private:
Real _p;
};

@@ -56,17 +56,16 @@ class FunctionPeriodicBoundary : public PeriodicBoundaryBase
unsigned int _dim;

/// Pointer to Function for x-component of the boundary
Function * _tr_x;
const Function * _tr_x;

/// Pointer to Function for y-component of the boundary
Function * _tr_y;
const Function * _tr_y;

/// Pointer to Function for z-component of the boundary
Function * _tr_z;
const Function * _tr_z;

/**
* An initialization method to make certain that initialSetup() of a function prior to value()
*/
void init();
};

@@ -34,6 +34,5 @@ class FunctionPresetBC : public PresetNodalBC
virtual Real computeQpValue() override;

/// Function being used for evaluation of this BC
Function & _func;
const Function & _func;
};

@@ -30,14 +30,14 @@ class VectorFunctionDirichletBC : public VectorNodalBC
virtual RealVectorValue computeQpResidual() override;

/// Optional vectorValue function
Function * _function;
const Function * _function;

/// x component function
Function & _function_x;
const Function & _function_x;
/// y component function
Function & _function_y;
const Function & _function_y;
/// z component function
Function & _function_z;
const Function & _function_z;

/// The value for this BC
RealVectorValue _values;
@@ -30,5 +30,5 @@ class ConditionalFunctionEnableControl : public ConditionalEnableControl

private:
/// The function to give a true or false value
Function & _function;
const Function & _function;
};
@@ -35,6 +35,5 @@ class RealFunctionControl : public Control

private:
/// The function to execute
Function & _function;
const Function & _function;
};

@@ -29,7 +29,6 @@ class FunctionDiracSource : public DiracKernel
protected:
virtual Real computeQpResidual() override;

Function & _function;
const Function & _function;
Point _p;
};

@@ -34,7 +34,7 @@ class Axisymmetric2D3DSolutionFunction : public Function
*/
Axisymmetric2D3DSolutionFunction(const InputParameters & parameters);

virtual Real value(Real t, const Point & p) override;
virtual Real value(Real t, const Point & p) const override;

/**
* Setup the function for use
@@ -83,4 +83,3 @@ class Axisymmetric2D3DSolutionFunction : public Function
/// The local SolutionUserObject indices for the variables extracted from the file
std::vector<unsigned int> _solution_object_var_indices;
};

@@ -26,14 +26,14 @@ class BicubicSplineFunction : public Function, public FunctionInterface
public:
BicubicSplineFunction(const InputParameters & parameters);

virtual Real value(Real t, const Point & p) override;
virtual Real value(Real t, const Point & p) const override;

virtual Real derivative(const Point & p, unsigned int deriv_var);
virtual RealGradient gradient(Real t, const Point & p) override;
virtual Real secondDerivative(const Point & p, unsigned int deriv_var);
virtual Real derivative(const Point & p, unsigned int deriv_var) const;
virtual RealGradient gradient(Real t, const Point & p) const override;
virtual Real secondDerivative(const Point & p, unsigned int deriv_var) const;

protected:
BicubicSplineInterpolation _ipol;
mutable BicubicSplineInterpolation _ipol;

// Desired normal direction
unsigned int _normal_component;
@@ -45,11 +45,10 @@ class BicubicSplineFunction : public Function, public FunctionInterface
std::vector<Real> _yx21;
std::vector<Real> _yx2n;

Function & _yx1;
Function & _yx2;
const Function & _yx1;
const Function & _yx2;

// The xyz index that x1/x2 should map to
Real _x1_index;
Real _x2_index;
};

@@ -26,10 +26,9 @@ class CompositeFunction : public Function, protected FunctionInterface
public:
CompositeFunction(const InputParameters & parameters);

virtual Real value(Real t, const Point & pt) override;
virtual Real value(Real t, const Point & pt) const override;

private:
const Real _scale_factor;
std::vector<Function *> _f;
std::vector<const Function *> _f;
};

@@ -24,9 +24,8 @@ class ConstantFunction : public Function
public:
ConstantFunction(const InputParameters & parameters);

virtual Real value(Real t, const Point & p) override;
virtual Real value(Real t, const Point & p) const override;

protected:
const Real & _value;
};

@@ -65,7 +65,7 @@ class Function : public MooseObject,
* \param p The Point in space (x,y,z)
* \return A scalar of the function evaluated at the time and location
*/
virtual Real value(Real t, const Point & p);
virtual Real value(Real t, const Point & p) const;

/**
* Override this to evaluate the vector function at a point (t,x,y,z), by default
@@ -74,7 +74,7 @@ class Function : public MooseObject,
* \param p The Point in space (x,y,z)
* \return A vector of the function evaluated at the time and location
*/
virtual RealVectorValue vectorValue(Real t, const Point & p);
virtual RealVectorValue vectorValue(Real t, const Point & p) const;

/**
* Override this to evaluate the curl of the vector function at a point (t,x,y,z),
@@ -83,7 +83,7 @@ class Function : public MooseObject,
* \param p The Point in space (x,y,z)
* \return A vector of the curl of the function evaluated at the time and location
*/
virtual RealVectorValue vectorCurl(Real t, const Point & p);
virtual RealVectorValue vectorCurl(Real t, const Point & p) const;

/**
* Function objects can optionally provide a gradient at a point. By default
@@ -92,20 +92,19 @@ class Function : public MooseObject,
* \param p The Point in space (x,y,z)
* \return A gradient of the function evaluated at the time and location
*/
virtual RealGradient gradient(Real t, const Point & p);
virtual RealGradient gradient(Real t, const Point & p) const;

/**
* Get the time derivative of the function
* \param t The time
* \param p The point in space (x,y,z)
* \return The time derivative of the function at the specified time and location
*/
virtual Real timeDerivative(Real t, const Point & p);
virtual Real timeDerivative(Real t, const Point & p) const;

// Not defined
virtual Real integral();
virtual Real integral() const;

// Not defined
virtual Real average();
virtual Real average() const;
};

@@ -51,14 +51,14 @@ class FunctionInterface
* @param name The name of the parameter key of the function to retrieve
* @return The function with name associated with the parameter 'name'
*/
Function & getFunction(const std::string & name);
const Function & getFunction(const std::string & name) const;

/**
* Get a function with a given name
* @param name The name of the function to retrieve
* @return The function with name 'name'
*/
Function & getFunctionByName(const FunctionName & name);
const Function & getFunctionByName(const FunctionName & name) const;

private:
/// Parameters of the object with this interface
@@ -68,6 +68,5 @@ class FunctionInterface
FEProblemBase & _fni_feproblem;

/// Thread ID
THREAD_ID _fni_tid;
const THREAD_ID _fni_tid;
};

@@ -46,6 +46,5 @@ class ImageFunction : public ImageSampler, public Function
* @param t Time (unused)
* @param p The point at which to extract pixel data
*/
virtual Real value(Real t, const Point & p) override;
virtual Real value(Real t, const Point & p) const override;
};

@@ -25,13 +25,12 @@ class LinearCombinationFunction : public Function, protected FunctionInterface
public:
LinearCombinationFunction(const InputParameters & parameters);

virtual Real value(Real t, const Point & pt) override;
virtual RealVectorValue vectorValue(Real t, const Point & p) override;
virtual RealGradient gradient(Real t, const Point & p) override;
virtual Real value(Real t, const Point & pt) const override;
virtual RealVectorValue vectorValue(Real t, const Point & p) const override;
virtual RealGradient gradient(Real t, const Point & p) const override;

private:
std::vector<Real> _w;

std::vector<Function *> _f;
std::vector<const Function *> _f;
};

0 comments on commit 4ce690f

Please sign in to comment.
You can’t perform that action at this time.