NEMoSys  0.63.0
A modular, extensible resource with robust automated mesh generation, mesh quality analysis, adaptive mesh refinement, and data transfer between arbitrary meshes.
srvBase.H
Go to the documentation of this file.
1 /*******************************************************************************
2 * Promesh *
3 * Copyright (C) 2022, IllinoisRocstar LLC. All rights reserved. *
4 * *
5 * Promesh is the property of IllinoisRocstar LLC. *
6 * *
7 * IllinoisRocstar LLC *
8 * Champaign, IL *
9 * www.illinoisrocstar.com *
10 * promesh@illinoisrocstar.com *
11 *******************************************************************************/
12 /*******************************************************************************
13 * This file is part of Promesh *
14 * *
15 * This version of Promesh is free software: you can redistribute it and/or *
16 * modify it under the terms of the GNU Lesser General Public License as *
17 * published by the Free Software Foundation, either version 3 of the License, *
18 * or (at your option) any later version. *
19 * *
20 * Promesh is distributed in the hope that it will be useful, but WITHOUT ANY *
21 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS *
22 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more *
23 * details. *
24 * *
25 * You should have received a copy of the GNU Lesser General Public License *
26 * along with this program. If not, see <https://www.gnu.org/licenses/>. *
27 * *
28 *******************************************************************************/
29 #ifndef NEMOSYS_SRVBASE_H_
30 #define NEMOSYS_SRVBASE_H_
31 
32 #include "nemosys_export.h"
33 
34 #include <vtkAlgorithm.h>
35 
36 namespace NEM {
37 
38 namespace MSH {
39 class geoMeshBase;
40 }
41 
42 namespace SRV {
43 
44 /**
45  * @class srvBase
46  * @brief abstract class for services acting on @c geoMeshBase
47  *
48  * srvBase is an abstract class specifying the interface for all services acting
49  * on a @c geoMeshBase mesh and geometry object. It derives from the
50  * vtkAlgorithm, exposing the vtk robust algorithm pipeline for NEMoSys
51  * services.
52  */
53 class NEMOSYS_EXPORT srvBase : public vtkAlgorithm {
54  public:
55  vtkAbstractTypeMacro(srvBase, vtkAlgorithm)
56 
57  public:
58  int ProcessRequest(vtkInformation *request, vtkInformationVector **inInfo,
59  vtkInformationVector *outInfo) override;
60 
61  //@{
62  /**
63  * Get the output GeoMeshBase for a port on this algorithm.
64  */
65  NEM::MSH::geoMeshBase *GetOutput();
66  NEM::MSH::geoMeshBase *GetOutput(int);
67  //@}
68 
69  protected:
70  srvBase();
71  ~srvBase() override;
72 
73  // convenience method
74  virtual int RequestInformation(vtkInformation *request,
75  vtkInformationVector **inputVector,
76  vtkInformationVector *outputVector);
77 
78  /**
79  * This is called by the superclass.
80  */
81  virtual int RequestDataObject(vtkInformation *request,
82  vtkInformationVector **inputVector,
83  vtkInformationVector *outputVector);
84 
85  /**
86  * This is called by the superclass.
87  * This is the method you should override.
88  */
89  virtual int RequestData(vtkInformation *request,
90  vtkInformationVector **inputVector,
91  vtkInformationVector *outputVector) = 0;
92 
93  /**
94  * This is called by the superclass.
95  */
96  virtual int RequestUpdateExtent(vtkInformation *request,
97  vtkInformationVector **inputVector,
98  vtkInformationVector *outputVector);
99 };
100 
101 } // namespace SRV
102 } // namespace NEM
103 
104 #endif // NEMOSYS_SRVBASE_H_
abstract class for services acting on geoMeshBase
Definition: srvBase.H:53
abstract class to specify geometry and mesh data
Definition: geoMeshBase.H:102