www.mooseframework.org
ImageFunction.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "ImageFunction.h"
11 #include "MooseMesh.h"
12 
14 
17 {
18  // Define the general parameters
20  params += ImageSampler::validParams();
21  params.addClassDescription("Function with values sampled from an image or image stack.");
22  return params;
23 }
24 
26  : ImageSampler(parameters), Function(parameters)
27 {
28 }
29 
31 
32 void
34 {
35  FEProblemBase * fe_problem = this->getParam<FEProblemBase *>("_fe_problem_base");
36  MooseMesh & mesh = fe_problem->mesh();
38 }
39 
40 Real
41 ImageFunction::value(Real /*t*/, const Point & p) const
42 {
43  return sample(p);
44 }
virtual void initialSetup() override
Initialize the ImageSampler.
Definition: ImageFunction.C:33
Base class for function objects.
Definition: Function.h:37
registerMooseObject("MooseApp", ImageFunction)
A function for extracting data from an image or stack of images.
Definition: ImageFunction.h:19
virtual void setupImageSampler(MooseMesh &mesh)
Perform initialization of image data.
Definition: ImageSampler.C:78
MeshBase & mesh
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real value(Real t, const Point &p) const override
Return the pixel value for the given point.
Definition: ImageFunction.C:41
virtual Real sample(const Point &p) const
Return the pixel value for the given point.
Definition: ImageSampler.C:216
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
MooseMesh wraps a libMesh::Mesh object and enhances its capabilities by caching additional data and s...
Definition: MooseMesh.h:88
ImageFunction(const InputParameters &parameters)
Definition: ImageFunction.C:25
static InputParameters validParams()
Constructor.
Definition: ImageSampler.C:18
A helper class for reading and sampling images using VTK.
Definition: ImageSampler.h:47
static InputParameters validParams()
Class constructor.
Definition: ImageFunction.C:16
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual MooseMesh & mesh() override
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...
virtual ~ImageFunction()
Class destructor.
Definition: ImageFunction.C:30
static InputParameters validParams()
Class constructor.
Definition: Function.C:15