libMesh
elem_assembly.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2017 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 #ifndef LIBMESH_ELEM_ASSEMBLY_H
19 #define LIBMESH_ELEM_ASSEMBLY_H
20 
21 #include "libmesh/reference_counted_object.h"
22 #include "libmesh/dense_matrix.h"
23 
24 namespace libMesh
25 {
26 
27 class FEMContext;
28 class System;
29 class Node;
30 
38 class ElemAssembly : public ReferenceCountedObject<ElemAssembly>
39 {
40 public:
41 
47  :
49  {}
50 
54  virtual ~ElemAssembly () {}
55 
59  virtual void interior_assembly(FEMContext &) { }
60 
64  virtual void boundary_assembly(FEMContext &) { }
65 
70  virtual void
71  get_nodal_values(std::vector<dof_id_type>& ,
74  const System & ,
75  const Node &)
76  {
77  // Do nothing by default
78  }
79 
86 #ifdef LIBMESH_ENABLE_DEPRECATED
87  virtual void
88  get_nodal_rhs_values(std::map<numeric_index_type, Number> & values,
89  const System &,
90  const Node &)
91  {
92  // use get_nodal_values instead, since that enables matrix and vector assembly
93  libmesh_deprecated();
94 
95  // By default, just clear the values map
96  values.clear();
97 
98  // Set flag so that we know this is the default implementation
100  }
101 #endif
102 
108 
109 protected:
110 
111 };
112 
113 }
114 
115 #endif // LIBMESH_ELEM_ASSEMBLY_H
A Node is like a Point, but with more information.
Definition: node.h:52
ElemAssembly()
Constructor.
Definition: elem_assembly.h:46
virtual void interior_assembly(FEMContext &)
Perform the element interior assembly.
Definition: elem_assembly.h:59
The libMesh namespace provides an interface to certain functionality in the library.
virtual void get_nodal_values(std::vector< dof_id_type > &, DenseMatrix< Number > &, DenseVector< Number > &, const System &, const Node &)
Get values to add to the matrix or rhs vector based on node.
Definition: elem_assembly.h:71
virtual void get_nodal_rhs_values(std::map< numeric_index_type, Number > &values, const System &, const Node &)
Get values to add to the RHS vector based on node.
Definition: elem_assembly.h:88
virtual void boundary_assembly(FEMContext &)
Perform the element boundary assembly.
Definition: elem_assembly.h:64
virtual ~ElemAssembly()
Destructor.
Definition: elem_assembly.h:54
This is the base class for classes which contain information related to any physical process that mig...
Definition: system.h:76
This class provides all data required for a physics package (e.g.
Definition: fem_context.h:61
This class implements reference counting.
bool is_nodal_rhs_values_overriden
Temporary flag to help us figure out if we should call the deprecated get_nodal_rhs_values method or ...
ElemAssembly provides a per-element (interior and boundary) assembly functionality.
Definition: elem_assembly.h:38