mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-24 08:20:34 +05:00
restore "QuadranglePreference" hyp as it can be used by NETGEN 2D
together with "Max. Elemet Area" for example
This commit is contained in:
parent
50c956e8c2
commit
2ef67f753e
@ -53,6 +53,7 @@ with other hypotheses:
|
||||
<li>Propagation of 1D Hypothesis on opposite edges</li>
|
||||
<li>Non conform mesh allowed</li>
|
||||
<li>Quadratic mesh</li>
|
||||
<li>Quadrangle preference</li>
|
||||
<li>Viscous layers</li>
|
||||
</ul>
|
||||
|
||||
|
@ -32,6 +32,15 @@ has been locally defined on the opposite edge.
|
||||
<br><b>See Also</b> a sample TUI Script of a
|
||||
\ref tui_propagation "Propagation hypothesis" operation
|
||||
|
||||
<h2>Quadrangle Preference</h2>
|
||||
|
||||
This additional hypothesis can be used together with Netgen 2D algorithm.
|
||||
It allows Netgen 2D to build quadrangular meshes.
|
||||
|
||||
<br>
|
||||
This hypothesis has one restriction on its work: the total quantity of
|
||||
segments on all four sides of the face must be even (divisible by 2).
|
||||
|
||||
\anchor viscous_layers_anchor
|
||||
<h2>Viscous Layers</h2>
|
||||
|
||||
|
@ -469,6 +469,17 @@ module StdMeshers
|
||||
{
|
||||
};
|
||||
|
||||
/*!
|
||||
* StdMeshers_QuadranglePreference: interface of "QuadranglePreference" hypothesis.
|
||||
* This hypothesis is used by StdMeshers_Quadrangle_2D algorithm.
|
||||
* Presence of this hypothesis forces construction of quadrangles if the number
|
||||
* of nodes on opposite edges is not the same in the case where the global number
|
||||
* of nodes on edges is even
|
||||
*/
|
||||
interface StdMeshers_QuadranglePreference : SMESH::SMESH_Hypothesis
|
||||
{
|
||||
};
|
||||
|
||||
/*!
|
||||
* StdMeshers_QuadraticMesh: interface of "QuadraticMesh" hypothesis.
|
||||
* This is an auxiliary 1D hypothesis whose presence forces construction
|
||||
|
@ -90,6 +90,12 @@
|
||||
icon-id="mesh_hypo_length.png"
|
||||
dim="2"/>
|
||||
|
||||
<hypothesis type="QuadranglePreference"
|
||||
label-id="Quadrangle Preference"
|
||||
icon-id="mesh_algo_quad.png"
|
||||
auxiliary="true"
|
||||
dim="2"/>
|
||||
|
||||
<hypothesis type="QuadraticMesh"
|
||||
label-id="Quadratic Mesh"
|
||||
icon-id="mesh_algo_quad.png"
|
||||
@ -191,7 +197,7 @@
|
||||
<algorithm type="CompositeSegment_1D"
|
||||
label-id="Composite side discretisation"
|
||||
icon-id="mesh_algo_regular.png"
|
||||
hypos="LocalLength,MaxLength,Arithmetic1D,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength"
|
||||
hypos="LocalLength,MaxLength,Arithmetic1D,StartEndLength,NumberOfSegments,Deflection1D,AutomaticLength,FixedPoints1D"
|
||||
opt-hypos="Propagation,QuadraticMesh"
|
||||
input="VERTEX"
|
||||
output="EDGE"
|
||||
@ -209,7 +215,6 @@
|
||||
label-id="Quadrangle (Mapping)"
|
||||
icon-id="mesh_algo_quad.png"
|
||||
hypos="QuadrangleParams"
|
||||
opt-hypos="QuadranglePreference,TrianglePreference"
|
||||
input="EDGE"
|
||||
output="QUAD"
|
||||
dim="2"/>
|
||||
|
@ -45,6 +45,7 @@ salomeinclude_HEADERS = \
|
||||
StdMeshers_Penta_3D.hxx \
|
||||
StdMeshers_AutomaticLength.hxx \
|
||||
StdMeshers_Distribution.hxx \
|
||||
StdMeshers_QuadranglePreference.hxx \
|
||||
StdMeshers_QuadraticMesh.hxx \
|
||||
StdMeshers_NumberOfLayers.hxx \
|
||||
StdMeshers_NumberOfLayers2D.hxx \
|
||||
@ -99,6 +100,7 @@ dist_libStdMeshers_la_SOURCES = \
|
||||
StdMeshers_Hexa_3D.cxx \
|
||||
StdMeshers_AutomaticLength.cxx \
|
||||
StdMeshers_Distribution.cxx \
|
||||
StdMeshers_QuadranglePreference.cxx \
|
||||
StdMeshers_QuadraticMesh.cxx \
|
||||
StdMeshers_NumberOfLayers.cxx \
|
||||
StdMeshers_NumberOfLayers2D.cxx \
|
||||
|
108
src/StdMeshers/StdMeshers_QuadranglePreference.cxx
Normal file
108
src/StdMeshers/StdMeshers_QuadranglePreference.cxx
Normal file
@ -0,0 +1,108 @@
|
||||
// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// SMESH StdMeshers_QuadranglePreference : implementaion of SMESH idl descriptions
|
||||
// File : StdMeshers_QuadranglePreference.cxx
|
||||
// Module : SMESH
|
||||
//
|
||||
#include "StdMeshers_QuadranglePreference.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
StdMeshers_QuadranglePreference::StdMeshers_QuadranglePreference(int hypId,
|
||||
int studyId,
|
||||
SMESH_Gen * gen)
|
||||
:SMESH_Hypothesis(hypId, studyId, gen)
|
||||
{
|
||||
_name = "QuadranglePreference";
|
||||
_param_algo_dim = -2; // auxiliary used by NETGEN 2D
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
StdMeshers_QuadranglePreference::~StdMeshers_QuadranglePreference()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
ostream & StdMeshers_QuadranglePreference::SaveTo(ostream & save)
|
||||
{
|
||||
return save;
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
*
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
istream & StdMeshers_QuadranglePreference::LoadFrom(istream & load)
|
||||
{
|
||||
return load;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Initialize my parameter values by the mesh built on the geometry
|
||||
* \param theMesh - the built mesh
|
||||
* \param theShape - the geometry of interest
|
||||
* \retval bool - true if parameter values have been successfully defined
|
||||
*
|
||||
* Just return false as this hypothesis does not have parameters values
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool StdMeshers_QuadranglePreference::SetParametersByMesh(const SMESH_Mesh* /*theMesh*/,
|
||||
const TopoDS_Shape& /*theShape*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Initialize my parameter values by default parameters.
|
||||
* \retval bool - true if parameter values have been successfully defined
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
bool StdMeshers_QuadranglePreference::SetParametersByDefaults(const TDefaults& /*dflts*/,
|
||||
const SMESH_Mesh* /*theMesh*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
68
src/StdMeshers/StdMeshers_QuadranglePreference.hxx
Normal file
68
src/StdMeshers/StdMeshers_QuadranglePreference.hxx
Normal file
@ -0,0 +1,68 @@
|
||||
// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// SMESH StdMeshers : implementaion of SMESH idl descriptions
|
||||
// File : StdMeshers_QuadranglePreference.hxx
|
||||
// Module : SMESH
|
||||
//
|
||||
#ifndef _StdMeshers_QuadranglePreference_HXX_
|
||||
#define _StdMeshers_QuadranglePreference_HXX_
|
||||
|
||||
#include "SMESH_StdMeshers.hxx"
|
||||
|
||||
#include "SMESH_Hypothesis.hxx"
|
||||
#include "Utils_SALOME_Exception.hxx"
|
||||
|
||||
/*!
|
||||
* \brief Hypothesis for StdMeshers_Quadrangle_2D, forcing construction
|
||||
* of quadrangles if the number of nodes on opposite edges is not the same.
|
||||
* GIBI can do it if the global number of nodes is even (DALL operator).
|
||||
* See PAL10467
|
||||
*/
|
||||
class STDMESHERS_EXPORT StdMeshers_QuadranglePreference:public SMESH_Hypothesis
|
||||
{
|
||||
public:
|
||||
StdMeshers_QuadranglePreference(int hypId, int studyId, SMESH_Gen * gen);
|
||||
virtual ~ StdMeshers_QuadranglePreference();
|
||||
|
||||
virtual std::ostream & SaveTo(std::ostream & save);
|
||||
virtual std::istream & LoadFrom(std::istream & load);
|
||||
|
||||
/*!
|
||||
* \brief Initialize my parameter values by the mesh built on the geometry
|
||||
* \param theMesh - the built mesh
|
||||
* \param theShape - the geometry of interest
|
||||
* \retval bool - true if parameter values have been successfully defined
|
||||
*
|
||||
* Just return false as this hypothesis does not have parameters values
|
||||
*/
|
||||
virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
|
||||
|
||||
/*!
|
||||
* \brief Initialize my parameter values by default parameters.
|
||||
* \retval bool - true if parameter values have been successfully defined
|
||||
*/
|
||||
virtual bool SetParametersByDefaults(const TDefaults& dflts, const SMESH_Mesh* theMesh=0);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
@ -43,6 +43,7 @@ salomeinclude_HEADERS = \
|
||||
StdMeshers_MEFISTO_2D_i.hxx \
|
||||
StdMeshers_Hexa_3D_i.hxx \
|
||||
StdMeshers_AutomaticLength_i.hxx \
|
||||
StdMeshers_QuadranglePreference_i.hxx \
|
||||
StdMeshers_QuadraticMesh_i.hxx \
|
||||
StdMeshers_NumberOfLayers_i.hxx \
|
||||
StdMeshers_NumberOfLayers2D_i.hxx \
|
||||
@ -89,6 +90,7 @@ dist_libStdMeshersEngine_la_SOURCES = \
|
||||
StdMeshers_MEFISTO_2D_i.cxx \
|
||||
StdMeshers_Hexa_3D_i.cxx \
|
||||
StdMeshers_AutomaticLength_i.cxx \
|
||||
StdMeshers_QuadranglePreference_i.cxx \
|
||||
StdMeshers_QuadraticMesh_i.cxx \
|
||||
StdMeshers_NumberOfLayers_i.cxx \
|
||||
StdMeshers_NumberOfLayers2D_i.cxx \
|
||||
|
98
src/StdMeshers_I/StdMeshers_QuadranglePreference_i.cxx
Normal file
98
src/StdMeshers_I/StdMeshers_QuadranglePreference_i.cxx
Normal file
@ -0,0 +1,98 @@
|
||||
// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
// File : StdMeshers_QuadranglePreference_i.cxx
|
||||
// Moved here from SMESH_LocalLength_i.cxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
//
|
||||
#include "StdMeshers_QuadranglePreference_i.hxx"
|
||||
#include "SMESH_Gen_i.hxx"
|
||||
#include "SMESH_Gen.hxx"
|
||||
|
||||
#include "Utils_CorbaException.hxx"
|
||||
#include "utilities.h"
|
||||
|
||||
#include <TCollection_AsciiString.hxx>
|
||||
|
||||
using namespace std;
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* StdMeshers_QuadranglePreference_i::StdMeshers_QuadranglePreference_i
|
||||
*
|
||||
* Constructor
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
StdMeshers_QuadranglePreference_i::StdMeshers_QuadranglePreference_i
|
||||
( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl ): SALOME::GenericObj_i( thePOA ),
|
||||
SMESH_Hypothesis_i( thePOA )
|
||||
{
|
||||
myBaseImpl = new ::StdMeshers_QuadranglePreference( theGenImpl->GetANewId(),
|
||||
theStudyId,
|
||||
theGenImpl );
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* StdMeshers_QuadranglePreference_i::~StdMeshers_QuadranglePreference_i
|
||||
*
|
||||
* Destructor
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
StdMeshers_QuadranglePreference_i::~StdMeshers_QuadranglePreference_i()
|
||||
{
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
/*!
|
||||
* StdMeshers_QuadranglePreference_i::GetImpl
|
||||
*
|
||||
* Get implementation
|
||||
*/
|
||||
//=============================================================================
|
||||
|
||||
::StdMeshers_QuadranglePreference* StdMeshers_QuadranglePreference_i::GetImpl()
|
||||
{
|
||||
return ( ::StdMeshers_QuadranglePreference* )myBaseImpl;
|
||||
}
|
||||
|
||||
//================================================================================
|
||||
/*!
|
||||
* \brief Verify whether hypothesis supports given entity type
|
||||
* \param type - dimension (see SMESH::Dimension enumeration)
|
||||
* \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
|
||||
*
|
||||
* Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
|
||||
*/
|
||||
//================================================================================
|
||||
|
||||
CORBA::Boolean StdMeshers_QuadranglePreference_i::IsDimSupported( SMESH::Dimension type )
|
||||
{
|
||||
return type == SMESH::DIM_2D;
|
||||
}
|
||||
|
65
src/StdMeshers_I/StdMeshers_QuadranglePreference_i.hxx
Normal file
65
src/StdMeshers_I/StdMeshers_QuadranglePreference_i.hxx
Normal file
@ -0,0 +1,65 @@
|
||||
// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
//
|
||||
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
||||
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Lesser General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2.1 of the License.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
// Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public
|
||||
// License along with this library; if not, write to the Free Software
|
||||
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
|
||||
// File : StdMeshers_QuadranglePreference_i.hxx
|
||||
// Moved here from SMESH_LocalLength_i.hxx
|
||||
// Author : Paul RASCLE, EDF
|
||||
// Module : SMESH
|
||||
//
|
||||
#ifndef _SMESH_QuadranglePreference_I_HXX_
|
||||
#define _SMESH_QuadranglePreference_I_HXX_
|
||||
|
||||
#include "SMESH_StdMeshers_I.hxx"
|
||||
|
||||
#include <SALOMEconfig.h>
|
||||
#include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
|
||||
|
||||
#include "SMESH_Hypothesis_i.hxx"
|
||||
#include "StdMeshers_QuadranglePreference.hxx"
|
||||
|
||||
class SMESH_Gen;
|
||||
|
||||
// ======================================================
|
||||
// Local Length hypothesis
|
||||
// ======================================================
|
||||
class STDMESHERS_I_EXPORT StdMeshers_QuadranglePreference_i:
|
||||
public virtual POA_StdMeshers::StdMeshers_QuadranglePreference,
|
||||
public virtual SMESH_Hypothesis_i
|
||||
{
|
||||
public:
|
||||
// Constructor
|
||||
StdMeshers_QuadranglePreference_i( PortableServer::POA_ptr thePOA,
|
||||
int theStudyId,
|
||||
::SMESH_Gen* theGenImpl );
|
||||
// Destructor
|
||||
virtual ~StdMeshers_QuadranglePreference_i();
|
||||
|
||||
// Get implementation
|
||||
::StdMeshers_QuadranglePreference* GetImpl();
|
||||
|
||||
// Verify whether hypothesis supports given entity type
|
||||
CORBA::Boolean IsDimSupported( SMESH::Dimension type );
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -40,7 +40,7 @@
|
||||
#include "StdMeshers_Deflection1D_i.hxx"
|
||||
#include "StdMeshers_Propagation_i.hxx"
|
||||
#include "StdMeshers_LengthFromEdges_i.hxx"
|
||||
//#include "StdMeshers_QuadranglePreference_i.hxx"
|
||||
#include "StdMeshers_QuadranglePreference_i.hxx"
|
||||
//#include "StdMeshers_TrianglePreference_i.hxx"
|
||||
#include "StdMeshers_QuadraticMesh_i.hxx"
|
||||
#include "StdMeshers_MaxElementArea_i.hxx"
|
||||
@ -145,8 +145,9 @@ STDMESHERS_I_EXPORT
|
||||
else if (strcmp(aHypName, "AutomaticLength") == 0)
|
||||
aCreator = new StdHypothesisCreator_i<StdMeshers_AutomaticLength_i>;
|
||||
else if (strcmp(aHypName, "QuadranglePreference") == 0)
|
||||
//aCreator = new StdHypothesisCreator_i<StdMeshers_QuadranglePreference_i>;
|
||||
aCreator = new QuadrangleParamsCreator< StdMeshers::QUAD_QUADRANGLE_PREF >();
|
||||
// do not convert to StdMeshers_QuadrangleParams_i as it is used by NETGEN 2D
|
||||
aCreator = new StdHypothesisCreator_i<StdMeshers_QuadranglePreference_i>;
|
||||
//aCreator = new QuadrangleParamsCreator< StdMeshers::QUAD_QUADRANGLE_PREF >();
|
||||
else if (strcmp(aHypName, "TrianglePreference") == 0)
|
||||
//aCreator = new StdHypothesisCreator_i<StdMeshers_TrianglePreference_i>;
|
||||
aCreator = new QuadrangleParamsCreator< StdMeshers::QUAD_TRIANGLE_PREF >();
|
||||
|
Loading…
Reference in New Issue
Block a user