MAST
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
level_set_perimeter_output.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2020 Manav Bhatia and MAST authors
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_perimeter_output_h__
22 #define _mast__level_set_perimeter_output_h__
23 
24 // MAST includes
26 
27 
28 namespace MAST {
29 
30  // Forward declerations
31  class LevelSetIntersection;
32 
42 
43  public:
44 
46 
47  virtual ~LevelSetPerimeter();
48 
54 
58  virtual void
59  set_elem_data(unsigned int dim,
60  const libMesh::Elem& ref_elem,
61  MAST::GeomElem& elem) const { }
62 
67  virtual void
68  init(const MAST::GeomElem& elem);
69 
78  virtual void zero_for_analysis();
79 
80 
86  virtual void zero_for_sensitivity();
87 
96  virtual Real output_for_elem();
97 
101  virtual Real output_total();
102 
111 
120 
130  // does not make sense for this output. // should not get called.
131  libmesh_error();
132  }
133 
134 
144  virtual void evaluate();
145 
152  virtual void evaluate_sensitivity(const MAST::FunctionBase& f);
153 
161 
162  libmesh_assert(false); // to be implemented
163  }
164 
171  virtual void
173 
180 
181  protected:
182 
186  };
187 
188 }
189 
190 
191 
192 
193 #endif // _mast__level_set_volume_output_h__
virtual void evaluate_shape_sensitivity(const MAST::FunctionBase &f)
this evaluates all relevant shape sensitivity components on the element.
virtual void init(const MAST::GeomElem &elem)
initializes the object for calculation of element quantities for the specified elem.
virtual void evaluate()
this is the abstract interface to be implemented by derived classes.
virtual void set_elem_data(unsigned int dim, const libMesh::Elem &ref_elem, MAST::GeomElem &elem) const
virtual function, nothing to be done for level set
virtual void evaluate_topology_sensitivity(const MAST::FunctionBase &f)
this evaluates all relevant topological sensitivity components on the element.
This provides the base class for definitin of element level contribution of output quantity in an ana...
virtual void output_derivative_for_elem(RealVectorX &dq_dX)
returns the output quantity derivative with respect to state vector in dq_dX.
void set_heaviside_smoothing_delta(Real d=0.1)
Sets the value of the heaviside smooth delta, which is the width +/- d of the level set function abou...
virtual void zero_for_analysis()
zeroes the output quantity values stored inside this object so that assembly process can begin...
libMesh::Real Real
virtual Real output_sensitivity_total(const MAST::FunctionBase &p)
virtual Real output_sensitivity_for_elem(const MAST::FunctionBase &p)
Matrix< Real, Dynamic, 1 > RealVectorX
virtual void evaluate_sensitivity(const MAST::FunctionBase &f)
this evaluates all relevant sensitivity components on the element.
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
Definition: geom_elem.h:59
Computes the perimeter of a level set boundary as a volume integral , where is the level set functio...
virtual void zero_for_sensitivity()
zeroes the output quantity values stored inside this object so that assembly process can begin...