Version: 6.3.1
Public Member Functions | Data Fields | Protected Member Functions

SMESH_MEDSupport_i Class Reference

#include <SMESH_MEDSupport_i.hxx>

Inheritance diagram for SMESH_MEDSupport_i:
Inheritance graph
[legend]

Public Member Functions

 SMESH_MEDSupport_i (SMESH_subMesh_i *sm, std::string name, std::string description, SALOME_MED::medEntityMesh entity)
 Constructor.
 SMESH_MEDSupport_i (const SMESH_MEDSupport_i &s)
 Constructor.
char * getName () throw (SALOME::SALOME_Exception)
 CORBA: Accessor for Name.
char * getDescription () throw (SALOME::SALOME_Exception)
 CORBA: Accessor for Description.
SALOME_MED::GMESH_ptr getMesh () throw (SALOME::SALOME_Exception)
 CORBA: Accessor for Mesh.
CORBA::Boolean isOnAllElements () throw (SALOME::SALOME_Exception)
 CORBA: boolean indicating if support concerns all elements.
SALOME_MED::medEntityMesh getEntity () throw (SALOME::SALOME_Exception)
 CORBA: Accessor for type of support's entity.
CORBA::Long getNumberOfElements (SALOME_MED::medGeometryElement geomElement) throw (SALOME::SALOME_Exception)
 CORBA: Number of different types of geometry elements existing in the support.
CORBA::Long getNumberOfTypes () throw (SALOME::SALOME_Exception)
 Gives the number of types of elements included in the support.
SALOME_TYPES::ListOfLong * getNumber (SALOME_MED::medGeometryElement geomElement) throw (SALOME::SALOME_Exception)
 CORBA: get Nodes.
SALOME_TYPES::ListOfLong * getNumberFromFile (SALOME_MED::medGeometryElement geomElement) throw (SALOME::SALOME_Exception)
 Same function as getNumber.
SALOME_TYPES::ListOfLong * getNumberIndex () throw (SALOME::SALOME_Exception)
 CORBA: Global Nodes Index (optionnaly designed by the user) CORBA: ??????????????????????????????
CORBA::Long getNumberOfGaussPoint (SALOME_MED::medGeometryElement geomElement) throw (SALOME::SALOME_Exception)
 CORBA: Array containing indexes for elements included in the support.
SALOME_TYPES::ListOfLong * getNumbersOfGaussPoint () throw (SALOME::SALOME_Exception)
 Gives CORBA: Array containing the numbers of Gauss point of elements included in the support.
SALOME_MED::medGeometryElement_array * getTypes () throw (SALOME::SALOME_Exception)
 CORBA: Accessor for types of geometry elements.
void getBoundaryElements () throw (SALOME::SALOME_Exception)
 build the object which will contain all the boundary elements of the mesh.
CORBA::Long getCorbaIndex () throw (SALOME::SALOME_Exception)
 CORBA: Accessor for Corba Index.
SALOME_MED::SUPPORT::supportInfos * getSupportGlobal () throw (SALOME::SALOME_Exception)
 Gives information on the support.
void createSeq () throw (SALOME::SALOME_Exception)

Data Fields

const SMESHDS_SubMesh_subMeshDS
::SMESH_subMesh_i_subMesh_i
SMESHDS_Mesh_meshDS
std::string _name
std::string _description
bool _isOnAllElements
bool _seqNumber
int _seqLength
SALOME_MED::medEntityMesh _entity
SALOME_MED::medGeometryElement * _geometricType
int _numberOfGeometricType

Protected Member Functions

 SMESH_MEDSupport_i ()
 Default constructor.
 ~SMESH_MEDSupport_i ()
 Destructor.

Detailed Description

Definition at line 45 of file SMESH_MEDSupport_i.hxx.


Constructor & Destructor Documentation

SMESH_MEDSupport_i::SMESH_MEDSupport_i ( SMESH_subMesh_i sm,
std::string  name,
std::string  description,
SALOME_MED::medEntityMesh  entity 
)

Constructor.

Definition at line 58 of file SMESH_MEDSupport_i.cxx.

