Renaming netgen2d/3d internal calls
This commit is contained in:
parent
0722b0a29e
commit
9c3bd8e9d1
@ -218,7 +218,7 @@ int netgen3d(const std::string input_mesh_file,
|
|||||||
std::cout << "Time for import_netgen_param: " << elapsed.count() * 1e-9 << std::endl;
|
std::cout << "Time for import_netgen_param: " << elapsed.count() * 1e-9 << std::endl;
|
||||||
|
|
||||||
std::cout << "Meshing with netgen3d" << std::endl;
|
std::cout << "Meshing with netgen3d" << std::endl;
|
||||||
int ret = netgen3d(myShape, *myMesh, myParams,
|
int ret = netgen3d_internal(myShape, *myMesh, myParams,
|
||||||
new_element_file, element_orientation_file,
|
new_element_file, element_orientation_file,
|
||||||
output_mesh);
|
output_mesh);
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ int netgen3d(const std::string input_mesh_file,
|
|||||||
*
|
*
|
||||||
* @return error code
|
* @return error code
|
||||||
*/
|
*/
|
||||||
int netgen3d(TopoDS_Shape &aShape, SMESH_Mesh& aMesh, netgen_params& aParams,
|
int netgen3d_internal(TopoDS_Shape &aShape, SMESH_Mesh& aMesh, netgen_params& aParams,
|
||||||
std::string new_element_file, std::string element_orientation_file,
|
std::string new_element_file, std::string element_orientation_file,
|
||||||
bool output_mesh)
|
bool output_mesh)
|
||||||
{
|
{
|
||||||
@ -659,7 +659,7 @@ int netgen2d(const std::string input_mesh_file,
|
|||||||
import_netgen_params(hypo_file, myParams);
|
import_netgen_params(hypo_file, myParams);
|
||||||
|
|
||||||
std::cout << "Meshing with netgen3d" << std::endl;
|
std::cout << "Meshing with netgen3d" << std::endl;
|
||||||
int ret = netgen2d(myShape, *myMesh, myParams,
|
int ret = netgen2d_internal(myShape, *myMesh, myParams,
|
||||||
new_element_file, element_orientation_file,
|
new_element_file, element_orientation_file,
|
||||||
output_mesh);
|
output_mesh);
|
||||||
|
|
||||||
@ -674,6 +674,8 @@ int netgen2d(const std::string input_mesh_file,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// TODO: Not working properly
|
||||||
/**
|
/**
|
||||||
* @brief Compute aShape within aMesh using netgen2d
|
* @brief Compute aShape within aMesh using netgen2d
|
||||||
*
|
*
|
||||||
@ -684,7 +686,7 @@ int netgen2d(const std::string input_mesh_file,
|
|||||||
*
|
*
|
||||||
* @return error code
|
* @return error code
|
||||||
*/
|
*/
|
||||||
int netgen2d(TopoDS_Shape &aShape, SMESH_Mesh& aMesh, netgen_params& aParams,
|
int netgen2d_internal(TopoDS_Shape &aShape, SMESH_Mesh& aMesh, netgen_params& aParams,
|
||||||
std::string new_element_file, std::string element_orientation_file,
|
std::string new_element_file, std::string element_orientation_file,
|
||||||
bool output_mesh)
|
bool output_mesh)
|
||||||
{
|
{
|
||||||
@ -818,98 +820,6 @@ int netgen2d(TopoDS_Shape &aShape, SMESH_Mesh& aMesh, netgen_params& aParams,
|
|||||||
|
|
||||||
vector< const SMDS_MeshNode* > nodeVec;
|
vector< const SMDS_MeshNode* > nodeVec;
|
||||||
|
|
||||||
// TopExp_Explorer fExp( aShape, TopAbs_FACE );
|
|
||||||
// for ( int iF = 0; fExp.More(); fExp.Next(), ++iF )
|
|
||||||
// {
|
|
||||||
// TopoDS_Face F = TopoDS::Face( fExp.Current() /*.Oriented( TopAbs_FORWARD )*/);
|
|
||||||
// int faceID = meshDS->ShapeToIndex( F );
|
|
||||||
// SMESH_ComputeErrorPtr& faceErr = aMesh.GetSubMesh( F )->GetComputeError();
|
|
||||||
|
|
||||||
// aParams._quadraticMesh = helper.IsQuadraticSubMesh( F );
|
|
||||||
// const bool ignoreMediumNodes = aParams._quadraticMesh;
|
|
||||||
|
|
||||||
// // build viscous layers if required
|
|
||||||
// if ( F.Orientation() != TopAbs_FORWARD &&
|
|
||||||
// F.Orientation() != TopAbs_REVERSED )
|
|
||||||
// F.Orientation( TopAbs_FORWARD ); // avoid pb with TopAbs_INTERNAL
|
|
||||||
// SMESH_ProxyMesh::Ptr proxyMesh = StdMeshers_ViscousLayers2D::Compute( aMesh, F );
|
|
||||||
// if ( !proxyMesh )
|
|
||||||
// continue;
|
|
||||||
|
|
||||||
// // ------------------------
|
|
||||||
// // get all EDGEs of a FACE
|
|
||||||
// // ------------------------
|
|
||||||
// TSideVector wires =
|
|
||||||
// StdMeshers_FaceSide::GetFaceWires( F, aMesh, ignoreMediumNodes, faceErr, &helper, proxyMesh );
|
|
||||||
// if ( faceErr && !faceErr->IsOK() )
|
|
||||||
// continue;
|
|
||||||
// size_t nbWires = wires.size();
|
|
||||||
// if ( nbWires == 0 )
|
|
||||||
// {
|
|
||||||
// faceErr.reset
|
|
||||||
// ( new SMESH_ComputeError
|
|
||||||
// ( COMPERR_ALGO_FAILED, "Problem in StdMeshers_FaceSide::GetFaceWires()" ));
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
// if ( wires[0]->NbSegments() < 3 ) // ex: a circle with 2 segments
|
|
||||||
// {
|
|
||||||
// faceErr.reset
|
|
||||||
// ( new SMESH_ComputeError
|
|
||||||
// ( COMPERR_BAD_INPUT_MESH, SMESH_Comment("Too few segments: ")<<wires[0]->NbSegments()) );
|
|
||||||
// continue;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // ----------------------
|
|
||||||
// // compute maxh of a FACE
|
|
||||||
// // ----------------------
|
|
||||||
|
|
||||||
// if ( !aParams.has_netgen_param )
|
|
||||||
// {
|
|
||||||
// double edgeLength = 0;
|
|
||||||
// if (aParams.has_LengthFromEdges_hyp )
|
|
||||||
// {
|
|
||||||
// // compute edgeLength as an average segment length
|
|
||||||
// smIdType nbSegments = 0;
|
|
||||||
// for ( size_t iW = 0; iW < nbWires; ++iW )
|
|
||||||
// {
|
|
||||||
// edgeLength += wires[ iW ]->Length();
|
|
||||||
// nbSegments += wires[ iW ]->NbSegments();
|
|
||||||
// }
|
|
||||||
// if ( nbSegments )
|
|
||||||
// edgeLength /= double( nbSegments );
|
|
||||||
// netgen::mparam.maxh = edgeLength;
|
|
||||||
// }
|
|
||||||
// else if ( isDefaultHyp )
|
|
||||||
// {
|
|
||||||
// // set edgeLength by a longest segment
|
|
||||||
// double maxSeg2 = 0;
|
|
||||||
// for ( size_t iW = 0; iW < nbWires; ++iW )
|
|
||||||
// {
|
|
||||||
// const UVPtStructVec& points = wires[ iW ]->GetUVPtStruct();
|
|
||||||
// if ( points.empty() )
|
|
||||||
// return error( COMPERR_BAD_INPUT_MESH );
|
|
||||||
// gp_Pnt pPrev = SMESH_TNodeXYZ( points[0].node );
|
|
||||||
// for ( size_t i = 1; i < points.size(); ++i )
|
|
||||||
// {
|
|
||||||
// gp_Pnt p = SMESH_TNodeXYZ( points[i].node );
|
|
||||||
// maxSeg2 = Max( maxSeg2, p.SquareDistance( pPrev ));
|
|
||||||
// pPrev = p;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// edgeLength = sqrt( maxSeg2 ) * 1.05;
|
|
||||||
// netgen::mparam.maxh = edgeLength;
|
|
||||||
// }
|
|
||||||
// if ( netgen::mparam.maxh < DBL_MIN )
|
|
||||||
// netgen::mparam.maxh = occgeoComm.GetBoundingBox().Diam();
|
|
||||||
|
|
||||||
// if ( !isCommonLocalSize )
|
|
||||||
// {
|
|
||||||
// netgen::mparam.minh = aMesher.GetDefaultMinSize( F, netgen::mparam.maxh );
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// prepare occgeom
|
// prepare occgeom
|
||||||
netgen::OCCGeometry occgeom;
|
netgen::OCCGeometry occgeom;
|
||||||
occgeom.shape = aShape;
|
occgeom.shape = aShape;
|
||||||
|
@ -36,7 +36,7 @@ class SMESH_Mesh;
|
|||||||
class SMESH_Comment;
|
class SMESH_Comment;
|
||||||
class netgen_params;
|
class netgen_params;
|
||||||
|
|
||||||
int netgen2d(TopoDS_Shape &aShape,
|
int netgen2d_internal(TopoDS_Shape &aShape,
|
||||||
SMESH_Mesh& aMesh,
|
SMESH_Mesh& aMesh,
|
||||||
netgen_params& aParams,
|
netgen_params& aParams,
|
||||||
std::string new_element_file,
|
std::string new_element_file,
|
||||||
@ -50,7 +50,7 @@ int netgen2d(const std::string input_mesh_file,
|
|||||||
bool output_mesh,
|
bool output_mesh,
|
||||||
const std::string output_mesh_file);
|
const std::string output_mesh_file);
|
||||||
|
|
||||||
int netgen3d(TopoDS_Shape &aShape,
|
int netgen3d_internal(TopoDS_Shape &aShape,
|
||||||
SMESH_Mesh& aMesh,
|
SMESH_Mesh& aMesh,
|
||||||
netgen_params& aParams,
|
netgen_params& aParams,
|
||||||
std::string new_element_file,
|
std::string new_element_file,
|
||||||
|
Loading…
Reference in New Issue
Block a user