MAST
level_set_intersected_elem.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2019 Manav Bhatia
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 
21 #ifndef __mast_level_set_intersected_elem_h__
22 #define __mast_level_set_intersected_elem_h__
23 
24 // MAST includes
25 #include "mesh/geom_elem.h"
26 
27 
28 namespace MAST {
29 
30  // Forward declerations
31  class LevelSetIntersection;
32 
39 
40  public:
42 
43  virtual ~LevelSetIntersectedElem();
44 
48  virtual const libMesh::Elem& get_quadrature_elem() const;
49 
53  virtual const libMesh::Elem& get_quadrature_local_elem() const;
54 
59  bool if_elem_has_level_set_boundary() const;
60 
61 
67 
68 
74 
79  virtual void init(const libMesh::Elem& elem,
80  const MAST::SystemInitialization& sys_init) {
81 
82  libmesh_error(); // should not get called
83  }
84 
89  virtual void init(const libMesh::Elem& elem,
90  const MAST::SystemInitialization& sys_init,
91  MAST::LevelSetIntersection& intersection);
92 
93 
99  virtual std::unique_ptr<MAST::FEBase>
100  init_fe(bool init_grads,
101  bool init_second_order_derivative,
102  int extra_quadrature_order = 0) const;
103 
104 
110  virtual std::unique_ptr<MAST::FEBase>
111  init_side_fe(unsigned int s,
112  bool init_grads,
113  int extra_quadrature_order = 0) const;
114 
115 
116  protected:
117 
118  const libMesh::Elem *_sub_elem;
119  libMesh::Elem *_local_sub_elem;
120 
122 
126  std::vector<libMesh::Node*> _local_subelem_nodes;
127  };
128 }
129 
130 #endif // __mast_level_set_intersected_elem_h__
virtual const libMesh::Elem & get_quadrature_elem() const
virtual void init(const libMesh::Elem &elem, const MAST::SystemInitialization &sys_init)
This method should not get called for this class.
MAST::LevelSetIntersection * _intersection
virtual const libMesh::Elem & get_quadrature_local_elem() const
virtual std::unique_ptr< MAST::FEBase > init_side_fe(unsigned int s, bool init_grads, int extra_quadrature_order=0) const
initializes the finite element shape function and quadrature object for the side with the order of qu...
This class inherits from MAST::GeomElem and provides an interface to initialize FE objects on sub-ele...
virtual std::unique_ptr< MAST::FEBase > init_fe(bool init_grads, bool init_second_order_derivative, int extra_quadrature_order=0) const
initializes the finite element shape function and quadrature object with the order of quadrature rule...
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
Definition: geom_elem.h:59
std::vector< libMesh::Node * > _local_subelem_nodes
nodes for local element