Version: 8.3.0
StdMeshers_ImportSource1D Class Reference

Stores groups to import elements from. More...

#include <StdMeshers_ImportSource.hxx>

Inheritance diagram for StdMeshers_ImportSource1D:

Public Types

enum  Hypothesis_Status {
  HYP_OK = 0, HYP_MISSING, HYP_CONCURENT, HYP_BAD_PARAMETER,
  HYP_HIDDEN_ALGO, HYP_HIDING_ALGO, HYP_UNKNOWN_FATAL, HYP_INCOMPATIBLE,
  HYP_NOTCONFORM, HYP_ALREADY_EXIST, HYP_BAD_DIM, HYP_BAD_SUBSHAPE,
  HYP_BAD_GEOMETRY, HYP_NEED_SHAPE, HYP_INCOMPAT_HYPS
}
 
enum  hypothesis_type {
  PARAM_ALGO, ALGO_0D, ALGO_1D, ALGO_2D,
  ALGO_3D
}
 

Public Member Functions

 StdMeshers_ImportSource1D (int hypId, int studyId, SMESH_Gen *gen)
 Creates StdMeshers_ImportSource1D. More...
 
virtual ~StdMeshers_ImportSource1D ()
 
void SetGroups (const std::vector< SMESH_Group * > &groups)
 Sets groups to import elements from. More...
 
const std::vector< SMESH_Group * > & GetGroups (bool loaded=false) const
 Returns groups to import elements from. More...
 
void SetCopySourceMesh (bool toCopyMesh, bool toCopyGroups)
 
void GetCopySourceMesh (bool &toCopyMesh, bool &toCopyGroups) const
 
virtual std::ostream & SaveTo (std::ostream &save)
 Save _toCopyMesh and _toCopyGroups to a stream. More...
 
virtual std::istream & LoadFrom (std::istream &load)
 Load _toCopyMesh and _toCopyGroups from a stream. More...
 
virtual bool SetParametersByMesh (const SMESH_Mesh *theMesh, const TopoDS_Shape &theShape)
 Initialize ImportSource value by the mesh built on the geometry. More...
 
virtual bool SetParametersByDefaults (const TDefaults &dflts, const SMESH_Mesh *theMesh=0)
 Initialize my parameter values by default parameters. More...
 
virtual bool DataDependOnParams () const
 The returned value is used by NotifySubMeshesHypothesisModification() to decide to call subMesh->AlgoStateEngine( MODIF_HYP, hyp ) or not if subMesh is ready to be computed (algo+hyp==OK) but not yet computed. More...
 
void RestoreGroups (const std::vector< SMESH_Group * > &groups)
 Restore source groups and result groups by _resultGroupsStorage. More...
 
void StoreResultGroups (const std::vector< SMESH_Group * > &groups, const SMESHDS_Mesh &srcMesh, const SMESHDS_Mesh &tgtMesh)
 Remember groups imported from other mesh. More...
 
std::vector< SMESH_Group * > * GetResultGroups (const SMESHDS_Mesh &srcMesh, const SMESHDS_Mesh &tgtMesh)
 Return groups imported from other mesh. More...
 
std::vector< SMESH_Mesh * > GetSourceMeshes () const
 Return source meshes. More...
 
std::vector< SMESH_subMesh * > GetSourceSubMeshes (const SMESH_Mesh *srcMesh) const
 Return submeshes whose events affect the target mesh. More...
 
virtual int GetDim () const
 
int GetStudyId () const
 
SMESH_GenGetGen () const
 
virtual int GetShapeType () const
 
virtual const char * GetLibName () const
 
virtual void NotifySubMeshesHypothesisModification ()
 
void SetLibName (const char *theLibName)
 
virtual bool IsAuxiliary () const
 Return true if me is an auxiliary hypothesis. More...
 
SMESH_MeshGetMeshByPersistentID (int id)
 Find a mesh with given persistent ID. More...
 
const char * GetName () const
 
int GetID () const
 
int GetType () const
 
bool IsSameName (const SMESHDS_Hypothesis &other) const
 Compare types of hypotheses. More...
 
virtual bool operator== (const SMESHDS_Hypothesis &other) const
 Equality. More...
 
bool operator!= (const SMESHDS_Hypothesis &other) const
 

Static Public Member Functions

static bool IsStatusFatal (Hypothesis_Status theStatus)
 

Protected Attributes

SMESH_Gen_gen
 
int _studyId
 
int _shapeType
 
int _param_algo_dim
 
std::string _name
 
int _hypId
 
hypothesis_type _type
 

Private Types

typedef std::map< std::pair
< int, int >, std::vector
< SMESH_Group * > > 
TResGroupMap
 

Private Member Functions

void resultGroupsToIntVec ()
 Convert result groups into _resultGroupsStorage. More...
 

