$extrastylesheet
00001 00002 // The libMesh Finite Element Library. 00003 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00004 00005 // This library is free software; you can redistribute it and/or 00006 // modify it under the terms of the GNU Lesser General Public 00007 // License as published by the Free Software Foundation; either 00008 // version 2.1 of the License, or (at your option) any later version. 00009 00010 // This library is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 // Lesser General Public License for more details. 00014 00015 // You should have received a copy of the GNU Lesser General Public 00016 // License along with this library; if not, write to the Free Software 00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00018 00019 00020 00021 #ifndef LIBMESH_DIFF_QOI_H 00022 #define LIBMESH_DIFF_QOI_H 00023 00024 // Local Includes 00025 #include "libmesh/diff_context.h" 00026 #include "libmesh/qoi_set.h" 00027 #include "libmesh/auto_ptr.h" 00028 #include "libmesh/parallel.h" 00029 00030 // C++ includes 00031 00032 namespace libMesh 00033 { 00034 00047 // ------------------------------------------------------------ 00048 // DifferentiableQoI class definition 00049 00050 class DifferentiableQoI 00051 { 00052 public: 00053 00058 DifferentiableQoI (); 00059 00063 virtual ~DifferentiableQoI () {} 00064 00069 virtual void init_qoi( std::vector<Number>& /*sys_qoi*/){} 00070 00075 virtual void clear_qoi () {} 00076 00083 bool assemble_qoi_sides; 00084 00091 bool assemble_qoi_internal_sides; 00092 00099 bool assemble_qoi_elements; 00100 00108 virtual void element_qoi (DiffContext&, 00109 const QoISet&) 00110 {} 00111 00120 virtual void element_qoi_derivative (DiffContext&, 00121 const QoISet&) 00122 {} 00123 00131 virtual void side_qoi (DiffContext&, 00132 const QoISet&) 00133 {} 00134 00143 virtual void side_qoi_derivative (DiffContext&, 00144 const QoISet&) 00145 {} 00146 00153 virtual void init_context(DiffContext &) {} 00154 00158 virtual UniquePtr<DifferentiableQoI> clone() =0; 00159 00163 virtual void thread_join( std::vector<Number>& qoi, const std::vector<Number>& other_qoi, 00164 const QoISet& qoi_indices ); 00165 00170 virtual void parallel_op(const Parallel::Communicator &communicator, 00171 std::vector<Number>& sys_qoi, std::vector<Number>& local_qoi, 00172 const QoISet& qoi_indices ); 00173 }; 00174 00175 } // namespace libMesh 00176 00177 00178 #endif // LIBMESH_DIFF_QOI_H