mesh_output.C
Go to the documentation of this file.00001 // The libMesh Finite Element Library. 00002 // Copyright (C) 2002-2012 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 00019 // Local includes 00020 #include "libmesh/equation_systems.h" 00021 #include "libmesh/mesh_output.h" 00022 #include "libmesh/parallel.h" 00023 #include "libmesh/parallel_mesh.h" 00024 #include "libmesh/unstructured_mesh.h" 00025 00026 namespace libMesh 00027 { 00028 00029 template <class MT> 00030 void MeshOutput<MT>:: 00031 _build_variable_names_and_solution_vector (const EquationSystems& es, 00032 std::vector<Number>& soln, 00033 std::vector<std::string>& names, 00034 const std::set<std::string>* system_names) 00035 { 00036 if(!_is_parallel_format) 00037 { 00038 // We need a serial mesh for MeshOutput for now 00039 const_cast<EquationSystems&>(es).allgather(); 00040 } 00041 00042 es.build_variable_names (names, NULL, system_names); 00043 es.build_solution_vector (soln, system_names); 00044 } 00045 00046 00047 00048 // Instantiate for our Mesh types. If this becomes too cumbersome later, 00049 // move any functions in this file to the header file instead. 00050 template class MeshOutput<MeshBase>; 00051 template class MeshOutput<UnstructuredMesh>; 00052 template class MeshOutput<ParallelMesh>; 00053 00054 } // namespace libMesh
Site Created By: libMesh Developers
Last modified: February 05 2013 19:54:47 UTC
Hosted By: