Branch data Line data Source code
1 : : /* *****************************************************************
2 : : MESQUITE -- The Mesh Quality Improvement Toolkit
3 : :
4 : : Copyright 2006 Lawrence Livermore National Laboratory. Under
5 : : the terms of Contract B545069 with the University of Wisconsin --
6 : : Madison, Lawrence Livermore National Laboratory retains certain
7 : : rights in this software.
8 : :
9 : : This library is free software; you can redistribute it and/or
10 : : modify it under the terms of the GNU Lesser General Public
11 : : License as published by the Free Software Foundation; either
12 : : version 2.1 of the License, or (at your option) any later version.
13 : :
14 : : This library is distributed in the hope that it will be useful,
15 : : but WITHOUT ANY WARRANTY; without even the implied warranty of
16 : : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 : : Lesser General Public License for more details.
18 : :
19 : : You should have received a copy of the GNU Lesser General Public License
20 : : (lgpl.txt) along with this library; if not, write to the Free Software
21 : : Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 : :
23 : : (2006) [email protected]
24 : :
25 : : ***************************************************************** */
26 : :
27 : : #ifndef MSQ_INSTRUCTION_HPP
28 : : #define MSQ_INSTRUCTION_HPP
29 : :
30 : : #include "Mesquite.hpp"
31 : :
32 : : #include <string>
33 : :
34 : : namespace MBMesquite
35 : : {
36 : :
37 : : class Mesh;
38 : : class ParallelMesh;
39 : : class MeshDomain;
40 : : class MeshDomainAssoc;
41 : : class MsqError;
42 : : class Settings;
43 : :
44 : : //!\brief Base class for all objects inserted into InstructionQueue
45 : 273 : class MESQUITE_EXPORT Instruction
46 : : {
47 : : public:
48 : : virtual ~Instruction();
49 : :
50 : : //! Called for all instructions in queue before loop_over_mesh
51 : : //! is called for any insetruction in queue. Default behavior
52 : : //! is to do nothing.
53 : : virtual void initialize_queue( MeshDomainAssoc* mesh_and_domain, const Settings* settings, MsqError& err ) = 0;
54 : :
55 : : //! Virtual fuction implementing primary functionaliy of
56 : : //! instruction instance.
57 : : virtual double loop_over_mesh( MeshDomainAssoc* mesh_and_domain, const Settings* settings, MsqError& err ) = 0;
58 : :
59 : : //! Virtual fuction implementing primary functionaliy of
60 : : //! instruction instance for parallel mesh.
61 : : virtual double loop_over_mesh( ParallelMesh* mesh, MeshDomain* domain, const Settings* settings, MsqError& err );
62 : :
63 : : //! Get string name for use in diagnostic and status output
64 : : virtual std::string get_name() const = 0;
65 : :
66 : : //! Using data from query methods in MeshInterface or calculating
67 : : //! as necessary depending on values in Settings, initialize
68 : : //! MSQ_HARD_FIXED and MSQ_SLAVED flags on vertices, and clear
69 : : //! MSQ_CULLED flag on all vertices.
70 : : //! \NOTE SLAVE_ALL setting is handled in PatchData rather than here
71 : : //! for efficiency.
72 : : static void initialize_vertex_byte( MeshDomainAssoc* mesh_and_domain, const Settings* settings, MsqError& err );
73 : : };
74 : :
75 : : } // namespace MBMesquite
76 : :
77 : : #endif
|