https://mooseframework.inl.gov
NodalPatchRecoveryBase.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 #pragma once
11 
12 // MOOSE includes
13 #include "ElementUserObject.h"
14 
16 {
17 public:
19 
21 
30  virtual Real nodalPatchRecovery(const Point & p, const std::vector<dof_id_type> & elem_ids) const;
31 
32  virtual void initialize() override;
33  virtual void execute() override;
34  virtual void threadJoin(const UserObject &) override;
35  virtual void finalize() override;
36 
37 protected:
39  virtual Real computeValue() = 0;
40 
41  unsigned int _qp;
42 
43 private:
56  RealEigenVector evaluateBasisFunctions(const Point & q_point) const;
57 
59  const unsigned int _patch_polynomial_order;
60 
62  const std::vector<std::vector<unsigned int>> _multi_index;
63 
65  const unsigned int _q;
66 
68  std::map<dof_id_type, RealEigenMatrix> _Ae;
69 
71  std::map<dof_id_type, RealEigenVector> _be;
72 };
const unsigned int _patch_polynomial_order
The polynomial order, default is variable order.
std::map< dof_id_type, RealEigenVector > _be
The element-level b vector.
static InputParameters validParams()
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
std::map< dof_id_type, RealEigenMatrix > _Ae
The element-level A matrix.
RealEigenVector evaluateBasisFunctions(const Point &q_point) const
Compute the P vector at a given point i.e.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
virtual Real nodalPatchRecovery(const Point &p, const std::vector< dof_id_type > &elem_ids) const
Solve the least-squares problem.
virtual void execute() override
Execute method.
NodalPatchRecoveryBase(const InputParameters &parameters)
const std::vector< std::vector< unsigned int > > _multi_index
The multi-index table.
virtual Real computeValue()=0
Compute the quantity to recover using nodal patch recovery.
virtual void finalize() override
Finalize.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void threadJoin(const UserObject &) override
Must override.
const InputParameters & parameters() const
Get the parameters of the object.
Eigen::Matrix< Real, Eigen::Dynamic, 1 > RealEigenVector
Definition: MooseTypes.h:146
const unsigned int _q
Number of basis functions.
Base class for user-specific data.
Definition: UserObject.h:40