]
filt = smesh.GetFilterFromCriteria( critaria )
filtGroup = mesh.GroupOnFilter( SMESH.FACE, "group on filter", filt )
-print "Group on filter contains %s elemens" % filtGroup.Size()
+print "Group on filter contains %s elements" % filtGroup.Size()
# group on filter is updated if the mesh is modified
hyp1D.SetStartLength( 2.5 )
hyp1D.SetEndLength( 2.5 )
mesh.Compute()
-print "After mesh change, group on filter contains %s elemens" % filtGroup.Size()
+print "After mesh change, group on filter contains %s elements" % filtGroup.Size()
# set a new filter defining the group
filt2 = smesh.GetFilter( SMESH.FACE, SMESH.FT_RangeOfIds, "1-50" )
filtGroup.SetFilter( filt2 )
-print "With a new filter, group on filter contains %s elemens" % filtGroup.Size()
+print "With a new filter, group on filter contains %s elements" % filtGroup.Size()
# group is updated at modification of the filter
filt2.SetCriteria( [ smesh.GetCriterion( SMESH.FACE, SMESH.FT_RangeOfIds, "1-70" )])
filtIDs3 = filtGroup.GetIDs()
-print "After filter modification, group on filter contains %s elemens" % filtGroup.Size()
+print "After filter modification, group on filter contains %s elements" % filtGroup.Size()
salome.sg.updateObjBrowser(True)
<b> Of course, <em>from smesh import *</em> is no more possible.</b>
-\n You have to explicitely write <em>smesh.some_method()</em>.
+\n You have to explicitly write <em>smesh.some_method()</em>.
<b>All algorithms have been transferred from the namespace <em>smesh</em> to the namespace <em>smeshBuilder</em>.</b>
\n For instance:
Compound1 = smesh.Concatenate([Mesh_inf.GetMesh(), Mesh_sup.GetMesh()], 0, 1, 1e-05)
\endcode
-<b>If you need to import a %SMESH Plugin explicitely, keep in mind that they are now located in separate namespaces.</b>
+<b>If you need to import a %SMESH Plugin explicitly, keep in mind that they are now located in separate namespaces.</b>
\n For instance:
\code
import StdMeshers
raises (SALOME::SALOME_Exception);
/*!
- * Remove an hypothesis previouly added with AddHypothesis.
+ * Remove an hypothesis previously added with AddHypothesis.
*/
Hypothesis_Status RemoveHypothesis(in GEOM::GEOM_Object aSubObject,
in SMESH_Hypothesis anHyp)
double GetComputeProgress();
/*!
- * Get informations about mesh contents
+ * Get information about mesh contents
*/
long NbNodes()
raises (SALOME::SALOME_Exception);
#include <BRepClass3d_SolidClassifier.hxx>
#include <BRepClass_FaceClassifier.hxx>
#include <BRep_Tool.hxx>
+#include <GeomLib_IsPlanarSurface.hxx>
#include <Geom_CylindricalSurface.hxx>
#include <Geom_Plane.hxx>
#include <Geom_Surface.hxx>
v2.Magnitude() < gp::Resolution() ? 0 : v1.Angle( v2 );
}
+ inline double getCos2( const gp_XYZ& P1, const gp_XYZ& P2, const gp_XYZ& P3 )
+ {
+ gp_Vec v1( P1 - P2 ), v2( P3 - P2 );
+ double dot = v1 * v2, len1 = v1.SquareMagnitude(), len2 = v2.SquareMagnitude();
+
+ return ( len1 < gp::Resolution() || len2 < gp::Resolution() ? -1 :
+ dot * dot / len1 / len2 );
+ }
+
inline double getArea( const gp_XYZ& P1, const gp_XYZ& P2, const gp_XYZ& P3 )
{
gp_Vec aVec1( P2 - P1 );
double MinimumAngle::GetValue( const TSequenceOfXYZ& P )
{
- double aMin;
-
- if (P.size() <3)
+ if ( P.size() < 3 )
return 0.;
- aMin = getAngle(P( P.size() ), P( 1 ), P( 2 ));
- aMin = Min(aMin,getAngle(P( P.size()-1 ), P( P.size() ), P( 1 )));
+ double aMaxCos2;
+
+ aMaxCos2 = getCos2( P( P.size() ), P( 1 ), P( 2 ));
+ aMaxCos2 = Max( aMaxCos2, getCos2( P( P.size()-1 ), P( P.size() ), P( 1 )));
for ( size_t i = 2; i < P.size(); i++ )
{
- double A0 = getAngle( P( i-1 ), P( i ), P( i+1 ) );
- aMin = Min(aMin,A0);
+ double A0 = getCos2( P( i-1 ), P( i ), P( i+1 ) );
+ aMaxCos2 = Max( aMaxCos2, A0 );
}
+ if ( aMaxCos2 <= 0 )
+ return 0; // all nodes coincide
- return aMin * 180.0 / M_PI;
+ double cos = sqrt( aMaxCos2 );
+ if ( cos >= 1 ) return 0;
+ return acos( cos ) * 180.0 / M_PI;
}
double MinimumAngle::GetBadRate( double Value, int nbNodes ) const
if ( nbNodes == 3 ) {
// Compute lengths of the sides
- std::vector< double > aLen (nbNodes);
- for ( int i = 0; i < nbNodes - 1; i++ )
- aLen[ i ] = getDistance( P( i + 1 ), P( i + 2 ) );
- aLen[ nbNodes - 1 ] = getDistance( P( 1 ), P( nbNodes ) );
+ double aLen1 = getDistance( P( 1 ), P( 2 ));
+ double aLen2 = getDistance( P( 2 ), P( 3 ));
+ double aLen3 = getDistance( P( 3 ), P( 1 ));
// Q = alfa * h * p / S, where
//
// alfa = sqrt( 3 ) / 6
// h - length of the longest edge
// p - half perimeter
// S - triangle surface
- const double alfa = sqrt( 3. ) / 6.;
- double maxLen = Max( aLen[ 0 ], Max( aLen[ 1 ], aLen[ 2 ] ) );
- double half_perimeter = ( aLen[0] + aLen[1] + aLen[2] ) / 2.;
- double anArea = getArea( P( 1 ), P( 2 ), P( 3 ) );
+ const double alfa = sqrt( 3. ) / 6.;
+ double maxLen = Max( aLen1, Max( aLen2, aLen3 ));
+ double half_perimeter = ( aLen1 + aLen2 + aLen3 ) / 2.;
+ double anArea = getArea( P( 1 ), P( 2 ), P( 3 ));
if ( anArea <= theEps )
return theInf;
return alfa * maxLen * half_perimeter / anArea;
}
else if ( nbNodes == 6 ) { // quadratic triangles
// Compute lengths of the sides
- std::vector< double > aLen (3);
- aLen[0] = getDistance( P(1), P(3) );
- aLen[1] = getDistance( P(3), P(5) );
- aLen[2] = getDistance( P(5), P(1) );
- // Q = alfa * h * p / S, where
- //
- // alfa = sqrt( 3 ) / 6
- // h - length of the longest edge
- // p - half perimeter
- // S - triangle surface
- const double alfa = sqrt( 3. ) / 6.;
- double maxLen = Max( aLen[ 0 ], Max( aLen[ 1 ], aLen[ 2 ] ) );
- double half_perimeter = ( aLen[0] + aLen[1] + aLen[2] ) / 2.;
- double anArea = getArea( P(1), P(3), P(5) );
+ double aLen1 = getDistance( P( 1 ), P( 3 ));
+ double aLen2 = getDistance( P( 3 ), P( 5 ));
+ double aLen3 = getDistance( P( 5 ), P( 1 ));
+ // algo same as for the linear triangle
+ const double alfa = sqrt( 3. ) / 6.;
+ double maxLen = Max( aLen1, Max( aLen2, aLen3 ));
+ double half_perimeter = ( aLen1 + aLen2 + aLen3 ) / 2.;
+ double anArea = getArea( P( 1 ), P( 3 ), P( 5 ));
if ( anArea <= theEps )
return theInf;
return alfa * maxLen * half_perimeter / anArea;
}
else if( nbNodes == 4 ) { // quadrangle
// Compute lengths of the sides
- std::vector< double > aLen (4);
+ double aLen[4];
aLen[0] = getDistance( P(1), P(2) );
aLen[1] = getDistance( P(2), P(3) );
aLen[2] = getDistance( P(3), P(4) );
aLen[3] = getDistance( P(4), P(1) );
// Compute lengths of the diagonals
- std::vector< double > aDia (2);
+ double aDia[2];
aDia[0] = getDistance( P(1), P(3) );
aDia[1] = getDistance( P(2), P(4) );
// Compute areas of all triangles which can be built
// taking three nodes of the quadrangle
- std::vector< double > anArea (4);
+ double anArea[4];
anArea[0] = getArea( P(1), P(2), P(3) );
anArea[1] = getArea( P(1), P(2), P(4) );
anArea[2] = getArea( P(1), P(3), P(4) );
// Si - areas of the triangles
const double alpha = sqrt( 1 / 32. );
double L = Max( aLen[ 0 ],
- Max( aLen[ 1 ],
- Max( aLen[ 2 ],
- Max( aLen[ 3 ],
- Max( aDia[ 0 ], aDia[ 1 ] ) ) ) ) );
+ Max( aLen[ 1 ],
+ Max( aLen[ 2 ],
+ Max( aLen[ 3 ],
+ Max( aDia[ 0 ], aDia[ 1 ] ) ) ) ) );
double C1 = sqrt( ( aLen[0] * aLen[0] +
aLen[1] * aLen[1] +
aLen[2] * aLen[2] +
aLen[3] * aLen[3] ) / 4. );
double C2 = Min( anArea[ 0 ],
- Min( anArea[ 1 ],
- Min( anArea[ 2 ], anArea[ 3 ] ) ) );
+ Min( anArea[ 1 ],
+ Min( anArea[ 2 ], anArea[ 3 ] ) ) );
if ( C2 <= theEps )
return theInf;
return alpha * L * C1 / C2;
}
else if( nbNodes == 8 || nbNodes == 9 ) { // nbNodes==8 - quadratic quadrangle
// Compute lengths of the sides
- std::vector< double > aLen (4);
+ double aLen[4];
aLen[0] = getDistance( P(1), P(3) );
aLen[1] = getDistance( P(3), P(5) );
aLen[2] = getDistance( P(5), P(7) );
aLen[3] = getDistance( P(7), P(1) );
// Compute lengths of the diagonals
- std::vector< double > aDia (2);
+ double aDia[2];
aDia[0] = getDistance( P(1), P(5) );
aDia[1] = getDistance( P(3), P(7) );
// Compute areas of all triangles which can be built
// taking three nodes of the quadrangle
- std::vector< double > anArea (4);
+ double anArea[4];
anArea[0] = getArea( P(1), P(3), P(5) );
anArea[1] = getArea( P(1), P(3), P(7) );
anArea[2] = getArea( P(1), P(5), P(7) );
if ( !S.IsNull() && S.ShapeType() == TopAbs_FACE )
{
mySurface = new ShapeAnalysis_Surface( BRep_Tool::Surface( TopoDS::Face( S )));
+
+ GeomLib_IsPlanarSurface isPlaneCheck( mySurface->Surface() );
+ if ( isPlaneCheck.IsPlanar() )
+ myPlane.reset( new gp_Pln( isPlaneCheck.Plan() ));
+ else
+ myPlane.reset();
}
}
// project gravity center to the surface
double maxLen = MaxElementLength2D().GetValue( P );
double tol = 1e-3 * maxLen;
- if ( uv.X() != 0 && uv.Y() != 0 ) // faster way
- mySurface->NextValueOfUV( uv, gc, tol, 0.5 * maxLen );
+ double dist;
+ if ( myPlane )
+ {
+ dist = myPlane->Distance( gc );
+ if ( dist < tol )
+ dist = 0;
+ }
else
- mySurface->ValueOfUV( gc, tol );
-
- return Round( mySurface->Gap() );
+ {
+ if ( uv.X() != 0 && uv.Y() != 0 ) // faster way
+ mySurface->NextValueOfUV( uv, gc, tol, 0.5 * maxLen );
+ else
+ mySurface->ValueOfUV( gc, tol );
+ dist = mySurface->Gap();
+ }
+ return Round( dist );
}
}
return 0;
{
NumericalFunctor::SetMesh( dynamic_cast<const SMESHDS_Mesh* >( theMesh ));
myShapeIndex = -100;
+ myPlane.reset();
}
SMDSAbs_ElementType Deflection2D::GetType() const
class SMESHDS_SubMesh;
class SMESHDS_GroupBase;
-class gp_Pnt;
class BRepClass3d_SolidClassifier;
class ShapeAnalysis_Surface;
+class gp_Pln;
+class gp_Pnt;
namespace SMESH{
namespace Controls{
private:
Handle(ShapeAnalysis_Surface) mySurface;
int myShapeIndex;
+ boost::shared_ptr<gp_Pln> myPlane;
};
/*
bool SMESH_Algo::Features::IsCompatible( const SMESH_Algo::Features& algo2 ) const
{
if ( _dim > algo2._dim ) return algo2.IsCompatible( *this );
- // algo2 is of highter dimension
+ // algo2 is of higher dimension
if ( _outElemTypes.empty() || algo2._inElemTypes.empty() )
return false;
bool compatible = true;
save << clause << ".3) Faces in detail: " << endl;
map <int,int>::iterator itF;
for (itF = myFaceMap.begin(); itF != myFaceMap.end(); itF++)
- save << "--> nb nodes: " << itF->first << " - nb elemens:\t" << itF->second << endl;
+ save << "--> nb nodes: " << itF->first << " - nb elements:\t" << itF->second << endl;
}
}
save << ++clause << ") Total number of " << orderStr << " volumes:\t" << NbVolumes(order) << endl;
save << clause << ".5) Volumes in detail: " << endl;
map <int,int>::iterator itV;
for (itV = myVolumesMap.begin(); itV != myVolumesMap.end(); itV++)
- save << "--> nb nodes: " << itV->first << " - nb elemens:\t" << itV->second << endl;
+ save << "--> nb nodes: " << itV->first << " - nb elements:\t" << itV->second << endl;
}
}
save << endl;
return fabs(param-myPar1[i]) < fabs(param-myPar2[i]) ? myPar2[i] : myPar1[i];
}
+//=======================================================================
+//function : NbRealSeam
+//purpose : Return a number of real seam edges in the shape set through
+// IsQuadraticSubMesh() or SetSubShape(). A real seam edge encounters twice in a wire
+//=======================================================================
+
+size_t SMESH_MesherHelper::NbRealSeam() const
+{
+ size_t nb = 0;
+
+ std::set< int >::const_iterator id = mySeamShapeIds.begin();
+ for ( ; id != mySeamShapeIds.end(); ++id )
+ if ( *id < 0 ) ++nb;
+ else break;
+
+ return nb;
+}
+
//=======================================================================
//function : IsOnSeam
//purpose : Check if UV is on seam. Return 0 if not, 1 for U seam, 2 for V seam
MSG("Internal chain - ignore");
continue;
}
- // mesure chain length and compute link position along the chain
+ // measure chain length and compute link position along the chain
double chainLen = 0;
vector< double > linkPos;
TChain savedChain; // backup
typedef SMDS_Iterator<const TopoDS_Shape*> PShapeIterator;
typedef boost::shared_ptr< PShapeIterator > PShapeIteratorPtr;
-
+
typedef std::vector<const SMDS_MeshNode* > TNodeColumn;
typedef std::map< double, TNodeColumn > TParam2ColumnMap;
/*!
* \brief Check if the shape set through IsQuadraticSubMesh() or SetSubShape()
* has a degenerated edges
- * \retval bool - true if it has
+ * \retval bool - true if there are degenerated edges
*/
bool HasDegeneratedEdges() const { return !myDegenShapeIds.empty(); }
+ /*!
+ * \brief Return a number of degenerated edges in the shape set through
+ * IsQuadraticSubMesh() or SetSubShape()
+ * \retval size_t - nb edges
+ */
+ size_t NbDegeneratedEdges() const { return myDegenShapeIds.size(); }
/*!
* \brief Check if shape is a seam edge or it's vertex
* \retval bool - true if it has
*/
bool HasRealSeam() const { return HasSeam() && ( *mySeamShapeIds.begin() < 0 ); }
+ /*!
+ * \brief Return a number of real seam edges in the shape set through
+ * IsQuadraticSubMesh() or SetSubShape(). A real seam edge encounters twice in a wire
+ * \retval size_t - nb of real seams
+ */
+ size_t NbRealSeam() const;
/*!
* \brief Return index of periodic parametric direction of a closed face
* \retval int - 1 for U, 2 for V direction
//================================================================================
/*!
- * \brief Destructor deletes proxy submeshes and tmp elemens
+ * \brief Destructor deletes proxy submeshes and tmp elements
*/
//================================================================================
//================================================================================
/*!
- * \brief Desctructor
+ * \brief Destructor
*/
//================================================================================
//================================================================================
/*!
- * \brief Desctructor
+ * \brief Destructor
*/
//================================================================================
OpRemoveElemGroupPopup = 2082, // POPUP MENU - REMOVE ELEMENTS FROM GROUP
OpMeshInformation = 2100, // MENU MESH - MESH INFORMATION
OpWhatIs = 2101, // MENU MESH - MESH ELEMENT INFORMATION
- OpStdInfo = 2102, // MENU MESH - MESH STANDART INFORMATION
+ OpStdInfo = 2102, // MENU MESH - MESH STANDARD INFORMATION
OpFindElementByPoint = 2103, // MENU MESH - FIND ELEMENT BY POINT
OpUpdate = 2200, // POPUP MENU - UPDATE
// Controls -----------------------//--------------------------------
double myDirCoef; // 1. or -1, to make myDir oriented as myNodes in myFace
double myLength; // between nodes
double myAngleWithPrev; // between myDir and -myPrev->myDir
+ double myMinMaxRatio; // of a possible triangle sides
TAngleMap::iterator myAngleMapPos;
double myOverlapAngle; // angle delta due to overlapping
const SMDS_MeshNode* myNode1Shift; // nodes created to avoid overlapping of faces
std::vector<const SMDS_MeshElement*>& newFaces,
const bool isReverse );
gp_XYZ GetInFaceDir() const { return myFaceNorm ^ myDir * myDirCoef; }
+ double ShapeFactor() const { return 0.5 * ( 1. - myMinMaxRatio ); }
void InsertSelf(TAngleMap& edgesByAngle, bool isReverseFaces, bool reBind, bool useOverlap )
{
if ( reBind ) edgesByAngle.erase( myAngleMapPos );
double key = (( isReverseFaces ? 2 * M_PI - myAngleWithPrev : myAngleWithPrev )
- + myOverlapAngle * useOverlap );
+ + myOverlapAngle * useOverlap
+ + ShapeFactor() );
myAngleMapPos = edgesByAngle.insert( std::make_pair( key, this ));
}
myFaceNorm *= -1;
myDirCoef *= -1;
}
-
}
//================================================================================
void BEdge::ComputeAngle( bool theReverseAngle )
{
- myAngleWithPrev = ACos( myDir.Dot( myPrev->myDir.Reversed() ));
+ double dot = myDir.Dot( myPrev->myDir.Reversed() );
+ if ( dot >= 1 ) myAngleWithPrev = 0;
+ else if ( dot <= -1 ) myAngleWithPrev = M_PI;
+ else myAngleWithPrev = acos( dot );
bool isObtuse;
- gp_XYZ inNewFaceDir = myDir - myPrev->myDir;
- double dot1 = myDir.Dot( myPrev->myFaceNorm );
- double dot2 = myPrev->myDir.Dot( myFaceNorm );
- bool isOverlap1 = ( inNewFaceDir * myPrev->GetInFaceDir() > 0 );
- bool isOverlap2 = ( inNewFaceDir * GetInFaceDir() > 0 );
+ gp_XYZ inFaceDirNew = myDir - myPrev->myDir;
+ gp_XYZ inFaceDir1 = myPrev->GetInFaceDir();
+ gp_XYZ inFaceDir2 = this->GetInFaceDir();
+ double dot1 = inFaceDirNew * inFaceDir1;
+ double dot2 = inFaceDirNew * inFaceDir2;
+ bool isOverlap1 = ( dot1 > 0 );
+ bool isOverlap2 = ( dot2 > 0 );
if ( !myPrev->myFace )
isObtuse = isOverlap1;
else if ( !myFace )
isObtuse = isOverlap2;
else
{
- isObtuse = ( dot1 > 0 || dot2 < 0 ); // suppose face normals point outside the border
+ double dt1 = myDir.Dot( myPrev->myFaceNorm );
+ double dt2 = myPrev->myDir.Dot( myFaceNorm );
+ isObtuse = ( dt1 > 0 || dt2 < 0 ); // suppose face normals point outside the border
if ( theReverseAngle )
isObtuse = !isObtuse;
}
// check if myFace and a triangle built on this and prev edges overlap
if ( isOverlap1 )
{
- double cos2 = dot1 * dot1 / myPrev->myFaceNorm.SquareModulus();
- myOverlapAngle += 0.5 * M_PI * ( 1 - cos2 );
+ double cos2 = dot1 * dot1 / inFaceDirNew.SquareModulus() / inFaceDir1.SquareModulus();
+ myOverlapAngle += 1. * M_PI * cos2;
}
if ( isOverlap2 )
{
- double cos2 = dot2 * dot2 / myFaceNorm.SquareModulus();
- myOverlapAngle += 0.5 * M_PI * ( 1 - cos2 );
+ double cos2 = dot2 * dot2 / inFaceDirNew.SquareModulus() / inFaceDir2.SquareModulus();
+ myOverlapAngle += 1. * M_PI * cos2;
}
}
+
+ {
+ double len3 = SMESH_NodeXYZ( myPrev->myNode1 ).Distance( myNode2 );
+ double minLen = Min( myLength, Min( myPrev->myLength, len3 ));
+ double maxLen = Max( myLength, Max( myPrev->myLength, len3 ));
+ myMinMaxRatio = minLen / maxLen;
+ }
}
//================================================================================
while ( edgesByAngle.size() > 2 )
{
TAngleMap::iterator a2e = edgesByAngle.begin();
- if ( useOverlap && a2e->first > M_PI - angTol ) // all new triangles need shift
+ edge = a2e->second;
+ if ( useOverlap &&
+ a2e->first - edge->ShapeFactor() > M_PI - angTol ) // all new triangles need shift
{
- // re-sort the edges
+ // re-sort the edges w/o overlap consideration
useOverlap = false;
- edge = a2e->second;
nbEdges = edgesByAngle.size();
edgesByAngle.clear();
for ( size_t i = 0; i < nbEdges; ++i, edge = edge->myNext )
struct SMESH_TNodeXYZ : public gp_XYZ
{
const SMDS_MeshNode* _node;
- double _xyz[3];
SMESH_TNodeXYZ( const SMDS_MeshElement* e=0):gp_XYZ(0,0,0),_node(0)
{
Set(e);
if (e) {
assert( e->GetType() == SMDSAbs_Node );
_node = static_cast<const SMDS_MeshNode*>(e);
- _node->GetXYZ(_xyz); // - thread safe getting coords
- SetCoord( _xyz[0], _xyz[1], _xyz[2] );
+ _node->GetXYZ( ChangeData() ); // - thread safe getting coords
return true;
}
return false;
}
double Distance(const SMDS_MeshNode* n) const { return (SMESH_TNodeXYZ( n )-*this).Modulus(); }
double SquareDistance(const SMDS_MeshNode* n) const { return (SMESH_TNodeXYZ( n )-*this).SquareModulus(); }
- bool operator==(const SMESH_TNodeXYZ& other) const { return _node == other._node; }
+ bool operator==(const SMESH_TNodeXYZ& other) const { return _node == other._node; }
};
typedef SMESH_TNodeXYZ SMESH_NodeXYZ;
/*!
* \brief Container of commands into which the initial script is split.
- * It also contains data coresponding to SMESH_Gen contents
+ * It also contains data corresponding to SMESH_Gen contents
*/
static Handle(_pyGen) theGen;
// "Face V positions" - V parameter of node on face
// Find out nb of nodes on edges and faces
- // Collect corresponing sub-meshes
+ // Collect corresponding sub-meshes
int nbEdgeNodes = 0, nbFaceNodes = 0;
list<SMESHDS_SubMesh*> aEdgeSM, aFaceSM;
// loop on SMESHDS_SubMesh'es
## doc string of the method
# @internal
docHelper = "Creates prism 3D algorithm for volumes"
+ ## flag pointing whether this algorithm should be used by default in dynamic method
+ # of smeshBuilder.Mesh class
+ # @internal
+ isDefault = True
## Private constructor.
# @param mesh parent mesh object algorithm is assigned to
return self.editor.MakeIDSource(ids, elemType)
- # Get informations about mesh contents:
+ # Get information about mesh contents:
# ------------------------------------
- ## Get the mesh stattistic
+ ## Get the mesh statistic
# @return dictionary type element - count of elements
# @ingroup l1_meshinfo
def GetMeshInfo(self, obj = None):
## Identify the elements that will be affected by node duplication (actual duplication is not performed.
# This method is the first step of DoubleNodeElemGroupsInRegion.
- # @param theElems - list of groups of elements (edges or faces) to be replicated
+ # @param theElems - list of groups of nodes or elements (edges or faces) to be replicated
# @param theNodesNot - list of groups of nodes not to replicated
# @param theShape - shape to detect affected elements (element which geometric center
# located on or inside shape).
# The replicated nodes should be associated to affected elements.
- # @return groups of affected elements
+ # @return groups of affected elements in order: volumes, faces, edges
# @ingroup l2_modif_duplicat
def AffectedElemGroupsInRegion(self, theElems, theNodesNot, theShape):
return self.editor.AffectedElemGroupsInRegion(theElems, theNodesNot, theShape)
theTShapeToLengthMap.insert( make_pair( getTShape( edge ), L ));
}
- // Compute S0 - minimal segement length, is computed by the shortest EDGE
+ // Compute S0 - minimal segment length, is computed by the shortest EDGE
/* image attached to PAL10237
theSinuEdges [0].size() > 0 && theSinuEdges [1].size() > 0 );
// the sinuous EDGEs can be composite and C0 continuous,
- // therefor we use a complex criterion to find TWO short non-sinuous EDGEs
+ // therefore we use a complex criterion to find TWO short non-sinuous EDGEs
// and the rest EDGEs will be treated as sinuous.
// A short edge should have the following features:
// a) straight
{
d = Abs( idealLen - accuLength[ iEV ]);
- // take into account presence of a coresponding halfDivider
+ // take into account presence of a corresponding halfDivider
const double cornerWgt = 0.5 / nbSides;
const double vertexWgt = 0.25 / nbSides;
TGeoIndex hd = halfDivider[ evVec[ iEV ]];
//jobParameters->maximum_duration = CORBA::string_dup("01:00");
jobParameters->queue = CORBA::string_dup("");
- // Setting resource and additionnal properties (if needed)
+ // Setting resource and additional properties (if needed)
// The resource parameters can be initiated from scratch, for
// example by specifying the values in hard coding:
// >>>
resourceDefinition = _resourcesManager->GetResourceDefinition(resourceName);
}
catch (const CORBA::SystemException& ex) {
- _lastErrorMessage = std::string("We can not access to the ressource ") + std::string(resourceName);
+ _lastErrorMessage = std::string("We can not access the resource ") + std::string(resourceName);
_lastErrorMessage+= std::string("(check the file CatalogResource.xml)");
LOG(_lastErrorMessage);
return JOBID_UNDEFINED;
// Then, the values can be used to initiate the resource parameters
// of the job:
jobParameters->resource_required.name = CORBA::string_dup(resourceDefinition->name.in());
- // CAUTION: the additionnal two following parameters MUST be
+ // CAUTION: the additional two following parameters MUST be
// specified explicitly, because they are not provided by the
// resource definition:
jobParameters->resource_required.mem_mb = resourceDefinition->mem_mb;
// SALOME application.
// In the code instructions, you just have to choose a resource
// configuration by its name and then define the ResourceParameters
- // that specify additionnal properties for a specific job submission
+ // that specify additional properties for a specific job submission
// (use the attribute resource_required of the JobParameters).
return resourceNames;
Engines::ResourcesManager_var _resourcesManager;
// This maps the config identifier to the config parameters. A
- // config is a resource with additionnal data specifying the
+ // config is a resource with additional data specifying the
// location of the binary program to be executed by the task
std::map<std::string, MESHJOB::ConfigParameter> _configMap;