$extrastylesheet
00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner 00003 00004 // This library is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public 00006 // License as published by the Free Software Foundation; either 00007 // version 2.1 of the License, or (at your option) any later version. 00008 00009 // This library is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 // Lesser General Public License for more details. 00013 00014 // You should have received a copy of the GNU Lesser General Public 00015 // License along with this library; if not, write to the Free Software 00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00017 00018 #include "libmesh/fe_compute_data.h" 00019 #include "libmesh/equation_systems.h" 00020 00021 namespace libMesh 00022 { 00023 00024 00025 00026 void FEComputeData::clear () 00027 { 00028 this->shape.clear(); 00029 #if defined(LIBMESH_ENABLE_INFINITE_ELEMENTS) && !defined(LIBMESH_USE_COMPLEX_NUMBERS) 00030 this->phase = 0.; 00031 this->speed = 0.; 00032 #endif 00033 00034 #if defined (LIBMESH_ENABLE_INFINITE_ELEMENTS) && defined(LIBMESH_USE_COMPLEX_NUMBERS) 00035 this->speed = 0.; 00036 this->frequency = 0.; 00037 00038 #endif 00039 } 00040 00041 00042 00043 void FEComputeData::init () 00044 { 00045 if (!(this->shape.empty())) 00046 std::fill (this->shape.begin(), this->shape.end(), 0.); 00047 00048 #if defined(LIBMESH_ENABLE_INFINITE_ELEMENTS) && !defined(LIBMESH_USE_COMPLEX_NUMBERS) 00049 this->phase = 0.; 00050 00051 if (equation_systems.parameters.have_parameter<Real>("speed")) 00052 this->speed = this->equation_systems.parameters.get<Real>("speed"); 00053 #endif 00054 00055 #if defined (LIBMESH_ENABLE_INFINITE_ELEMENTS) && defined(LIBMESH_USE_COMPLEX_NUMBERS) 00056 if (equation_systems.parameters.have_parameter<Real>("speed")) 00057 this->speed = this->equation_systems.parameters.get<Real>("speed"); 00058 00059 if (equation_systems.parameters.have_parameter<Real>("current frequency")) 00060 this->frequency = this->equation_systems.parameters.get<Real>("current frequency"); 00061 00062 #endif 00063 } 00064 00065 00066 } // namespace libMesh