MOAB: Mesh Oriented datABase  (version 5.4.1)
Instruction.hpp
Go to the documentation of this file.
00001 /* *****************************************************************
00002     MESQUITE -- The Mesh Quality Improvement Toolkit
00003 
00004     Copyright 2006 Lawrence Livermore National Laboratory.  Under
00005     the terms of Contract B545069 with the University of Wisconsin --
00006     Madison, Lawrence Livermore National Laboratory retains certain
00007     rights in this software.
00008 
00009     This library is free software; you can redistribute it and/or
00010     modify it under the terms of the GNU Lesser General Public
00011     License as published by the Free Software Foundation; either
00012     version 2.1 of the License, or (at your option) any later version.
00013 
00014     This library is distributed in the hope that it will be useful,
00015     but WITHOUT ANY WARRANTY; without even the implied warranty of
00016     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017     Lesser General Public License for more details.
00018 
00019     You should have received a copy of the GNU Lesser General Public License
00020     (lgpl.txt) along with this library; if not, write to the Free Software
00021     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 
00023     (2006) [email protected]
00024 
00025   ***************************************************************** */
00026 
00027 #ifndef MSQ_INSTRUCTION_HPP
00028 #define MSQ_INSTRUCTION_HPP
00029 
00030 #include "Mesquite.hpp"
00031 
00032 #include <string>
00033 
00034 namespace MBMesquite
00035 {
00036 
00037 class Mesh;
00038 class ParallelMesh;
00039 class MeshDomain;
00040 class MeshDomainAssoc;
00041 class MsqError;
00042 class Settings;
00043 
00044 //!\brief Base class for all objects inserted into InstructionQueue
00045 class MESQUITE_EXPORT Instruction
00046 {
00047   public:
00048     virtual ~Instruction();
00049 
00050     //! Called for all instructions in queue before loop_over_mesh
00051     //! is called for any insetruction in queue.  Default behavior
00052     //! is to do nothing.
00053     virtual void initialize_queue( MeshDomainAssoc* mesh_and_domain, const Settings* settings, MsqError& err ) = 0;
00054 
00055     //! Virtual fuction implementing primary functionaliy of
00056     //! instruction instance.
00057     virtual double loop_over_mesh( MeshDomainAssoc* mesh_and_domain, const Settings* settings, MsqError& err ) = 0;
00058 
00059     //! Virtual fuction implementing primary functionaliy of
00060     //! instruction instance for parallel mesh.
00061     virtual double loop_over_mesh( ParallelMesh* mesh, MeshDomain* domain, const Settings* settings, MsqError& err );
00062 
00063     //! Get string name for use in diagnostic and status output
00064     virtual std::string get_name() const = 0;
00065 
00066     //! Using data from query methods in MeshInterface or calculating
00067     //! as necessary depending on values in Settings, initialize
00068     //! MSQ_HARD_FIXED and MSQ_SLAVED flags on vertices, and clear
00069     //! MSQ_CULLED flag on all vertices.
00070     //! \NOTE SLAVE_ALL setting is handled in PatchData rather than here
00071     //! for efficiency.
00072     static void initialize_vertex_byte( MeshDomainAssoc* mesh_and_domain, const Settings* settings, MsqError& err );
00073 };
00074 
00075 }  // namespace MBMesquite
00076 
00077 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines