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-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_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 
52  virtual void
53  set_elem_data(unsigned int dim,
54  const libMesh::Elem& ref_elem,
55  MAST::GeomElem& elem) const { }
56 
61  virtual void
62  init(const MAST::GeomElem& elem);
63 
72  virtual void zero_for_analysis();
73 
74 
80  virtual void zero_for_sensitivity();
81 
90  virtual Real output_for_elem();
91 
95  virtual Real output_total();
96 
105 
114 
124  // does not make sense for this output. // should not get called.
125  libmesh_error();
126  }
127 
128 
138  virtual void evaluate();
139 
146  virtual void evaluate_sensitivity(const MAST::FunctionBase& f);
147 
155 
156  libmesh_assert(false); // to be implemented
157  }
158 
165 
166  protected:
167 
171  };
172 
173 }
174 
175 
176 
177 
178 #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.
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.
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)
virtual void evaluate_topology_sensitivity(const MAST::FunctionBase &f, const MAST::FieldFunction< RealVectorX > &vel)
This evaluates the contribution to the topology sensitivity on the boundary .
const MAST::LevelSetIntersection & _intersection
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...
LevelSetPerimeter(MAST::LevelSetIntersection &intersection)
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