mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 02:10:35 +05:00
22580: EDF 8049 SMESH: Problems with viscous layer
Overcome the problem of thickness limited by radius of curvature of faces
This commit is contained in:
parent
6cd71fc31b
commit
440a39776f
@ -559,10 +559,17 @@ public:
|
|||||||
{ return IsRealSeam( GetMeshDS()->ShapeToIndex( subShape)); }
|
{ return IsRealSeam( GetMeshDS()->ShapeToIndex( subShape)); }
|
||||||
/*!
|
/*!
|
||||||
* \brief Check if the shape set through IsQuadraticSubMesh() or SetSubShape()
|
* \brief Check if the shape set through IsQuadraticSubMesh() or SetSubShape()
|
||||||
* has a seam edge
|
* has a seam edge, i.e. an edge that has two parametric representations
|
||||||
|
* on a surface
|
||||||
* \retval bool - true if it has
|
* \retval bool - true if it has
|
||||||
*/
|
*/
|
||||||
bool HasSeam() const { return !mySeamShapeIds.empty(); }
|
bool HasSeam() const { return !mySeamShapeIds.empty(); }
|
||||||
|
/*!
|
||||||
|
* \brief Check if the shape set through IsQuadraticSubMesh() or SetSubShape()
|
||||||
|
* has a seam edge that encounters twice in a wire
|
||||||
|
* \retval bool - true if it has
|
||||||
|
*/
|
||||||
|
bool HasRealSeam() const { return HasSeam() && ( *mySeamShapeIds.begin() < 0 ); }
|
||||||
/*!
|
/*!
|
||||||
* \brief Return index of periodic parametric direction of a closed face
|
* \brief Return index of periodic parametric direction of a closed face
|
||||||
* \retval int - 1 for U, 2 for V direction
|
* \retval int - 1 for U, 2 for V direction
|
||||||
|
@ -1553,7 +1553,7 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
|||||||
if ( !algo->NeedDiscreteBoundary() && !subFailed )
|
if ( !algo->NeedDiscreteBoundary() && !subFailed )
|
||||||
_computeError =
|
_computeError =
|
||||||
SMESH_ComputeError::New(COMPERR_BAD_INPUT_MESH,
|
SMESH_ComputeError::New(COMPERR_BAD_INPUT_MESH,
|
||||||
"Unexpected computed submesh",algo);
|
"Unexpected computed sub-mesh",algo);
|
||||||
break; // goto exit
|
break; // goto exit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1587,8 +1587,8 @@ bool SMESH_subMesh::ComputeStateEngine(int event)
|
|||||||
{
|
{
|
||||||
ret = algo->Compute((*_father), shape);
|
ret = algo->Compute((*_father), shape);
|
||||||
}
|
}
|
||||||
if ( !_computeError || (/* !ret && */_computeError->IsOK() ) ) // algo can set _computeError of submesh
|
// algo can set _computeError of submesh
|
||||||
_computeError = algo->GetComputeError();
|
_computeError = SMESH_ComputeError::Worst( _computeError, algo->GetComputeError() );
|
||||||
}
|
}
|
||||||
catch ( ::SMESH_ComputeError& comperr ) {
|
catch ( ::SMESH_ComputeError& comperr ) {
|
||||||
cout << " SMESH_ComputeError caught" << endl;
|
cout << " SMESH_ComputeError caught" << endl;
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
// File : SMESH_Hypothesis.hxx
|
// File : SMESH_ComputeError.hxx
|
||||||
// Author : Edward AGAPOV (eap)
|
// Author : Edward AGAPOV (eap)
|
||||||
// Module : SMESH
|
// Module : SMESH
|
||||||
//
|
//
|
||||||
@ -89,32 +89,15 @@ struct SMESH_ComputeError
|
|||||||
bool IsKO() const { return myName != COMPERR_OK && myName != COMPERR_WARNING; }
|
bool IsKO() const { return myName != COMPERR_OK && myName != COMPERR_WARNING; }
|
||||||
bool IsCommon() const { return myName < 0 && myName > COMPERR_LAST_ALGO_ERROR; }
|
bool IsCommon() const { return myName < 0 && myName > COMPERR_LAST_ALGO_ERROR; }
|
||||||
bool HasBadElems() const { return !myBadElements.empty(); }
|
bool HasBadElems() const { return !myBadElements.empty(); }
|
||||||
inline std::string CommonName() const;
|
|
||||||
|
|
||||||
};
|
// not inline methods are implemented in src/SMESHUtils/SMESH_TryCatch.cxx
|
||||||
|
|
||||||
#define _case2char(err) case err: return #err;
|
|
||||||
|
|
||||||
// Return myName as text, to be used to dump errors in terminal
|
// Return myName as text, to be used to dump errors in terminal
|
||||||
std::string SMESH_ComputeError::CommonName() const
|
std::string CommonName() const;
|
||||||
{
|
|
||||||
switch( myName ) {
|
// Return the most severe error
|
||||||
_case2char(COMPERR_OK );
|
static SMESH_ComputeErrorPtr Worst( SMESH_ComputeErrorPtr er1,
|
||||||
_case2char(COMPERR_BAD_INPUT_MESH );
|
SMESH_ComputeErrorPtr er2 );
|
||||||
_case2char(COMPERR_STD_EXCEPTION );
|
};
|
||||||
_case2char(COMPERR_OCC_EXCEPTION );
|
|
||||||
_case2char(COMPERR_SLM_EXCEPTION );
|
|
||||||
_case2char(COMPERR_EXCEPTION );
|
|
||||||
_case2char(COMPERR_MEMORY_PB );
|
|
||||||
_case2char(COMPERR_ALGO_FAILED );
|
|
||||||
_case2char(COMPERR_BAD_SHAPE );
|
|
||||||
_case2char(COMPERR_WARNING );
|
|
||||||
_case2char(COMPERR_CANCELED );
|
|
||||||
_case2char(COMPERR_NO_MESH_ON_SHAPE);
|
|
||||||
_case2char(COMPERR_BAD_PARMETERS );
|
|
||||||
default:;
|
|
||||||
}
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||||
//
|
//
|
||||||
|
|
||||||
|
// ------------------------------------------------------------------
|
||||||
#include "SMESH_TryCatch.hxx"
|
#include "SMESH_TryCatch.hxx"
|
||||||
|
|
||||||
void SMESH::throwSalomeEx(const char* txt)
|
void SMESH::throwSalomeEx(const char* txt)
|
||||||
@ -31,4 +32,51 @@ void SMESH::doNothing(const char* txt)
|
|||||||
{
|
{
|
||||||
MESSAGE( txt << " " << __FILE__ << ": " << __LINE__ );
|
MESSAGE( txt << " " << __FILE__ << ": " << __LINE__ );
|
||||||
}
|
}
|
||||||
|
// ------------------------------------------------------------------
|
||||||
|
#include "SMESH_ComputeError.hxx"
|
||||||
|
|
||||||
|
#define _case2char(err) case err: return #err;
|
||||||
|
|
||||||
|
// Return SMESH_ComputeError::myName as text, to be used to dump errors in terminal
|
||||||
|
std::string SMESH_ComputeError::CommonName() const
|
||||||
|
{
|
||||||
|
switch( myName ) {
|
||||||
|
_case2char(COMPERR_OK );
|
||||||
|
_case2char(COMPERR_BAD_INPUT_MESH );
|
||||||
|
_case2char(COMPERR_STD_EXCEPTION );
|
||||||
|
_case2char(COMPERR_OCC_EXCEPTION );
|
||||||
|
_case2char(COMPERR_SLM_EXCEPTION );
|
||||||
|
_case2char(COMPERR_EXCEPTION );
|
||||||
|
_case2char(COMPERR_MEMORY_PB );
|
||||||
|
_case2char(COMPERR_ALGO_FAILED );
|
||||||
|
_case2char(COMPERR_BAD_SHAPE );
|
||||||
|
_case2char(COMPERR_WARNING );
|
||||||
|
_case2char(COMPERR_CANCELED );
|
||||||
|
_case2char(COMPERR_NO_MESH_ON_SHAPE);
|
||||||
|
_case2char(COMPERR_BAD_PARMETERS );
|
||||||
|
default:;
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return the most severe error
|
||||||
|
SMESH_ComputeErrorPtr SMESH_ComputeError::Worst( SMESH_ComputeErrorPtr er1,
|
||||||
|
SMESH_ComputeErrorPtr er2 )
|
||||||
|
{
|
||||||
|
if ( !er1 ) return er2;
|
||||||
|
if ( !er2 ) return er1;
|
||||||
|
// both not NULL
|
||||||
|
if ( er1->IsOK() ) return er2;
|
||||||
|
if ( er2->IsOK() ) return er1;
|
||||||
|
// both not OK
|
||||||
|
if ( !er1->IsKO() ) return er2;
|
||||||
|
if ( !er2->IsKO() ) return er1;
|
||||||
|
// both KO
|
||||||
|
bool hasInfo1 = er1->myComment.size() || !er1->myBadElements.empty();
|
||||||
|
bool hasInfo2 = er2->myComment.size() || !er2->myBadElements.empty();
|
||||||
|
if ( er1->myName == er2->myName ||
|
||||||
|
hasInfo1 != hasInfo2 )
|
||||||
|
return hasInfo1 < hasInfo2 ? er2 : er1;
|
||||||
|
|
||||||
|
return er1->myName == COMPERR_CANCELED ? er2 : er1;
|
||||||
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user