1 // SMESH SMESH : implementaion of SMESH idl descriptions
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : StdMeshers_Regular_1D.cxx
25 // Moved here from SMESH_Regular_1D.cxx
26 // Author : Paul RASCLE, EDF
30 #include "StdMeshers_Regular_1D.hxx"
31 #include "StdMeshers_Distribution.hxx"
32 #include "SMESH_Gen.hxx"
33 #include "SMESH_Mesh.hxx"
34 #include "SMESH_HypoFilter.hxx"
35 #include "SMESH_subMesh.hxx"
37 #include "StdMeshers_LocalLength.hxx"
38 #include "StdMeshers_NumberOfSegments.hxx"
39 #include "StdMeshers_Arithmetic1D.hxx"
40 #include "StdMeshers_StartEndLength.hxx"
41 #include "StdMeshers_Deflection1D.hxx"
42 #include "StdMeshers_AutomaticLength.hxx"
44 #include "SMDS_MeshElement.hxx"
45 #include "SMDS_MeshNode.hxx"
46 #include "SMDS_EdgePosition.hxx"
48 #include "Utils_SALOME_Exception.hxx"
49 #include "utilities.h"
51 #include <BRep_Tool.hxx>
52 #include <TopoDS_Edge.hxx>
53 #include <TopoDS_Shape.hxx>
54 #include <TopTools_ListIteratorOfListOfShape.hxx>
55 #include <GeomAdaptor_Curve.hxx>
56 #include <GCPnts_AbscissaPoint.hxx>
57 #include <GCPnts_UniformAbscissa.hxx>
58 #include <GCPnts_UniformDeflection.hxx>
59 #include <Standard_ErrorHandler.hxx>
60 #include <Precision.hxx>
61 #include <Expr_GeneralExpression.hxx>
62 #include <Expr_NamedUnknown.hxx>
63 #include <Expr_Array1OfNamedUnknown.hxx>
64 #include <TColStd_Array1OfReal.hxx>
65 #include <ExprIntrp_GenExp.hxx>
73 //=============================================================================
77 //=============================================================================
79 StdMeshers_Regular_1D::StdMeshers_Regular_1D(int hypId, int studyId,
80 SMESH_Gen * gen):SMESH_1D_Algo(hypId, studyId, gen)
82 MESSAGE("StdMeshers_Regular_1D::StdMeshers_Regular_1D");
84 _shapeType = (1 << TopAbs_EDGE);
86 _compatibleHypothesis.push_back("LocalLength");
87 _compatibleHypothesis.push_back("NumberOfSegments");
88 _compatibleHypothesis.push_back("StartEndLength");
89 _compatibleHypothesis.push_back("Deflection1D");
90 _compatibleHypothesis.push_back("Arithmetic1D");
91 _compatibleHypothesis.push_back("AutomaticLength");
93 _compatibleHypothesis.push_back("QuadraticMesh"); // auxiliary !!!
96 //=============================================================================
100 //=============================================================================
102 StdMeshers_Regular_1D::~StdMeshers_Regular_1D()
106 //=============================================================================
110 //=============================================================================
112 bool StdMeshers_Regular_1D::CheckHypothesis
114 const TopoDS_Shape& aShape,
115 SMESH_Hypothesis::Hypothesis_Status& aStatus)
118 _quadraticMesh = false;
120 const bool ignoreAuxiliaryHyps = false;
121 const list <const SMESHDS_Hypothesis * > & hyps =
122 GetUsedHypothesis(aMesh, aShape, ignoreAuxiliaryHyps);
124 // find non-auxiliary hypothesis
125 const SMESHDS_Hypothesis *theHyp = 0;
126 list <const SMESHDS_Hypothesis * >::const_iterator h = hyps.begin();
127 for ( ; h != hyps.end(); ++h ) {
128 if ( static_cast<const SMESH_Hypothesis*>(*h)->IsAuxiliary() ) {
129 if ( strcmp( "QuadraticMesh", (*h)->GetName() ) == 0 )
130 _quadraticMesh = true;
134 theHyp = *h; // use only the first non-auxiliary hypothesis
140 aStatus = SMESH_Hypothesis::HYP_MISSING;
141 return false; // can't work without a hypothesis
144 string hypName = theHyp->GetName();
146 if (hypName == "LocalLength")
148 const StdMeshers_LocalLength * hyp =
149 dynamic_cast <const StdMeshers_LocalLength * >(theHyp);
151 _value[ BEG_LENGTH_IND ] = _value[ END_LENGTH_IND ] = hyp->GetLength();
152 ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
153 _hypType = LOCAL_LENGTH;
154 aStatus = SMESH_Hypothesis::HYP_OK;
157 else if (hypName == "NumberOfSegments")
159 const StdMeshers_NumberOfSegments * hyp =
160 dynamic_cast <const StdMeshers_NumberOfSegments * >(theHyp);
162 _ivalue[ NB_SEGMENTS_IND ] = hyp->GetNumberOfSegments();
163 ASSERT( _ivalue[ NB_SEGMENTS_IND ] > 0 );
164 _ivalue[ DISTR_TYPE_IND ] = (int) hyp->GetDistrType();
165 switch (_ivalue[ DISTR_TYPE_IND ])
167 case StdMeshers_NumberOfSegments::DT_Scale:
168 _value[ SCALE_FACTOR_IND ] = hyp->GetScaleFactor();
170 case StdMeshers_NumberOfSegments::DT_TabFunc:
171 _vvalue[ TAB_FUNC_IND ] = hyp->GetTableFunction();
173 case StdMeshers_NumberOfSegments::DT_ExprFunc:
174 _svalue[ EXPR_FUNC_IND ] = hyp->GetExpressionFunction();
176 case StdMeshers_NumberOfSegments::DT_Regular:
182 if (_ivalue[ DISTR_TYPE_IND ] == StdMeshers_NumberOfSegments::DT_TabFunc ||
183 _ivalue[ DISTR_TYPE_IND ] == StdMeshers_NumberOfSegments::DT_ExprFunc)
184 _ivalue[ CONV_MODE_IND ] = hyp->ConversionMode();
185 _hypType = NB_SEGMENTS;
186 aStatus = SMESH_Hypothesis::HYP_OK;
189 else if (hypName == "Arithmetic1D")
191 const StdMeshers_Arithmetic1D * hyp =
192 dynamic_cast <const StdMeshers_Arithmetic1D * >(theHyp);
194 _value[ BEG_LENGTH_IND ] = hyp->GetLength( true );
195 _value[ END_LENGTH_IND ] = hyp->GetLength( false );
196 ASSERT( _value[ BEG_LENGTH_IND ] > 0 && _value[ END_LENGTH_IND ] > 0 );
197 _hypType = ARITHMETIC_1D;
198 aStatus = SMESH_Hypothesis::HYP_OK;
201 else if (hypName == "StartEndLength")
203 const StdMeshers_StartEndLength * hyp =
204 dynamic_cast <const StdMeshers_StartEndLength * >(theHyp);
206 _value[ BEG_LENGTH_IND ] = hyp->GetLength( true );
207 _value[ END_LENGTH_IND ] = hyp->GetLength( false );
208 ASSERT( _value[ BEG_LENGTH_IND ] > 0 && _value[ END_LENGTH_IND ] > 0 );
209 _hypType = BEG_END_LENGTH;
210 aStatus = SMESH_Hypothesis::HYP_OK;
213 else if (hypName == "Deflection1D")
215 const StdMeshers_Deflection1D * hyp =
216 dynamic_cast <const StdMeshers_Deflection1D * >(theHyp);
218 _value[ DEFLECTION_IND ] = hyp->GetDeflection();
219 ASSERT( _value[ DEFLECTION_IND ] > 0 );
220 _hypType = DEFLECTION;
221 aStatus = SMESH_Hypothesis::HYP_OK;
224 else if (hypName == "AutomaticLength")
226 StdMeshers_AutomaticLength * hyp = const_cast<StdMeshers_AutomaticLength *>
227 (dynamic_cast <const StdMeshers_AutomaticLength * >(theHyp));
229 _value[ BEG_LENGTH_IND ] = _value[ END_LENGTH_IND ] = hyp->GetLength( &aMesh, aShape );
230 ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
231 _hypType = LOCAL_LENGTH;
232 aStatus = SMESH_Hypothesis::HYP_OK;
235 aStatus = SMESH_Hypothesis::HYP_INCOMPATIBLE;
237 return ( _hypType != NONE );
240 //=======================================================================
241 //function : compensateError
242 //purpose : adjust theParams so that the last segment length == an
243 //=======================================================================
245 static void compensateError(double a1, double an,
246 double U1, double Un,
248 GeomAdaptor_Curve& C3d,
249 list<double> & theParams)
251 int i, nPar = theParams.size();
252 if ( a1 + an < length && nPar > 1 )
254 list<double>::reverse_iterator itU = theParams.rbegin();
256 // dist from the last point to the edge end <Un>, it should be equal <an>
257 double Ln = GCPnts_AbscissaPoint::Length( C3d, Ul, Un );
258 double dLn = an - Ln; // error of <an>
259 if ( Abs( dLn ) <= Precision::Confusion() )
261 double dU = Abs( Ul - *itU ); // parametric length of the last but one segment
262 double dUn = dLn * Abs( Un - U1 ) / length; // parametric error of <an>
263 if ( dUn < 0.5 * dU ) { // last segment is a bit shorter than it should
264 dUn = -dUn; // move the last parameter to the edge beginning
266 else { // last segment is much shorter than it should -> remove the last param and
267 theParams.pop_back(); nPar--; // move the rest points toward the edge end
268 Ln = GCPnts_AbscissaPoint::Length( C3d, theParams.back(), Un );
269 dUn = ( an - Ln ) * Abs( Un - U1 ) / length;
270 if ( dUn < 0.5 * dU )
275 double q = dUn / ( nPar - 1 );
276 for ( itU = theParams.rbegin(), i = 1; i < nPar; itU++, i++ ) {
283 static bool computeParamByFunc(Adaptor3d_Curve& C3d, double first, double last,
284 double length, bool theReverse,
285 int nbSeg, Function& func,
286 list<double>& theParams)
289 //OSD::SetSignal( true );
294 MESSAGE( "computeParamByFunc" );
296 int nbPnt = 1 + nbSeg;
297 vector<double> x(nbPnt, 0.);
299 if( !buildDistribution( func, 0.0, 1.0, nbSeg, x, 1E-4 ) )
302 MESSAGE( "Points:\n" );
304 for( int i=0; i<=nbSeg; i++ )
306 sprintf( buf, "%f\n", float(x[i] ) );
312 // apply parameters in range [0,1] to the space of the curve
313 double prevU = first;
320 for( int i = 1; i < nbSeg; i++ )
322 double curvLength = length * (x[i] - x[i-1]) * sign;
323 GCPnts_AbscissaPoint Discret( C3d, curvLength, prevU );
324 if ( !Discret.IsDone() )
326 double U = Discret.Parameter();
327 if ( U > first && U < last )
328 theParams.push_back( U );
336 //=============================================================================
340 //=============================================================================
341 bool StdMeshers_Regular_1D::computeInternalParameters(const TopoDS_Edge& theEdge,
342 list<double> & theParams,
343 const bool theReverse) const
348 Handle(Geom_Curve) Curve = BRep_Tool::Curve(theEdge, f, l);
349 GeomAdaptor_Curve C3d (Curve, f, l);
351 double length = EdgeLength(theEdge);
359 if ( _hypType == LOCAL_LENGTH )
361 // Local Length hypothesis
362 double nbseg = ceil(length / _value[ BEG_LENGTH_IND ]); // integer sup
364 nbseg = 1; // degenerated edge
365 eltSize = length / nbseg;
369 // Number Of Segments hypothesis
370 int NbSegm = _ivalue[ NB_SEGMENTS_IND ];
371 if ( NbSegm < 1 ) return false;
372 if ( NbSegm == 1 ) return true;
374 switch (_ivalue[ DISTR_TYPE_IND ])
376 case StdMeshers_NumberOfSegments::DT_Scale:
378 double scale = _value[ SCALE_FACTOR_IND ];
380 if (fabs(scale - 1.0) < Precision::Confusion()) {
381 // special case to avoid division on zero
382 for (int i = 1; i < NbSegm; i++) {
383 double param = f + (l - f) * i / NbSegm;
384 theParams.push_back( param );
387 // general case of scale distribution
391 double alpha = pow(scale, 1.0 / (NbSegm - 1));
392 double factor = (l - f) / (1.0 - pow(alpha, NbSegm));
394 for (int i = 1; i < NbSegm; i++) {
395 double param = f + factor * (1.0 - pow(alpha, i));
396 theParams.push_back( param );
402 case StdMeshers_NumberOfSegments::DT_TabFunc:
404 FunctionTable func(_vvalue[ TAB_FUNC_IND ], _ivalue[ CONV_MODE_IND ]);
405 return computeParamByFunc(C3d, f, l, length, theReverse,
406 _ivalue[ NB_SEGMENTS_IND ], func,
410 case StdMeshers_NumberOfSegments::DT_ExprFunc:
412 FunctionExpr func(_svalue[ EXPR_FUNC_IND ].c_str(), _ivalue[ CONV_MODE_IND ]);
413 return computeParamByFunc(C3d, f, l, length, theReverse,
414 _ivalue[ NB_SEGMENTS_IND ], func,
418 case StdMeshers_NumberOfSegments::DT_Regular:
419 eltSize = length / _ivalue[ NB_SEGMENTS_IND ];
425 GCPnts_UniformAbscissa Discret(C3d, eltSize, f, l);
426 if ( !Discret.IsDone() )
429 int NbPoints = Discret.NbPoints();
430 for ( int i = 2; i < NbPoints; i++ )
432 double param = Discret.Parameter(i);
433 theParams.push_back( param );
435 compensateError( eltSize, eltSize, f, l, length, C3d, theParams ); // for PAL9899
439 case BEG_END_LENGTH: {
441 // geometric progression: SUM(n) = ( a1 - an * q ) / ( 1 - q ) = length
443 double a1 = _value[ BEG_LENGTH_IND ];
444 double an = _value[ END_LENGTH_IND ];
445 double q = ( length - a1 ) / ( length - an );
447 double U1 = theReverse ? l : f;
448 double Un = theReverse ? f : l;
450 double eltSize = theReverse ? -a1 : a1;
452 // computes a point on a curve <C3d> at the distance <eltSize>
453 // from the point of parameter <param>.
454 GCPnts_AbscissaPoint Discret( C3d, eltSize, param );
455 if ( !Discret.IsDone() ) break;
456 param = Discret.Parameter();
457 if ( param > f && param < l )
458 theParams.push_back( param );
463 compensateError( a1, an, U1, Un, length, C3d, theParams );
467 case ARITHMETIC_1D: {
469 // arithmetic progression: SUM(n) = ( an - a1 + q ) * ( a1 + an ) / ( 2 * q ) = length
471 double a1 = _value[ BEG_LENGTH_IND ];
472 double an = _value[ END_LENGTH_IND ];
474 double q = ( an - a1 ) / ( 2 *length/( a1 + an ) - 1 );
475 int n = int( 1 + ( an - a1 ) / q );
477 double U1 = theReverse ? l : f;
478 double Un = theReverse ? f : l;
485 while ( n-- > 0 && eltSize * ( Un - U1 ) > 0 ) {
486 // computes a point on a curve <C3d> at the distance <eltSize>
487 // from the point of parameter <param>.
488 GCPnts_AbscissaPoint Discret( C3d, eltSize, param );
489 if ( !Discret.IsDone() ) break;
490 param = Discret.Parameter();
491 if ( param > f && param < l )
492 theParams.push_back( param );
497 compensateError( a1, an, U1, Un, length, C3d, theParams );
504 GCPnts_UniformDeflection Discret(C3d, _value[ DEFLECTION_IND ], f, l, true);
505 if ( !Discret.IsDone() )
508 int NbPoints = Discret.NbPoints();
509 for ( int i = 2; i < NbPoints; i++ )
511 double param = Discret.Parameter(i);
512 theParams.push_back( param );
524 //=============================================================================
528 //=============================================================================
530 bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
532 MESSAGE("StdMeshers_Regular_1D::Compute");
534 if ( _hypType == NONE )
537 SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
538 aMesh.GetSubMesh(aShape);
540 const TopoDS_Edge & EE = TopoDS::Edge(aShape);
541 TopoDS_Edge E = TopoDS::Edge(EE.Oriented(TopAbs_FORWARD));
542 int shapeID = meshDS->ShapeToIndex( E );
545 Handle(Geom_Curve) Curve = BRep_Tool::Curve(E, f, l);
547 TopoDS_Vertex VFirst, VLast;
548 TopExp::Vertices(E, VFirst, VLast); // Vfirst corresponds to f and Vlast to l
550 ASSERT(!VFirst.IsNull());
551 SMDS_NodeIteratorPtr lid= aMesh.GetSubMesh(VFirst)->GetSubMeshDS()->GetNodes();
554 MESSAGE (" NO NODE BUILT ON VERTEX ");
557 const SMDS_MeshNode * idFirst = lid->next();
559 ASSERT(!VLast.IsNull());
560 lid=aMesh.GetSubMesh(VLast)->GetSubMeshDS()->GetNodes();
562 MESSAGE (" NO NODE BUILT ON VERTEX ");
565 const SMDS_MeshNode * idLast = lid->next();
567 if (!Curve.IsNull()) {
568 list< double > params;
569 bool reversed = false;
570 if ( !_mainEdge.IsNull() )
571 reversed = aMesh.IsReversedInChain( EE, _mainEdge );
573 if ( ! computeInternalParameters( E, params, reversed )) {
574 //cout << "computeInternalParameters() failed" <<endl;
578 catch ( Standard_Failure ) {
579 //cout << "computeInternalParameters() failed, Standard_Failure" <<endl;
583 // edge extrema (indexes : 1 & NbPoints) already in SMDS (TopoDS_Vertex)
584 // only internal nodes receive an edge position with param on curve
586 const SMDS_MeshNode * idPrev = idFirst;
594 for (list<double>::iterator itU = params.begin(); itU != params.end(); itU++) {
596 gp_Pnt P = Curve->Value(param);
598 //Add the Node in the DataStructure
599 SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
600 meshDS->SetNodeOnEdge(node, shapeID, param);
603 // create medium node
604 double prm = ( parPrev + param )/2;
605 gp_Pnt PM = Curve->Value(prm);
606 SMDS_MeshNode * NM = meshDS->AddNode(PM.X(), PM.Y(), PM.Z());
607 meshDS->SetNodeOnEdge(NM, shapeID, prm);
608 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, node, NM);
609 meshDS->SetMeshElementOnShape(edge, shapeID);
612 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, node);
613 meshDS->SetMeshElementOnShape(edge, shapeID);
620 double prm = ( parPrev + parLast )/2;
621 gp_Pnt PM = Curve->Value(prm);
622 SMDS_MeshNode * NM = meshDS->AddNode(PM.X(), PM.Y(), PM.Z());
623 meshDS->SetNodeOnEdge(NM, shapeID, prm);
624 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, idLast, NM);
625 meshDS->SetMeshElementOnShape(edge, shapeID);
628 SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idLast);
629 meshDS->SetMeshElementOnShape(edge, shapeID);
633 // Edge is a degenerated Edge : We put n = 5 points on the edge.
634 const int NbPoints = 5;
635 BRep_Tool::Range(E, f, l);
636 double du = (l - f) / (NbPoints - 1);
637 //MESSAGE("************* Degenerated edge! *****************");
639 TopoDS_Vertex V1, V2;
640 TopExp::Vertices(E, V1, V2);
641 gp_Pnt P = BRep_Tool::Pnt(V1);
643 const SMDS_MeshNode * idPrev = idFirst;
644 for (int i = 2; i < NbPoints; i++) {
645 double param = f + (i - 1) * du;
646 SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
648 // create medium node
649 double prm = param - du/2.;
650 SMDS_MeshNode * NM = meshDS->AddNode(P.X(), P.Y(), P.Z());
651 meshDS->SetNodeOnEdge(NM, shapeID, prm);
652 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, node, NM);
653 meshDS->SetMeshElementOnShape(edge, shapeID);
656 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, node);
657 meshDS->SetMeshElementOnShape(edge, shapeID);
659 meshDS->SetNodeOnEdge(node, shapeID, param);
663 // create medium node
664 double prm = l - du/2.;
665 SMDS_MeshNode * NM = meshDS->AddNode(P.X(), P.Y(), P.Z());
666 meshDS->SetNodeOnEdge(NM, shapeID, prm);
667 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, idLast, NM);
668 meshDS->SetMeshElementOnShape(edge, shapeID);
671 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, idLast);
672 meshDS->SetMeshElementOnShape(edge, shapeID);
678 //=============================================================================
680 * See comments in SMESH_Algo.cxx
682 //=============================================================================
684 const list <const SMESHDS_Hypothesis *> &
685 StdMeshers_Regular_1D::GetUsedHypothesis(SMESH_Mesh & aMesh,
686 const TopoDS_Shape & aShape,
687 const bool ignoreAuxiliary)
689 _usedHypList.clear();
692 SMESH_HypoFilter auxiliaryFilter, compatibleFilter;
693 auxiliaryFilter.Init( SMESH_HypoFilter::IsAuxiliary() );
694 const bool ignoreAux = true;
695 InitCompatibleHypoFilter( compatibleFilter, ignoreAux );
697 // get non-auxiliary assigned to aShape
698 int nbHyp = aMesh.GetHypotheses( aShape, compatibleFilter, _usedHypList, false );
702 // Check, if propagated from some other edge
703 if (aShape.ShapeType() == TopAbs_EDGE &&
704 aMesh.IsPropagatedHypothesis(aShape, _mainEdge))
706 // Propagation of 1D hypothesis from <aMainEdge> on this edge;
707 // get non-auxiliary assigned to _mainEdge
708 nbHyp = aMesh.GetHypotheses( _mainEdge, compatibleFilter, _usedHypList, true );
712 if (nbHyp == 0) // nothing propagated nor assigned to aShape
714 SMESH_Algo::GetUsedHypothesis( aMesh, aShape, ignoreAuxiliary );
715 nbHyp = _usedHypList.size();
719 // get auxiliary hyps from aShape
720 aMesh.GetHypotheses( aShape, auxiliaryFilter, _usedHypList, true );
722 if ( nbHyp > 1 && ignoreAuxiliary )
723 _usedHypList.clear(); //only one compatible non-auxiliary hypothesis allowed
728 //=============================================================================
732 //=============================================================================
734 ostream & StdMeshers_Regular_1D::SaveTo(ostream & save)
739 //=============================================================================
743 //=============================================================================
745 istream & StdMeshers_Regular_1D::LoadFrom(istream & load)
750 //=============================================================================
754 //=============================================================================
756 ostream & operator <<(ostream & save, StdMeshers_Regular_1D & hyp)
758 return hyp.SaveTo( save );
761 //=============================================================================
765 //=============================================================================
767 istream & operator >>(istream & load, StdMeshers_Regular_1D & hyp)
769 return hyp.LoadFrom( load );