References _entity, _geometricType, SMESH_Mesh_i._mapSubMesh, SMESH_subMesh_i._mesh_i, _meshDS, _numberOfGeometricType, _subMesh_i, _subMeshDS, SMESH_subMesh_i.GetId(), SMESH_Mesh_i.GetImpl(), and MESSAGE.

        :_subMesh_i(sm), _name(name), _description(description), _entity(entity),
        _seqNumber(false), _seqLength(0)
{
        BEGIN_OF("Constructor SMESH_MEDSupport_i");

        _meshDS = _subMesh_i->_mesh_i->GetImpl().GetMeshDS();

        int subMeshId = _subMesh_i->GetId();

        MESSAGE(" subMeshId " << subMeshId)

        if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) !=
                _subMesh_i->_mesh_i->_mapSubMesh.end())
        {
                ::SMESH_subMesh * subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId];
                _subMeshDS = subMesh->GetSubMeshDS();
        }

        if (_entity == SALOME_MED::MED_NODE)
        {
                _numberOfGeometricType = 1;
                _geometricType = new SALOME_MED::medGeometryElement[1];
                _geometricType[0] = SALOME_MED::MED_NONE;
        }
        else
        {
                MESSAGE("Pas implemente dans cette version");
                THROW_SALOME_CORBA_EXCEPTION
                        ("Seules les familles de noeuds sont implementees ",
                        SALOME::BAD_PARAM);
        }

        END_OF("Constructor SMESH_MEDSupport_i");
}
SMESH_MEDSupport_i::SMESH_MEDSupport_i ( const SMESH_MEDSupport_i s)

Constructor.

Definition at line 101 of file SMESH_MEDSupport_i.cxx.

References SMESH_Mesh_i._mapSubMesh, SMESH_subMesh_i._mesh_i, _meshDS, _subMesh_i, _subMeshDS, SMESH_subMesh_i.GetId(), and SMESH_Mesh_i.GetImpl().

                                                :_subMesh_i(s._subMesh_i),
_name(s._name), _description(s._description), _entity(s._entity),
_seqNumber(false), _seqLength(0)
{
        BEGIN_OF("Constructor SMESH_MEDSupport_i");

        _meshDS = _subMesh_i->_mesh_i->GetImpl().GetMeshDS();

        int subMeshId = _subMesh_i->GetId();
        if (_subMesh_i->_mesh_i->_mapSubMesh.find(subMeshId) !=
                _subMesh_i->_mesh_i->_mapSubMesh.end())
        {
                ::SMESH_subMesh * subMesh = _subMesh_i->_mesh_i->_mapSubMesh[subMeshId];
                _subMeshDS = subMesh->GetSubMeshDS();
        }

        END_OF("Constructor SMESH_MEDSupport_i");
}
SMESH_MEDSupport_i::SMESH_MEDSupport_i ( ) [protected]

Default constructor.

Definition at line 47 of file SMESH_MEDSupport_i.cxx.

{
        BEGIN_OF("Default Constructor SMESH_MEDSupport_i");
        END_OF("Default Constructor SMESH_MEDSupport_i");
}
SMESH_MEDSupport_i::~SMESH_MEDSupport_i ( ) [protected]

Destructor.

Definition at line 126 of file SMESH_MEDSupport_i.cxx.

{
}

Member Function Documentation

void SMESH_MEDSupport_i.createSeq ( ) throw (SALOME::SALOME_Exception)
void SMESH_MEDSupport_i::getBoundaryElements ( ) throw (SALOME::SALOME_Exception)

build the object which will contain all the boundary elements of the mesh.

Definition at line 397 of file SMESH_MEDSupport_i.cxx.

References MESSAGE.

{
  MESSAGE("!!! NOT YET IMPLEMENTED !!!!");
  THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
}
CORBA::Long SMESH_MEDSupport_i::getCorbaIndex ( ) throw (SALOME::SALOME_Exception)

CORBA: Accessor for Corba Index.

Definition at line 136 of file SMESH_MEDSupport_i.cxx.

References _subMeshDS, and MESSAGE.

{
        if (_subMeshDS == NULL)
                THROW_SALOME_CORBA_EXCEPTION("No associated Support",
                        SALOME::INTERNAL_ERROR);
        MESSAGE("Not implemented for SMESH_i");
        THROW_SALOME_CORBA_EXCEPTION("Not Implemented ", SALOME::BAD_PARAM);

}
char * SMESH_MEDSupport_i::getDescription ( ) throw (SALOME::SALOME_Exception)

CORBA: Accessor for Description.

Definition at line 167 of file SMESH_MEDSupport_i.cxx.

References _description, and _subMeshDS.

{
        if (_subMeshDS==NULL)
                THROW_SALOME_CORBA_EXCEPTION("No associated Support",
                        SALOME::INTERNAL_ERROR);
        return CORBA::string_dup(_description.c_str());
}
SALOME_MED::medEntityMesh SMESH_MEDSupport_i::getEntity ( ) throw (SALOME::SALOME_Exception)

CORBA: Accessor for type of support's entity.

Definition at line 236 of file SMESH_MEDSupport_i.cxx.

References _entity, and _subMeshDS.

{
        if (_subMeshDS==NULL)
                THROW_SALOME_CORBA_EXCEPTION("No associated Support",
                        SALOME::INTERNAL_ERROR);
        return _entity;
}
SALOME_MED::GMESH_ptr SMESH_MEDSupport_i::getMesh ( ) throw (SALOME::SALOME_Exception)

