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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : StdMeshers_Regular_1D.cxx
25 // Moved here from SMESH_Regular_1D.cxx
26 // Author : Paul RASCLE, EDF
32 #include "StdMeshers_Regular_1D.hxx"
33 #include "StdMeshers_Distribution.hxx"
34 #include "SMESH_Gen.hxx"
35 #include "SMESH_Mesh.hxx"
36 #include "SMESH_HypoFilter.hxx"
37 #include "SMESH_subMesh.hxx"
39 #include "StdMeshers_LocalLength.hxx"
40 #include "StdMeshers_NumberOfSegments.hxx"
41 #include "StdMeshers_Arithmetic1D.hxx"
42 #include "StdMeshers_StartEndLength.hxx"
43 #include "StdMeshers_Deflection1D.hxx"
44 #include "StdMeshers_AutomaticLength.hxx"
46 #include "SMDS_MeshElement.hxx"
47 #include "SMDS_MeshNode.hxx"
48 #include "SMDS_EdgePosition.hxx"
50 #include "Utils_SALOME_Exception.hxx"
51 #include "utilities.h"
53 #include <BRep_Tool.hxx>
54 #include <TopoDS_Edge.hxx>
55 #include <TopoDS_Shape.hxx>
56 #include <TopTools_ListIteratorOfListOfShape.hxx>
57 #include <GeomAdaptor_Curve.hxx>
58 #include <GCPnts_AbscissaPoint.hxx>
59 #include <GCPnts_UniformAbscissa.hxx>
60 #include <GCPnts_UniformDeflection.hxx>
61 #include <Standard_ErrorHandler.hxx>
62 #include <Precision.hxx>
63 #include <Expr_GeneralExpression.hxx>
64 #include <Expr_NamedUnknown.hxx>
65 #include <Expr_Array1OfNamedUnknown.hxx>
66 #include <TColStd_Array1OfReal.hxx>
67 #include <ExprIntrp_GenExp.hxx>
75 //=============================================================================
79 //=============================================================================
81 StdMeshers_Regular_1D::StdMeshers_Regular_1D(int hypId, int studyId,
82 SMESH_Gen * gen):SMESH_1D_Algo(hypId, studyId, gen)
84 MESSAGE("StdMeshers_Regular_1D::StdMeshers_Regular_1D");
86 _shapeType = (1 << TopAbs_EDGE);
88 _compatibleHypothesis.push_back("LocalLength");
89 _compatibleHypothesis.push_back("NumberOfSegments");
90 _compatibleHypothesis.push_back("StartEndLength");
91 _compatibleHypothesis.push_back("Deflection1D");
92 _compatibleHypothesis.push_back("Arithmetic1D");
93 _compatibleHypothesis.push_back("AutomaticLength");
95 _compatibleHypothesis.push_back("QuadraticMesh"); // auxiliary !!!
98 //=============================================================================
102 //=============================================================================
104 StdMeshers_Regular_1D::~StdMeshers_Regular_1D()
108 //=============================================================================
112 //=============================================================================
114 bool StdMeshers_Regular_1D::CheckHypothesis
116 const TopoDS_Shape& aShape,
117 SMESH_Hypothesis::Hypothesis_Status& aStatus)
120 _quadraticMesh = false;
122 const bool ignoreAuxiliaryHyps = false;
123 const list <const SMESHDS_Hypothesis * > & hyps =
124 GetUsedHypothesis(aMesh, aShape, ignoreAuxiliaryHyps);
126 // find non-auxiliary hypothesis
127 const SMESHDS_Hypothesis *theHyp = 0;
128 list <const SMESHDS_Hypothesis * >::const_iterator h = hyps.begin();
129 for ( ; h != hyps.end(); ++h ) {
130 if ( static_cast<const SMESH_Hypothesis*>(*h)->IsAuxiliary() ) {
131 if ( strcmp( "QuadraticMesh", (*h)->GetName() ) == 0 )
132 _quadraticMesh = true;
136 theHyp = *h; // use only the first non-auxiliary hypothesis
142 aStatus = SMESH_Hypothesis::HYP_MISSING;
143 return false; // can't work without a hypothesis
146 string hypName = theHyp->GetName();
148 if (hypName == "LocalLength")
150 const StdMeshers_LocalLength * hyp =
151 dynamic_cast <const StdMeshers_LocalLength * >(theHyp);
153 _value[ BEG_LENGTH_IND ] = _value[ END_LENGTH_IND ] = hyp->GetLength();
154 ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
155 _hypType = LOCAL_LENGTH;
156 aStatus = SMESH_Hypothesis::HYP_OK;
159 else if (hypName == "NumberOfSegments")
161 const StdMeshers_NumberOfSegments * hyp =
162 dynamic_cast <const StdMeshers_NumberOfSegments * >(theHyp);
164 _ivalue[ NB_SEGMENTS_IND ] = hyp->GetNumberOfSegments();
165 ASSERT( _ivalue[ NB_SEGMENTS_IND ] > 0 );
166 _ivalue[ DISTR_TYPE_IND ] = (int) hyp->GetDistrType();
167 switch (_ivalue[ DISTR_TYPE_IND ])
169 case StdMeshers_NumberOfSegments::DT_Scale:
170 _value[ SCALE_FACTOR_IND ] = hyp->GetScaleFactor();
172 case StdMeshers_NumberOfSegments::DT_TabFunc:
173 _vvalue[ TAB_FUNC_IND ] = hyp->GetTableFunction();
175 case StdMeshers_NumberOfSegments::DT_ExprFunc:
176 _svalue[ EXPR_FUNC_IND ] = hyp->GetExpressionFunction();
178 case StdMeshers_NumberOfSegments::DT_Regular:
184 if (_ivalue[ DISTR_TYPE_IND ] == StdMeshers_NumberOfSegments::DT_TabFunc ||
185 _ivalue[ DISTR_TYPE_IND ] == StdMeshers_NumberOfSegments::DT_ExprFunc)
186 _ivalue[ CONV_MODE_IND ] = hyp->ConversionMode();
187 _hypType = NB_SEGMENTS;
188 aStatus = SMESH_Hypothesis::HYP_OK;
191 else if (hypName == "Arithmetic1D")
193 const StdMeshers_Arithmetic1D * hyp =
194 dynamic_cast <const StdMeshers_Arithmetic1D * >(theHyp);
196 _value[ BEG_LENGTH_IND ] = hyp->GetLength( true );
197 _value[ END_LENGTH_IND ] = hyp->GetLength( false );
198 ASSERT( _value[ BEG_LENGTH_IND ] > 0 && _value[ END_LENGTH_IND ] > 0 );
199 _hypType = ARITHMETIC_1D;
200 aStatus = SMESH_Hypothesis::HYP_OK;
203 else if (hypName == "StartEndLength")
205 const StdMeshers_StartEndLength * hyp =
206 dynamic_cast <const StdMeshers_StartEndLength * >(theHyp);
208 _value[ BEG_LENGTH_IND ] = hyp->GetLength( true );
209 _value[ END_LENGTH_IND ] = hyp->GetLength( false );
210 ASSERT( _value[ BEG_LENGTH_IND ] > 0 && _value[ END_LENGTH_IND ] > 0 );
211 _hypType = BEG_END_LENGTH;
212 aStatus = SMESH_Hypothesis::HYP_OK;
215 else if (hypName == "Deflection1D")
217 const StdMeshers_Deflection1D * hyp =
218 dynamic_cast <const StdMeshers_Deflection1D * >(theHyp);
220 _value[ DEFLECTION_IND ] = hyp->GetDeflection();
221 ASSERT( _value[ DEFLECTION_IND ] > 0 );
222 _hypType = DEFLECTION;
223 aStatus = SMESH_Hypothesis::HYP_OK;
226 else if (hypName == "AutomaticLength")
228 StdMeshers_AutomaticLength * hyp = const_cast<StdMeshers_AutomaticLength *>
229 (dynamic_cast <const StdMeshers_AutomaticLength * >(theHyp));
231 _value[ BEG_LENGTH_IND ] = _value[ END_LENGTH_IND ] = hyp->GetLength( &aMesh, aShape );
232 ASSERT( _value[ BEG_LENGTH_IND ] > 0 );
233 _hypType = LOCAL_LENGTH;
234 aStatus = SMESH_Hypothesis::HYP_OK;
237 aStatus = SMESH_Hypothesis::HYP_INCOMPATIBLE;
239 return ( _hypType != NONE );
242 //=======================================================================
243 //function : compensateError
244 //purpose : adjust theParams so that the last segment length == an
245 //=======================================================================
247 static void compensateError(double a1, double an,
248 double U1, double Un,
250 GeomAdaptor_Curve& C3d,
251 list<double> & theParams)
253 int i, nPar = theParams.size();
254 if ( a1 + an < length && nPar > 1 )
256 list<double>::reverse_iterator itU = theParams.rbegin();
258 // dist from the last point to the edge end <Un>, it should be equal <an>
259 double Ln = GCPnts_AbscissaPoint::Length( C3d, Ul, Un );
260 double dLn = an - Ln; // error of <an>
261 if ( Abs( dLn ) <= Precision::Confusion() )
263 double dU = Abs( Ul - *itU ); // parametric length of the last but one segment
264 double dUn = dLn * Abs( Un - U1 ) / length; // parametric error of <an>
265 if ( dUn < 0.5 * dU ) { // last segment is a bit shorter than it should
266 dUn = -dUn; // move the last parameter to the edge beginning
268 else { // last segment is much shorter than it should -> remove the last param and
269 theParams.pop_back(); nPar--; // move the rest points toward the edge end
270 Ln = GCPnts_AbscissaPoint::Length( C3d, theParams.back(), Un );
271 dUn = ( an - Ln ) * Abs( Un - U1 ) / length;
272 if ( dUn < 0.5 * dU )
277 double q = dUn / ( nPar - 1 );
278 for ( itU = theParams.rbegin(), i = 1; i < nPar; itU++, i++ ) {
285 static bool computeParamByFunc(Adaptor3d_Curve& C3d, double first, double last,
286 double length, bool theReverse,
287 int nbSeg, Function& func,
288 list<double>& theParams)
290 OSD::SetSignal( true );
295 MESSAGE( "computeParamByFunc" );
297 int nbPnt = 1 + nbSeg;
298 vector<double> x(nbPnt, 0.);
300 if( !buildDistribution( func, 0.0, 1.0, nbSeg, x, 1E-4 ) )
303 MESSAGE( "Points:\n" );
305 for( int i=0; i<=nbSeg; i++ )
307 sprintf( buf, "%f\n", float(x[i] ) );
313 // apply parameters in range [0,1] to the space of the curve
314 double prevU = first;
321 for( int i = 1; i < nbSeg; i++ )
323 double curvLength = length * (x[i] - x[i-1]) * sign;
324 GCPnts_AbscissaPoint Discret( C3d, curvLength, prevU );
325 if ( !Discret.IsDone() )
327 double U = Discret.Parameter();
328 if ( U > first && U < last )
329 theParams.push_back( U );
337 //=============================================================================
341 //=============================================================================
342 bool StdMeshers_Regular_1D::computeInternalParameters(const TopoDS_Edge& theEdge,
343 list<double> & theParams,
344 const bool theReverse) const
349 Handle(Geom_Curve) Curve = BRep_Tool::Curve(theEdge, f, l);
350 GeomAdaptor_Curve C3d (Curve, f, l);
352 double length = EdgeLength(theEdge);
360 if ( _hypType == LOCAL_LENGTH )
362 // Local Length hypothesis
363 double nbseg = ceil(length / _value[ BEG_LENGTH_IND ]); // integer sup
365 nbseg = 1; // degenerated edge
366 eltSize = length / nbseg;
370 // Number Of Segments hypothesis
371 int NbSegm = _ivalue[ NB_SEGMENTS_IND ];
372 if ( NbSegm < 1 ) return false;
373 if ( NbSegm == 1 ) return true;
375 switch (_ivalue[ DISTR_TYPE_IND ])
377 case StdMeshers_NumberOfSegments::DT_Scale:
379 double scale = _value[ SCALE_FACTOR_IND ];
381 if (fabs(scale - 1.0) < Precision::Confusion()) {
382 // special case to avoid division on zero
383 for (int i = 1; i < NbSegm; i++) {
384 double param = f + (l - f) * i / NbSegm;
385 theParams.push_back( param );
388 // general case of scale distribution
392 double alpha = pow(scale, 1.0 / (NbSegm - 1));
393 double factor = (l - f) / (1.0 - pow(alpha, NbSegm));
395 for (int i = 1; i < NbSegm; i++) {
396 double param = f + factor * (1.0 - pow(alpha, i));
397 theParams.push_back( param );
403 case StdMeshers_NumberOfSegments::DT_TabFunc:
405 FunctionTable func(_vvalue[ TAB_FUNC_IND ], _ivalue[ CONV_MODE_IND ]);
406 return computeParamByFunc(C3d, f, l, length, theReverse,
407 _ivalue[ NB_SEGMENTS_IND ], func,
411 case StdMeshers_NumberOfSegments::DT_ExprFunc:
413 FunctionExpr func(_svalue[ EXPR_FUNC_IND ].c_str(), _ivalue[ CONV_MODE_IND ]);
414 return computeParamByFunc(C3d, f, l, length, theReverse,
415 _ivalue[ NB_SEGMENTS_IND ], func,
419 case StdMeshers_NumberOfSegments::DT_Regular:
420 eltSize = length / _ivalue[ NB_SEGMENTS_IND ];
426 GCPnts_UniformAbscissa Discret(C3d, eltSize, f, l);
427 if ( !Discret.IsDone() )
430 int NbPoints = Discret.NbPoints();
431 for ( int i = 2; i < NbPoints; i++ )
433 double param = Discret.Parameter(i);
434 theParams.push_back( param );
436 compensateError( eltSize, eltSize, f, l, length, C3d, theParams ); // for PAL9899
440 case BEG_END_LENGTH: {
442 // geometric progression: SUM(n) = ( a1 - an * q ) / ( 1 - q ) = length
444 double a1 = _value[ BEG_LENGTH_IND ];
445 double an = _value[ END_LENGTH_IND ];
446 double q = ( length - a1 ) / ( length - an );
448 double U1 = theReverse ? l : f;
449 double Un = theReverse ? f : l;
451 double eltSize = theReverse ? -a1 : a1;
453 // computes a point on a curve <C3d> at the distance <eltSize>
454 // from the point of parameter <param>.
455 GCPnts_AbscissaPoint Discret( C3d, eltSize, param );
456 if ( !Discret.IsDone() ) break;
457 param = Discret.Parameter();
458 if ( param > f && param < l )
459 theParams.push_back( param );
464 compensateError( a1, an, U1, Un, length, C3d, theParams );
468 case ARITHMETIC_1D: {
470 // arithmetic progression: SUM(n) = ( an - a1 + q ) * ( a1 + an ) / ( 2 * q ) = length
472 double a1 = _value[ BEG_LENGTH_IND ];
473 double an = _value[ END_LENGTH_IND ];
475 double q = ( an - a1 ) / ( 2 *length/( a1 + an ) - 1 );
476 int n = int( 1 + ( an - a1 ) / q );
478 double U1 = theReverse ? l : f;
479 double Un = theReverse ? f : l;
486 while ( n-- > 0 && eltSize * ( Un - U1 ) > 0 ) {
487 // computes a point on a curve <C3d> at the distance <eltSize>
488 // from the point of parameter <param>.
489 GCPnts_AbscissaPoint Discret( C3d, eltSize, param );
490 if ( !Discret.IsDone() ) break;
491 param = Discret.Parameter();
492 if ( param > f && param < l )
493 theParams.push_back( param );
498 compensateError( a1, an, U1, Un, length, C3d, theParams );
505 GCPnts_UniformDeflection Discret(C3d, _value[ DEFLECTION_IND ], f, l, true);
506 if ( !Discret.IsDone() )
509 int NbPoints = Discret.NbPoints();
510 for ( int i = 2; i < NbPoints; i++ )
512 double param = Discret.Parameter(i);
513 theParams.push_back( param );
525 //=============================================================================
529 //=============================================================================
531 bool StdMeshers_Regular_1D::Compute(SMESH_Mesh & aMesh, const TopoDS_Shape & aShape)
533 MESSAGE("StdMeshers_Regular_1D::Compute");
535 if ( _hypType == NONE )
538 SMESHDS_Mesh * meshDS = aMesh.GetMeshDS();
539 aMesh.GetSubMesh(aShape);
541 const TopoDS_Edge & EE = TopoDS::Edge(aShape);
542 TopoDS_Edge E = TopoDS::Edge(EE.Oriented(TopAbs_FORWARD));
543 int shapeID = meshDS->ShapeToIndex( E );
546 Handle(Geom_Curve) Curve = BRep_Tool::Curve(E, f, l);
548 TopoDS_Vertex VFirst, VLast;
549 TopExp::Vertices(E, VFirst, VLast); // Vfirst corresponds to f and Vlast to l
551 ASSERT(!VFirst.IsNull());
552 SMDS_NodeIteratorPtr lid= aMesh.GetSubMesh(VFirst)->GetSubMeshDS()->GetNodes();
555 MESSAGE (" NO NODE BUILT ON VERTEX ");
558 const SMDS_MeshNode * idFirst = lid->next();
560 ASSERT(!VLast.IsNull());
561 lid=aMesh.GetSubMesh(VLast)->GetSubMeshDS()->GetNodes();
563 MESSAGE (" NO NODE BUILT ON VERTEX ");
566 const SMDS_MeshNode * idLast = lid->next();
568 if (!Curve.IsNull()) {
569 list< double > params;
570 bool reversed = false;
571 if ( !_mainEdge.IsNull() )
572 reversed = aMesh.IsReversedInChain( EE, _mainEdge );
574 if ( ! computeInternalParameters( E, params, reversed )) {
575 //cout << "computeInternalParameters() failed" <<endl;
579 catch ( Standard_Failure ) {
580 //cout << "computeInternalParameters() failed, Standard_Failure" <<endl;
584 // edge extrema (indexes : 1 & NbPoints) already in SMDS (TopoDS_Vertex)
585 // only internal nodes receive an edge position with param on curve
587 const SMDS_MeshNode * idPrev = idFirst;
595 for (list<double>::iterator itU = params.begin(); itU != params.end(); itU++) {
597 gp_Pnt P = Curve->Value(param);
599 //Add the Node in the DataStructure
600 SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
601 meshDS->SetNodeOnEdge(node, shapeID, param);
604 // create medium node
605 double prm = ( parPrev + param )/2;
606 gp_Pnt PM = Curve->Value(prm);
607 SMDS_MeshNode * NM = meshDS->AddNode(PM.X(), PM.Y(), PM.Z());
608 meshDS->SetNodeOnEdge(NM, shapeID, prm);
609 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, node, NM);
610 meshDS->SetMeshElementOnShape(edge, shapeID);
613 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, node);
614 meshDS->SetMeshElementOnShape(edge, shapeID);
621 double prm = ( parPrev + parLast )/2;
622 gp_Pnt PM = Curve->Value(prm);
623 SMDS_MeshNode * NM = meshDS->AddNode(PM.X(), PM.Y(), PM.Z());
624 meshDS->SetNodeOnEdge(NM, shapeID, prm);
625 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, idLast, NM);
626 meshDS->SetMeshElementOnShape(edge, shapeID);
629 SMDS_MeshEdge* edge = meshDS->AddEdge(idPrev, idLast);
630 meshDS->SetMeshElementOnShape(edge, shapeID);
634 // Edge is a degenerated Edge : We put n = 5 points on the edge.
635 const int NbPoints = 5;
636 BRep_Tool::Range(E, f, l);
637 double du = (l - f) / (NbPoints - 1);
638 //MESSAGE("************* Degenerated edge! *****************");
640 TopoDS_Vertex V1, V2;
641 TopExp::Vertices(E, V1, V2);
642 gp_Pnt P = BRep_Tool::Pnt(V1);
644 const SMDS_MeshNode * idPrev = idFirst;
645 for (int i = 2; i < NbPoints; i++) {
646 double param = f + (i - 1) * du;
647 SMDS_MeshNode * node = meshDS->AddNode(P.X(), P.Y(), P.Z());
649 // create medium node
650 double prm = param - du/2.;
651 SMDS_MeshNode * NM = meshDS->AddNode(P.X(), P.Y(), P.Z());
652 meshDS->SetNodeOnEdge(NM, shapeID, prm);
653 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, node, NM);
654 meshDS->SetMeshElementOnShape(edge, shapeID);
657 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, node);
658 meshDS->SetMeshElementOnShape(edge, shapeID);
660 meshDS->SetNodeOnEdge(node, shapeID, param);
664 // create medium node
665 double prm = l - du/2.;
666 SMDS_MeshNode * NM = meshDS->AddNode(P.X(), P.Y(), P.Z());
667 meshDS->SetNodeOnEdge(NM, shapeID, prm);
668 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, idLast, NM);
669 meshDS->SetMeshElementOnShape(edge, shapeID);
672 SMDS_MeshEdge * edge = meshDS->AddEdge(idPrev, idLast);
673 meshDS->SetMeshElementOnShape(edge, shapeID);
679 //=============================================================================
681 * See comments in SMESH_Algo.cxx
683 //=============================================================================
685 const list <const SMESHDS_Hypothesis *> &
686 StdMeshers_Regular_1D::GetUsedHypothesis(SMESH_Mesh & aMesh,
687 const TopoDS_Shape & aShape,
688 const bool ignoreAuxiliary)
690 _usedHypList.clear();
693 SMESH_HypoFilter auxiliaryFilter, compatibleFilter;
694 auxiliaryFilter.Init( SMESH_HypoFilter::IsAuxiliary() );
695 const bool ignoreAux = true;
696 InitCompatibleHypoFilter( compatibleFilter, ignoreAux );
698 // get non-auxiliary assigned to aShape
699 int nbHyp = aMesh.GetHypotheses( aShape, compatibleFilter, _usedHypList, false );
703 // Check, if propagated from some other edge
704 if (aShape.ShapeType() == TopAbs_EDGE &&
705 aMesh.IsPropagatedHypothesis(aShape, _mainEdge))
707 // Propagation of 1D hypothesis from <aMainEdge> on this edge;
708 // get non-auxiliary assigned to _mainEdge
709 nbHyp = aMesh.GetHypotheses( _mainEdge, compatibleFilter, _usedHypList, true );
713 if (nbHyp == 0) // nothing propagated nor assigned to aShape
715 SMESH_Algo::GetUsedHypothesis( aMesh, aShape, ignoreAuxiliary );
716 nbHyp = _usedHypList.size();
720 // get auxiliary hyps from aShape
721 aMesh.GetHypotheses( aShape, auxiliaryFilter, _usedHypList, true );
723 if ( nbHyp > 1 && ignoreAuxiliary )
724 _usedHypList.clear(); //only one compatible non-auxiliary hypothesis allowed
729 //=============================================================================
733 //=============================================================================
735 ostream & StdMeshers_Regular_1D::SaveTo(ostream & save)
740 //=============================================================================
744 //=============================================================================
746 istream & StdMeshers_Regular_1D::LoadFrom(istream & load)
751 //=============================================================================
755 //=============================================================================
757 ostream & operator <<(ostream & save, StdMeshers_Regular_1D & hyp)
759 return hyp.SaveTo( save );
762 //=============================================================================
766 //=============================================================================
768 istream & operator >>(istream & load, StdMeshers_Regular_1D & hyp)
770 return hyp.LoadFrom( load );