Private Attributes

std::vector< SMESH_Group * > _groups
 
bool _toCopyMesh
 
bool _toCopyGroups
 
TResGroupMap _resultGroups
 
std::vector< int_resultGroupsStorage
 

Detailed Description

Stores groups to import elements from.

Member Typedef Documentation

typedef std::map< std::pair<int, int>, std::vector<SMESH_Group*> > StdMeshers_ImportSource1D::TResGroupMap
private

Member Enumeration Documentation

Enumerator
HYP_OK 
HYP_MISSING 
HYP_CONCURENT 
HYP_BAD_PARAMETER 
HYP_HIDDEN_ALGO 
HYP_HIDING_ALGO 
HYP_UNKNOWN_FATAL 
HYP_INCOMPATIBLE 
HYP_NOTCONFORM 
HYP_ALREADY_EXIST 
HYP_BAD_DIM 
HYP_BAD_SUBSHAPE 
HYP_BAD_GEOMETRY 
HYP_NEED_SHAPE 
HYP_INCOMPAT_HYPS 
Enumerator
PARAM_ALGO 
ALGO_0D 
ALGO_1D 
ALGO_2D 
ALGO_3D 

Constructor & Destructor Documentation

StdMeshers_ImportSource1D::StdMeshers_ImportSource1D ( int  hypId,
int  studyId,
SMESH_Gen gen 
)
StdMeshers_ImportSource1D::~StdMeshers_ImportSource1D ( )
virtual

Member Function Documentation

virtual bool StdMeshers_ImportSource1D::DataDependOnParams ( ) const
virtual

The returned value is used by NotifySubMeshesHypothesisModification() to decide to call subMesh->AlgoStateEngine( MODIF_HYP, hyp ) or not if subMesh is ready to be computed (algo+hyp==OK) but not yet computed.

True result is reasonable for example if EventListeners depend on parameters of hypothesis.

Reimplemented from SMESH_Hypothesis.

void StdMeshers_ImportSource1D::GetCopySourceMesh ( bool toCopyMesh,
bool toCopyGroups 
) const
int SMESH_Hypothesis::GetDim ( ) const
virtualinherited
SMESH_Gen* SMESH_Hypothesis::GetGen ( ) const
inherited
const std::vector< SMESH_Group * > & StdMeshers_ImportSource1D::GetGroups ( bool  loaded = false) const

Returns groups to import elements from.

Parameters
[in]loaded- if true, meshes holding the groups are loaded
int SMESHDS_Hypothesis::GetID ( ) const
inherited
virtual const char* SMESH_Hypothesis::GetLibName ( ) const
virtualinherited
SMESH_Mesh * SMESH_Hypothesis::GetMeshByPersistentID ( int  id)
inherited

Find a mesh with given persistent ID.

References studyContextStruct::mapMesh.

std::vector< SMESH_Group * > * StdMeshers_ImportSource1D::GetResultGroups ( const SMESHDS_Mesh srcMesh,
const SMESHDS_Mesh tgtMesh 
)

Return groups imported from other mesh.

Parameters
srcMesh- source mesh
tgtMesh- destination mesh
Return values
conststd::vector<SMESH_Group*>& - groups
int SMESH_Hypothesis::GetShapeType ( ) const
virtualinherited
std::vector< SMESH_Mesh * > StdMeshers_ImportSource1D::GetSourceMeshes ( ) const
std::vector< SMESH_subMesh * > StdMeshers_ImportSource1D::GetSourceSubMeshes ( const SMESH_Mesh srcMesh) const

Return submeshes whose events affect the target mesh.

References SMESHDS_GroupBase::GetElements(), SMESHDS_GroupBase::GetMesh(), and SMESHDS_Mesh::ShapeToIndex().

int SMESH_Hypothesis::GetStudyId ( ) const
inherited
int SMESHDS_Hypothesis::GetType ( ) const
inherited
virtual bool SMESH_Hypothesis::IsAuxiliary ( ) const
virtualinherited

Return true if me is an auxiliary hypothesis.

Return values
bool- auxiliary or not

An auxiliary hypothesis is optional, i.e. an algorithm can work without it and another hypothesis of the same dimension can be assigned to the shape

References SMESHDS_Hypothesis::GetType().

bool SMESHDS_Hypothesis::IsSameName ( const SMESHDS_Hypothesis other) const
inherited

Compare types of hypotheses.

References SMESHDS_Hypothesis::_name.

Referenced by StdMeshers_Regular_1D::CheckHypothesis().

istream & StdMeshers_ImportSource1D::LoadFrom ( std::istream &  load)
virtual

Load _toCopyMesh and _toCopyGroups from a stream.

Implements SMESHDS_Hypothesis.