CORBA: Accessor for Mesh.

Definition at line 181 of file SMESH_MEDSupport_i.cxx.

References SMESH_subMesh_i._mesh_i, _subMesh_i, _subMeshDS, and SMESH_Mesh_i.GetMEDMesh().

{
        if (_subMeshDS==NULL)
                THROW_SALOME_CORBA_EXCEPTION("No associated Support",
                        SALOME::INTERNAL_ERROR);

        return _subMesh_i->_mesh_i->GetMEDMesh();
}
char * SMESH_MEDSupport_i::getName ( ) throw (SALOME::SALOME_Exception)

CORBA: Accessor for Name.

Definition at line 152 of file SMESH_MEDSupport_i.cxx.

References _name, and _subMeshDS.

{
        if (_subMeshDS==NULL)
                THROW_SALOME_CORBA_EXCEPTION("No associated Support",
                        SALOME::INTERNAL_ERROR);
        return CORBA::string_dup(_name.c_str());

}
SALOME_TYPES::ListOfLong * SMESH_MEDSupport_i::getNumber ( SALOME_MED::medGeometryElement  geomElement) throw (SALOME::SALOME_Exception)

CORBA: get Nodes.

Definition at line 299 of file SMESH_MEDSupport_i.cxx.

References MESSAGE.

{
  Unexpect aCatch(SALOME_SalomeException);
        if (_subMeshDS==NULL)
                THROW_SALOME_CORBA_EXCEPTION("No associated Support",
                        SALOME::INTERNAL_ERROR);

        // A changer s'il ne s agit plus seulement de famille de noeuds
        if (geomElement != SALOME_MED::MED_NONE)
                THROW_SALOME_CORBA_EXCEPTION("Not implemented", SALOME::BAD_PARAM);

        SALOME_TYPES::ListOfLong_var myseq = new SALOME_TYPES::ListOfLong;

        int i = 0;
        myseq->length(_subMeshDS->NbNodes());

        SMDS_NodeIteratorPtr it = _subMeshDS->GetNodes();
        while(it->more())
        {
                myseq[i] = it->next()->GetID();
                i++;
        };

        SCRUTE(myseq->length());
        MESSAGE("End of SMESH_MEDSupport_i::getNumber");
        return myseq._retn();

}
SALOME_TYPES::ListOfLong * SMESH_MEDSupport_i::getNumberFromFile ( SALOME_MED::medGeometryElement  geomElement) throw (SALOME::SALOME_Exception)

Same function as getNumber.

CORBA: get Nodes from file.

Definition at line 335 of file SMESH_MEDSupport_i.cxx.

{
  return getNumber(geomElement);
}
SALOME_TYPES::ListOfLong * SMESH_MEDSupport_i::getNumberIndex ( ) throw (SALOME::SALOME_Exception)

CORBA: Global Nodes Index (optionnaly designed by the user) CORBA: ??????????????????????????????

Definition at line 349 of file SMESH_MEDSupport_i.cxx.

References MESSAGE.

{
        MESSAGE("Not implemented for SMESH_i");
        THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
        return NULL;
}
CORBA::Long SMESH_MEDSupport_i::getNumberOfElements ( SALOME_MED::medGeometryElement  geomElement) throw (SALOME::SALOME_Exception)

CORBA: Number of different types of geometry elements existing in the support.

Definition at line 283 of file SMESH_MEDSupport_i.cxx.

{
        if (_subMeshDS==NULL)
                THROW_SALOME_CORBA_EXCEPTION("No associated Support",
                        SALOME::INTERNAL_ERROR);
        return _numberOfGeometricType;

}
CORBA::Long SMESH_MEDSupport_i::getNumberOfGaussPoint ( SALOME_MED::medGeometryElement  geomElement) throw (SALOME::SALOME_Exception)

CORBA: Array containing indexes for elements included in the support.

Definition at line 361 of file SMESH_MEDSupport_i.cxx.

References MESSAGE.

{
        MESSAGE("Not implemented for SMESH_i");
        return 0;
}
CORBA::Long SMESH_MEDSupport_i::getNumberOfTypes ( ) throw (SALOME::SALOME_Exception)

Gives the number of types of elements included in the support.

Definition at line 372 of file SMESH_MEDSupport_i.cxx.

References MESSAGE.

{
  MESSAGE("!!! NOT YET IMPLEMENTED !!!!");
  THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
  return 0;
}
SALOME_TYPES::ListOfLong * SMESH_MEDSupport_i::getNumbersOfGaussPoint ( ) throw (SALOME::SALOME_Exception)

Gives CORBA: Array containing the numbers of Gauss point of elements included in the support.

