libMesh
variational_smoother_constraint.h
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2025 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_VARIATIONAL_SMOOTHER_CONSTRAINT_H
19 #define LIBMESH_VARIATIONAL_SMOOTHER_CONSTRAINT_H
20 
21 // Local Includes
22 #include "libmesh/system.h"
23 #include "libmesh/dof_map.h"
24 
25 namespace libMesh
26 {
27 /*
28  * Constraint class for the VariationalMeshSmoother.
29  *
30  * Currently, all mesh boundary nodes are constrained to not move during smoothing.
31  * If requested (preserve_subdomain_boundaries = true), nodes on subdomain boundaries
32  * are also constrained to not move.
33  */
35 {
36 private:
37 
39 
42 
43  /*
44  * Constrain (fix) a node to not move during mesh smoothing.
45  * @param node Node to fix.
46  */
47  void fix_node(const Node & node);
48 
49 public:
50 
51  /*
52  * Constructor
53  * @param sys System to constrain.
54  * @param preserve_subdomain_boundaries Whether to constrain nodes on subdomain boundaries to not move.
55  */
56  VariationalSmootherConstraint(System & sys, const bool & preserve_subdomain_boundaries);
57 
58  virtual ~VariationalSmootherConstraint() override;
59 
60  virtual void constrain() override;
61 };
62 
63 
64 } // namespace libMesh
65 
66 #endif // LIBMESH_VARIATIONAL_SMOOTHER_CONSTRAINT_H
A Node is like a Point, but with more information.
Definition: node.h:52
The libMesh namespace provides an interface to certain functionality in the library.
Manages consistently variables, degrees of freedom, and coefficient vectors.
Definition: system.h:96
virtual ~VariationalSmootherConstraint() override
const bool _preserve_subdomain_boundaries
Whether nodes on subdomain boundaries are subject to change via smoothing.
virtual void constrain() override
Constraint function.
Abstract base class to be used for system constraints.
Definition: system.h:179
VariationalSmootherConstraint(System &sys, const bool &preserve_subdomain_boundaries)