https://mooseframework.inl.gov
ElemInfo.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 #include "MooseTypes.h"
13 #include "libmesh/point.h"
14 #include "libmesh/elem.h"
15 
16 #include <map>
17 #include <set>
18 #include <memory>
19 
20 class FaceInfo;
21 
25 class ElemInfo
26 {
27 public:
29  ElemInfo(const Elem * const elem);
30 
32  ElemInfo() : _elem(nullptr) {}
33 
34  const Elem * elem() const { return _elem; }
35  Real volume() const { return _volume; }
36  const Point & centroid() const { return _centroid; }
39  const std::vector<std::vector<dof_id_type>> & dofIndices() const { return _dof_indices; }
40  std::vector<std::vector<dof_id_type>> & dofIndices() { return _dof_indices; }
41 
43  SubdomainID subdomain_id() const { return _elem->subdomain_id(); }
44 
45 protected:
47  const Elem * const _elem;
51  Point _centroid;
60  std::vector<std::vector<dof_id_type>> _dof_indices;
61 };
std::vector< std::vector< dof_id_type > > _dof_indices
Cached dof indices mainly for segregated linear FV evaluations with the following structure: _dof_ind...
Definition: ElemInfo.h:60
const Elem * elem() const
Definition: ElemInfo.h:34
Point _centroid
Centroid of the element.
Definition: ElemInfo.h:51
Real _coord_transform_factor
Cached coordinate transformation factor.
Definition: ElemInfo.h:53
ElemInfo()
Default constructor.
Definition: ElemInfo.h:32
std::vector< std::vector< dof_id_type > > & dofIndices()
Definition: ElemInfo.h:40
This data structure is used to store geometric and variable related metadata about each cell face in ...
Definition: FaceInfo.h:36
const Point & centroid() const
Definition: ElemInfo.h:36
const std::vector< std::vector< dof_id_type > > & dofIndices() const
Definition: ElemInfo.h:39
Real coordFactor() const
Definition: ElemInfo.h:37
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real _volume
Volume of the element.
Definition: ElemInfo.h:49
Class used for caching additional information for elements such as the volume and centroid...
Definition: ElemInfo.h:25
const Elem *const _elem
Reference to the element in libmesh.
Definition: ElemInfo.h:47
Real & coordFactor()
Definition: ElemInfo.h:38
Real volume() const
Definition: ElemInfo.h:35
SubdomainID subdomain_id() const
We return the subdomain ID of the corresponding libmesh element.
Definition: ElemInfo.h:43