Definition at line 385 of file SMESH_MEDSupport_i.cxx.

References MESSAGE.

{
  MESSAGE("!!! NOT YET IMPLEMENTED !!!!");
  THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
  return NULL;
}
SALOME_MED::SUPPORT::supportInfos * SMESH_MEDSupport_i::getSupportGlobal ( ) throw (SALOME::SALOME_Exception)

Gives information on the support.

Definition at line 408 of file SMESH_MEDSupport_i.cxx.

References MESSAGE.

{
  MESSAGE("!!! NOT YET IMPLEMENTED !!!!");
  THROW_SALOME_CORBA_EXCEPTION("Not Implemented", SALOME::BAD_PARAM);
  return NULL;
}
SALOME_MED::medGeometryElement_array * SMESH_MEDSupport_i::getTypes ( ) throw (SALOME::SALOME_Exception)

CORBA: Accessor for types of geometry elements.

Definition at line 252 of file SMESH_MEDSupport_i.cxx.

References _geometricType, _numberOfGeometricType, _subMeshDS, and MESSAGE.

{
        if (_subMeshDS==NULL)
                THROW_SALOME_CORBA_EXCEPTION("No associated Support",
                        SALOME::INTERNAL_ERROR);
        SALOME_MED::medGeometryElement_array_var myseq =
                new SALOME_MED::medGeometryElement_array;
        try
        {
                int mySeqLength = _numberOfGeometricType;
                myseq->length(mySeqLength);
                for (int i = 0; i < mySeqLength; i++)
                {
                        myseq[i] = _geometricType[i];
                }
        }
        catch(...)
        {
                MESSAGE("Exception lors de la recherche des differents types");
                THROW_SALOME_CORBA_EXCEPTION("Unable to acces Support Types",
                        SALOME::INTERNAL_ERROR);
        }
        return myseq._retn();
}
CORBA::Boolean SMESH_MEDSupport_i::isOnAllElements ( ) throw (SALOME::SALOME_Exception)

CORBA: boolean indicating if support concerns all elements.

Definition at line 197 of file SMESH_MEDSupport_i.cxx.

References _entity, _isOnAllElements, _meshDS, _seqLength, _seqNumber, _subMeshDS, MESSAGE, SMDS_Mesh.NbNodes(), and SMESHDS_SubMesh.NbNodes().

{
        if (_subMeshDS==NULL)
                THROW_SALOME_CORBA_EXCEPTION("No associated Support",
                        SALOME::INTERNAL_ERROR);
        if (_seqNumber == false)
        {
                if (_entity != SALOME_MED::MED_NONE)
                {
                        _seqLength = _subMeshDS->NbNodes();
                        _seqNumber = true;
                }
                else
                {
                        MESSAGE("Only Node Families are implemented ");
                        THROW_SALOME_CORBA_EXCEPTION("Not implemented Yet ",
                                SALOME::BAD_PARAM);
                }
        }
        try
        {
                _isOnAllElements = (_seqLength == _meshDS->NbNodes());
        }
        catch(...)
        {
                MESSAGE("unable to acces related Mesh");
                THROW_SALOME_CORBA_EXCEPTION("No associated Mesh",
                        SALOME::INTERNAL_ERROR);
        };
        return _isOnAllElements;
}

Field Documentation

Definition at line 106 of file SMESH_MEDSupport_i.hxx.

Referenced by getDescription().

SALOME_MED::medEntityMesh SMESH_MEDSupport_i._entity

Definition at line 111 of file SMESH_MEDSupport_i.hxx.

Referenced by getEntity(), isOnAllElements(), and SMESH_MEDSupport_i().

SALOME_MED::medGeometryElement* SMESH_MEDSupport_i._geometricType

Definition at line 112 of file SMESH_MEDSupport_i.hxx.

Referenced by getTypes(), and SMESH_MEDSupport_i().

Definition at line 107 of file SMESH_MEDSupport_i.hxx.

Referenced by isOnAllElements().

Definition at line 104 of file SMESH_MEDSupport_i.hxx.

Referenced by isOnAllElements(), and SMESH_MEDSupport_i().

Definition at line 105 of file SMESH_MEDSupport_i.hxx.

Referenced by getName().

Definition at line 113 of file SMESH_MEDSupport_i.hxx.

Referenced by getTypes(), and SMESH_MEDSupport_i().

Definition at line 109 of file SMESH_MEDSupport_i.hxx.

Referenced by isOnAllElements().

Definition at line 108 of file SMESH_MEDSupport_i.hxx.

Referenced by isOnAllElements().

Reimplemented in SMESH_MEDFamily_i.

Definition at line 102 of file SMESH_MEDSupport_i.hxx.

Referenced by getMesh(), and SMESH_MEDSupport_i().

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS