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 = 0;
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 const std::vector<Point> _query_points;
51 mfem::ParMesh & _mesh;
53 mfem::FindPointsGSLIB _finder;
55 mfem::Vector _points;
57 std::vector<std::reference_wrapper<VectorPostprocessorValue>> _declared_points;
58};
59
60#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.
const std::vector< Point > _query_points
Original query points used for point-location diagnostics.
void finalize() override=0
Copies interpolated values into the VPP vectors.
void initialSetup() override
Checks that all query points were found and prepares coordinate output.
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.
Vector postprocessor for MFEM results.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131