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.
NEM::SRV::NucMeshSrv Class Referenceabstract

Detailed Description

Definition at line 92 of file NucMeshSrv.H.

Public Member Functions

void SetConfiguration (const NucMeshConf &configuration)
 
const NucMeshConfGetConfiguration () const
 
vtkTypeMacro(NucMeshSrv, srvBase) protected int FillOutputPortInformation (int port, vtkInformation *info) override
 
 NucMeshSrv ()
 
vtkAbstractTypeMacro(srvBase, vtkAlgorithm) public NEM::MSH::geoMeshBaseGetOutput ()
 Get the output GeoMeshBase for a port on this algorithm. More...
 
NEM::MSH::geoMeshBaseGetOutput (int)
 

Static Public Member Functions

static NucMeshSrvNew ()
 

Public Attributes

NucMeshConf conf_
 

Protected Member Functions

virtual int RequestInformation (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 
virtual int RequestDataObject (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 This is called by the superclass. More...
 
virtual int RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)=0
 This is called by the superclass. More...
 
virtual int RequestUpdateExtent (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
 This is called by the superclass. More...
 

Inherits NEM::SRV::srvBase.

Constructor & Destructor Documentation

◆ NucMeshSrv()

NEM::SRV::NucMeshSrv::NucMeshSrv ( )

Member Function Documentation

◆ FillOutputPortInformation()

int NEM::SRV::NucMeshSrv::FillOutputPortInformation ( int  port,
vtkInformation *  info 
)
override

Definition at line 64 of file NucMeshSrv.C.

References NEM::NUCMESH::NucMeshGeo::computeMesh(), conf_, NEM::MSH::containerWrapper(), NEM::SRV::NucMeshConf::extrudeSteps, NEM::SRV::NucMeshConf::generator, NEM::SRV::NucMeshConf::geometryAndMesh, NEM::NUCMESH::ShapeBase::mergeGeo(), mesh, NEM::SRV::srvBase::RequestData(), and NEM::MSH::smeshGeoMesh::setSMeshMesh().

64  {
65  if (port == 0) {
66  info->Set(vtkDataObject::DATA_TYPE_NAME(), "smeshGeoMesh");
67  return 1;
68  } else {
69  return 0;
70  }
71 }

◆ GetConfiguration()

const NucMeshConf & NEM::SRV::NucMeshSrv::GetConfiguration ( ) const

Definition at line 62 of file NucMeshSrv.C.

References conf_.

62 { return conf_; }
NucMeshConf conf_
Definition: NucMeshSrv.H:104

◆ GetOutput() [1/2]

NEM::MSH::geoMeshBase * NEM::SRV::srvBase::GetOutput ( )
inherited

Definition at line 104 of file srvBase.C.

104 { return this->GetOutput(0); }
vtkAbstractTypeMacro(srvBase, vtkAlgorithm) public NEM::MSH::geoMeshBase * GetOutput()
Get the output GeoMeshBase for a port on this algorithm.
Definition: srvBase.C:104

◆ GetOutput() [2/2]

NEM::MSH::geoMeshBase * NEM::SRV::srvBase::GetOutput ( int  port)
inherited

Definition at line 106 of file srvBase.C.

106  {
107  return NEM::MSH::geoMeshBase::SafeDownCast(this->GetOutputDataObject(port));
108 }

◆ New()

static NucMeshSrv* NEM::SRV::NucMeshSrv::New ( )
static

◆ RequestData()

virtual int NEM::SRV::srvBase::RequestData ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
protectedpure virtualinherited

This is the method you should override.

Implemented in NEM::SRV::omegahRefineSrv.

Referenced by FillOutputPortInformation(), and NEM::SRV::srvBase::~srvBase().

◆ RequestDataObject()

int NEM::SRV::srvBase::RequestDataObject ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
protectedvirtualinherited

Definition at line 110 of file srvBase.C.

References NEM::MSH::gmshGeoMesh::New(), NEM::MSH::vtkGeoMesh::New(), NEM::MSH::smeshGeoMesh::New(), NEM::MSH::foamGeoMesh::New(), NEM::MSH::exoGeoMesh::New(), NEM::MSH::inpGeoMesh::New(), and NEM::MSH::oshGeoMesh::New().

Referenced by NEM::SRV::srvBase::~srvBase().

112  {
113  for (int i = 0; i < outputVector->GetNumberOfInformationObjects(); ++i) {
114  auto outInfo = outputVector->GetInformationObject(i);
115  auto outAlgInfo = this->GetOutputPortInformation(i);
116  if (!outAlgInfo->Has(vtkDataObject::DATA_TYPE_NAME())) {
117  return 0;
118  }
119  std::string typeName = outAlgInfo->Get(vtkDataObject::DATA_TYPE_NAME());
120  MSH::geoMeshBase *output = nullptr;
121  if (typeName == "vtkGeoMesh") {
122  output = MSH::vtkGeoMesh::New();
123  } else if (typeName == "gmshGeoMesh") {
124 #ifdef HAVE_GMSH
125  output = MSH::gmshGeoMesh::New();
126 #endif
127  } else if (typeName == "oshGeoMesh") {
128  output = MSH::oshGeoMesh::New();
129  } else if (typeName == "exoGeoMesh") {
130  output = MSH::exoGeoMesh::New();
131  } else if (typeName == "inpGeoMesh") {
132  output = MSH::inpGeoMesh::New();
133  } else if (typeName == "foamGeoMesh") {
134 #ifdef HAVE_CFMSH
135  output = MSH::foamGeoMesh::New();
136 #endif
137  } else if (typeName == "smeshGeoMesh") {
138 #ifdef HAVE_OCC
139  output = MSH::smeshGeoMesh::New();
140 #endif
141  } else if (typeName == "geoMeshBase") {
142  if (i < this->GetNumberOfInputPorts() &&
143  inputVector[i]->GetNumberOfInformationObjects() > 0) {
144  auto inObj = inputVector[i]
145  ->GetInformationObject(0)
146  ->Get(vtkDataObject::DATA_OBJECT());
147  if (inObj) {
148  output = MSH::geoMeshBase::SafeDownCast(inObj->NewInstance());
149  }
150  }
151  }
152  if (!output) {
153  return 0;
154  }
155  outInfo->Set(vtkDataObject::DATA_OBJECT(), output);
156  output->FastDelete();
157  this->GetOutputPortInformation(i)->Set(
158  vtkDataObject::DATA_EXTENT_TYPE(), output->GetExtentType());
159  }
160  return 1;
161 }
static smeshGeoMesh * New()
static inpGeoMesh * New()
static exoGeoMesh * New()
static foamGeoMesh * New()
static vtkGeoMesh * New()
static oshGeoMesh * New()
static gmshGeoMesh * New()

◆ RequestInformation()

int NEM::SRV::srvBase::RequestInformation ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
protectedvirtualinherited

Definition at line 97 of file srvBase.C.

Referenced by NEM::SRV::srvBase::~srvBase().

99  {
100  // do nothing let subclasses handle it
101  return 1;
102 }

◆ RequestUpdateExtent()

int NEM::SRV::srvBase::RequestUpdateExtent ( vtkInformation *  request,
vtkInformationVector **  inputVector,
vtkInformationVector *  outputVector 
)
protectedvirtualinherited

Definition at line 163 of file srvBase.C.

Referenced by NEM::SRV::srvBase::~srvBase().

165  {
166  int numInputPorts = this->GetNumberOfInputPorts();
167  for (int i = 0; i < numInputPorts; i++) {
168  int numInputConnections = this->GetNumberOfInputConnections(i);
169  for (int j = 0; j < numInputConnections; j++) {
170  vtkInformation *inputInfo = inputVector[i]->GetInformationObject(j);
171  inputInfo->Set(vtkStreamingDemandDrivenPipeline::EXACT_EXTENT(), 1);
172  }
173  }
174  return 1;
175 }

◆ SetConfiguration()

void NEM::SRV::NucMeshSrv::SetConfiguration ( const NucMeshConf configuration)

Definition at line 57 of file NucMeshSrv.C.

References conf_.

57  {
58  conf_ = configuration;
59  this->Modified();
60 }
NucMeshConf conf_
Definition: NucMeshSrv.H:104

Member Data Documentation

◆ conf_

NucMeshConf NEM::SRV::NucMeshSrv::conf_

Definition at line 104 of file NucMeshSrv.H.

Referenced by FillOutputPortInformation(), GetConfiguration(), and SetConfiguration().


The documentation for this class was generated from the following files: