https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMComplexVariableLineValueSampler.C
Go to the documentation of this file.
1//* This file is part of the MOOSE framework
2//* https://mooseframework.inl.gov
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#ifdef MOOSE_MFEM_ENABLED
11
13
15
18{
20
21 params.addClassDescription("Sample a complex MFEM variable along a specified line, outputting "
22 "real and imaginary parts as separate columns.");
23
24 // these should not be of type libmesh::Point - need mfem::Point parsing
25 params.addRequiredParam<Point>("start_point", "The beginning of the line");
26 params.addRequiredParam<Point>("end_point", "The ending of the line");
27
28 params.addRequiredRangeCheckedParam<unsigned int>(
29 "num_points", "num_points >= 2", "The number of points to sample along the line");
30
31 return params;
32}
33
35 const InputParameters & parameters)
37 parameters,
38 // can't call getParam as that requires initialized base class
39 // so calling parameters.get directly
40 Moose::MFEM::generateLinePoints(parameters.get<Point>("start_point"),
41 parameters.get<Point>("end_point"),
42 parameters.get<unsigned int>("num_points")))
43{
44}
45
46#endif // MOOSE_MFEM_ENABLED
registerMooseObject("MooseApp", MFEMComplexVariableLineValueSampler)
void ErrorVector unsigned int
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
void addRequiredRangeCheckedParam(const std::string &name, const std::string &parsed_function, const std::string &doc_string)
These methods add an range checked parameters.
void addRequiredParam(const std::string &name, const std::string &doc_string)
This method adds a parameter and documentation string to the InputParameters object that will be extr...
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.
MFEMComplexVariableLineValueSampler(const InputParameters &parameters)
MFEM VectorPostprocessor base class for sampling a complex-valued variable at a set of points.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...