Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : 12 : #include "ElementUserObject.h" 13 : #include "RadialAverage.h" 14 : 15 : /** 16 : * Element user object that filters the objective function sensitivities via a radial average user 17 : * objects. This object can be used to apply a Solid Isotropic Material Penalization (SIMP) to 18 : * optimization. 19 : */ 20 : class SensitivityFilter : public ElementUserObject 21 : { 22 : public: 23 : static InputParameters validParams(); 24 : 25 : SensitivityFilter(const InputParameters & parameters); 26 : 27 720 : virtual void initialize() override{}; 28 : virtual void execute() override; 29 594 : virtual void finalize() override{}; 30 126 : virtual void threadJoin(const UserObject &) override{}; 31 : 32 : protected: 33 : /// Radial average user object 34 : const RadialAverage::Result & _filter; 35 : /// Sensitivity with respect to density 36 : MooseWritableVariable & _density_sensitivity; 37 : /// Pseudo-density variable name 38 : const VariableName _design_density_name; 39 : /// The pseudo-density variable 40 : const MooseVariable & _design_density; 41 : };