https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MFEMSamplerBase.h
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
12#pragma once
13
15
23{
24public:
26
28 void initialSetup() override;
29
30 void initialize() override {}
31
33 void finalize() override;
34
35protected:
37 enum class PointLocationCode : unsigned int
38 {
39 INTERNAL = 0,
40 BORDER = 1,
41 NOT_FOUND = 2,
42 };
43
45 const std::vector<Point> & points,
46 mfem::ParMesh & mesh);
47
49 virtual void finalizeValues() = 0;
50
52 const std::vector<Point> _query_points;
54 mfem::ParMesh & _mesh;
56 mfem::FindPointsGSLIB _finder;
58 mfem::Ordering::Type _points_ordering;
60 mfem::Vector _points;
62 std::vector<std::reference_wrapper<VectorPostprocessorValue>> _declared_points;
63};
64
65#endif // MOOSE_MFEM_ENABLED
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Abstract base class for sampling MFEM quantities at points.
mfem::FindPointsGSLIB _finder
GSLIB point finder used to locate and interpolate the query points.
static InputParameters validParams()
mfem::ParMesh & _mesh
MFEM mesh on which the sampled quantity is defined.
void initialize() override
Perform any pre-execution setup for this object.
PointLocationCode
Classification returned by GSLIB for a query point's location.
void finalize() override
Outputs coordinates then delegates value output to finalizeValues().
const std::vector< Point > _query_points
Original query points used for point-location diagnostics.
virtual void finalizeValues()=0
Copies interpolated values into the subclass VPP vectors.
void initialSetup() override
Checks that all query points were found.
mfem::Ordering::Type _points_ordering
Ordering used to store the point coordinates in the MFEM vector.
std::vector< std::reference_wrapper< VectorPostprocessorValue > > _declared_points
Declared VPP output vectors for spatial coordinates ("x_0", "x_1", ...).
mfem::Vector _points
MFEM vector containing the query-point coordinates.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131