void SMESH_Hypothesis::NotifySubMeshesHypothesisModification ( )
virtualinherited
bool SMESHDS_Hypothesis::operator!= ( const SMESHDS_Hypothesis other) const
inherited
bool SMESHDS_Hypothesis::operator== ( const SMESHDS_Hypothesis other) const
virtualinherited

Equality.

References SMESHDS_Hypothesis::_name.

void StdMeshers_ImportSource1D::RestoreGroups ( const std::vector< SMESH_Group * > &  groups)

Restore source groups and result groups by _resultGroupsStorage.

void StdMeshers_ImportSource1D::resultGroupsToIntVec ( )
private

Convert result groups into _resultGroupsStorage.

ostream & StdMeshers_ImportSource1D::SaveTo ( std::ostream &  save)
virtual

Save _toCopyMesh and _toCopyGroups to a stream.

Implements SMESHDS_Hypothesis.

void StdMeshers_ImportSource1D::SetCopySourceMesh ( bool  toCopyMesh,
bool  toCopyGroups 
)
void StdMeshers_ImportSource1D::SetGroups ( const std::vector< SMESH_Group * > &  groups)

Sets groups to import elements from.

void SMESH_Hypothesis::SetLibName ( const char *  theLibName)
inherited
bool StdMeshers_ImportSource1D::SetParametersByDefaults ( const TDefaults dflts,
const SMESH_Mesh theMesh = 0 
)
virtual

Initialize my parameter values by default parameters.

Return values
bool- true if parameter values have been successfully defined

Implements SMESH_Hypothesis.

bool StdMeshers_ImportSource1D::SetParametersByMesh ( const SMESH_Mesh theMesh,
const TopoDS_Shape &  theShape 
)
virtual

Initialize ImportSource value by the mesh built on the geometry.

Parameters
theMesh- the built mesh
theShape- the geometry of interest
Return values
bool- true if parameter values have been successfully defined

Implements SMESH_Hypothesis.

void StdMeshers_ImportSource1D::StoreResultGroups ( const std::vector< SMESH_Group * > &  groups,
const SMESHDS_Mesh srcMesh,
const SMESHDS_Mesh tgtMesh 
)

Remember groups imported from other mesh.

Parameters
groups- result groups
srcMesh- source mesh
tgtMesh- destination mesh

Field Documentation

SMESH_Gen* SMESH_Hypothesis::_gen
protectedinherited
std::vector<SMESH_Group*> StdMeshers_ImportSource1D::_groups
private
int SMESHDS_Hypothesis::_hypId
protectedinherited
std::string SMESHDS_Hypothesis::_name
protectedinherited

Referenced by SMESHDS_Hypothesis::IsSameName(), SMESHDS_Hypothesis::operator==(), StdMeshers_Adaptive1D::StdMeshers_Adaptive1D(), StdMeshers_Arithmetic1D::StdMeshers_Arithmetic1D(), StdMeshers_AutomaticLength::StdMeshers_AutomaticLength(), StdMeshers_Cartesian_3D::StdMeshers_Cartesian_3D(), StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D(), StdMeshers_CompositeHexa_3D::StdMeshers_CompositeHexa_3D(), StdMeshers_CompositeSegment_1D::StdMeshers_CompositeSegment_1D(), StdMeshers_Deflection1D::StdMeshers_Deflection1D(), StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(), StdMeshers_Geometric1D::StdMeshers_Geometric1D(), StdMeshers_Hexa_3D::StdMeshers_Hexa_3D(), StdMeshers_HexaFromSkin_3D::StdMeshers_HexaFromSkin_3D(), StdMeshers_Import_1D::StdMeshers_Import_1D(), StdMeshers_Import_1D2D::StdMeshers_Import_1D2D(), StdMeshers_ImportSource1D(), StdMeshers_ImportSource2D::StdMeshers_ImportSource2D(), StdMeshers_LayerDistribution::StdMeshers_LayerDistribution(), StdMeshers_LayerDistribution2D::StdMeshers_LayerDistribution2D(), StdMeshers_LengthFromEdges::StdMeshers_LengthFromEdges(), StdMeshers_LocalLength::StdMeshers_LocalLength(), StdMeshers_MaxElementArea::StdMeshers_MaxElementArea(), StdMeshers_MaxElementVolume::StdMeshers_MaxElementVolume(), StdMeshers_MaxLength::StdMeshers_MaxLength(), StdMeshers_MEFISTO_2D::StdMeshers_MEFISTO_2D(), StdMeshers_NotConformAllowed::StdMeshers_NotConformAllowed(), StdMeshers_NumberOfLayers::StdMeshers_NumberOfLayers(), StdMeshers_NumberOfLayers2D::StdMeshers_NumberOfLayers2D(), StdMeshers_NumberOfSegments::StdMeshers_NumberOfSegments(), StdMeshers_PolygonPerFace_2D::StdMeshers_PolygonPerFace_2D(), StdMeshers_Prism_3D::StdMeshers_Prism_3D(), StdMeshers_Projection_1D::StdMeshers_Projection_1D(), StdMeshers_Projection_1D2D::StdMeshers_Projection_1D2D(), StdMeshers_Projection_2D::StdMeshers_Projection_2D(), StdMeshers_Projection_3D::StdMeshers_Projection_3D(), StdMeshers_ProjectionSource1D::StdMeshers_ProjectionSource1D(), StdMeshers_ProjectionSource2D::StdMeshers_ProjectionSource2D(), StdMeshers_ProjectionSource3D::StdMeshers_ProjectionSource3D(), StdMeshers_Propagation::StdMeshers_Propagation(), StdMeshers_PropagOfDistribution::StdMeshers_PropagOfDistribution(), StdMeshers_QuadFromMedialAxis_1D2D::StdMeshers_QuadFromMedialAxis_1D2D(), StdMeshers_Quadrangle_2D::StdMeshers_Quadrangle_2D(), StdMeshers_QuadrangleParams::StdMeshers_QuadrangleParams(), StdMeshers_QuadranglePreference::StdMeshers_QuadranglePreference(), StdMeshers_QuadraticMesh::StdMeshers_QuadraticMesh(), StdMeshers_RadialPrism_3D::StdMeshers_RadialPrism_3D(), StdMeshers_RadialQuadrangle_1D2D::StdMeshers_RadialQuadrangle_1D2D(), StdMeshers_Regular_1D::StdMeshers_Regular_1D(), StdMeshers_StartEndLength::StdMeshers_StartEndLength(), StdMeshers_ViscousLayers::StdMeshers_ViscousLayers(), and StdMeshers_ViscousLayers2D::StdMeshers_ViscousLayers2D().

