Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
src/Misc/MeshTransform.hpp
Go to the documentation of this file.
1 /* *****************************************************************
2  MESQUITE -- The Mesh Quality Improvement Toolkit
3 
4  Copyright 2004 Sandia Corporation and Argonne National
5  Laboratory. Under the terms of Contract DE-AC04-94AL85000
6  with Sandia Corporation, the U.S. Government 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  diachin2@llnl.gov, djmelan@sandia.gov, mbrewer@sandia.gov,
24  pknupp@sandia.gov, tleurent@mcs.anl.gov, tmunson@mcs.anl.gov
25 
26  ***************************************************************** */
37 #ifndef Mesquite_MeshTransform_hpp
38 #define Mesquite_MeshTransform_hpp
39 
40 
41 #include "Mesquite.hpp"
42 #include "QualityImprover.hpp"
43 #include "PatchData.hpp"
44 #include "ObjectiveFunction.hpp"
45 #include "Vector3D.hpp"
46 #include "Matrix3D.hpp"
47 
48 namespace Mesquite
49 {
50 
58  class MeshTransform : public PatchDataUser
59  {
60  public:
61  MeshTransform(Matrix3D &in_mat, Vector3D &in_vec, MsqError &err);
62 
63  // virtual destructor ensures use of polymorphism during destruction
64  virtual ~MeshTransform() { };
65  //virtual functions from PatchDataUser...
67  virtual double loop_over_mesh(MeshSet &ms, MsqError &err);
69  virtual msq_std::string get_name() { return "Mesh Transform.";}
75  virtual void set_patch_type(PatchData::PatchType patch_type, MsqError &err,
76  int param1, int param2);
77 
78  private:
79  Matrix3D mMat;
80  Vector3D mVec;
81  };
82 
83 
84 } // namespace
85 #endif // Mesquite_MeshTransform_hpp
MeshTransform(Matrix3D &in_mat, Vector3D &in_vec, MsqError &err)
Used to hold the error state and return it to the application.
virtual AlgorithmType get_algorithm_type()
Return the AlgorithmType of thsi PatchDataUser: MESH_TRANSFORM.
Vector3D is the object that effeciently stores information about about three-deminsional vectors...
virtual void set_patch_type(PatchData::PatchType patch_type, MsqError &err, int param1, int param2)
MeshTransform is built to use ELEMETNS_ON_VERTEX_PATCH with a depth one.
NVec< 3, double > Vector3D
virtual double loop_over_mesh(MeshSet &ms, MsqError &err)
Loop over the mesh and perform the affine transformation.
3*3 Matric class, row-oriented, 0-based [i][j] indexing.
Vector3D mVec
Matrix for the affine transformation.
PatchType
Tells MeshSet how to retrieve the mesh entities that will be stored in PatchData. ...
virtual msq_std::string get_name()
Return the name of this PatchDataUser: Mesh Transform.
The MeshSet class stores one or more Mesquite::Mesh pointers and manages access to the mesh informati...