int SMESH_Hypothesis::_param_algo_dim
protectedinherited

Referenced by SMESH_Hypothesis::SMESH_Hypothesis(), StdMeshers_Adaptive1D::StdMeshers_Adaptive1D(), StdMeshers_Arithmetic1D::StdMeshers_Arithmetic1D(), StdMeshers_AutomaticLength::StdMeshers_AutomaticLength(), StdMeshers_CartesianParameters3D::StdMeshers_CartesianParameters3D(), StdMeshers_Deflection1D::StdMeshers_Deflection1D(), StdMeshers_FixedPoints1D::StdMeshers_FixedPoints1D(), StdMeshers_ImportSource1D(), StdMeshers_ImportSource2D::StdMeshers_ImportSource2D(), StdMeshers_LayerDistribution::StdMeshers_LayerDistribution(), StdMeshers_LayerDistribution2D::StdMeshers_LayerDistribution2D(), StdMeshers_LengthFromEdges::StdMeshers_LengthFromEdges(), StdMeshers_LocalLength::StdMeshers_LocalLength(), StdMeshers_MaxElementArea::StdMeshers_MaxElementArea(), StdMeshers_MaxElementVolume::StdMeshers_MaxElementVolume(), StdMeshers_MaxLength::StdMeshers_MaxLength(), StdMeshers_NotConformAllowed::StdMeshers_NotConformAllowed(), StdMeshers_NumberOfLayers::StdMeshers_NumberOfLayers(), StdMeshers_NumberOfLayers2D::StdMeshers_NumberOfLayers2D(), StdMeshers_NumberOfSegments::StdMeshers_NumberOfSegments(), StdMeshers_ProjectionSource1D::StdMeshers_ProjectionSource1D(), StdMeshers_ProjectionSource2D::StdMeshers_ProjectionSource2D(), StdMeshers_ProjectionSource3D::StdMeshers_ProjectionSource3D(), StdMeshers_Propagation::StdMeshers_Propagation(), StdMeshers_QuadrangleParams::StdMeshers_QuadrangleParams(), StdMeshers_QuadranglePreference::StdMeshers_QuadranglePreference(), StdMeshers_QuadraticMesh::StdMeshers_QuadraticMesh(), StdMeshers_Reversible1D::StdMeshers_Reversible1D(), StdMeshers_StartEndLength::StdMeshers_StartEndLength(), StdMeshers_ViscousLayers::StdMeshers_ViscousLayers(), and StdMeshers_ViscousLayers2D::StdMeshers_ViscousLayers2D().

TResGroupMap StdMeshers_ImportSource1D::_resultGroups
private
std::vector<int> StdMeshers_ImportSource1D::_resultGroupsStorage
private
int SMESH_Hypothesis::_studyId
protectedinherited
bool StdMeshers_ImportSource1D::_toCopyGroups
private
bool StdMeshers_ImportSource1D::_toCopyMesh
private