ParametrizedArc
#
The parametrizedArc
class deals with curves that are defined from a function :
handled by a Parametrization
object. When constructing a parametrizedArc
, the following specific keys are available:
key(s) |
authorized types |
examples |
---|---|---|
|
|
|
|
|
|
|
_linearPartition, _splinePartition |
|
|
integer value |
|
As GMSH does not deal with parametrized curve, when exporting parametrizedArc
to GMSH, the curve has to be split in smaller parts (segments or splines). Each part will be also discretized according to the general keys _hsteps
or _nnodes
. _nnodes
represents the number of nodes on the arc and should be chosen greater than _nbParts
. If not, XLiFE++ adjust it to guarantee that there are two nodes by parts. There are two possibilities to set _hsteps
, either giving a unique real value that is associated to each node of the partition, or giving a vector of _nbParts
+ 1 values, each of them associated to each node of the partition.
For more details about Parametrization
, see the section The Parametrization class. The only mandatory key is _parametrization
. If not redefined _tmin
and _tmax
take the values of bounds of the parametrization, the partition is the linear one with 1 segment.
Tip
Greater is nbParts
better is the approximation of the parametrized arc.
As an illustration here is given the construction of a 2D mesh from a parametrized arc (split in 100 segments) and a segment:
Parametrization ps(0,2*pi_,x_1*cos(x_1),x_1*sin(x_1), Parameters(),"tcos(t),tsin(t)");
ParametrizedArc pa(_parametrization = ps, _partitioning=_linearPartition,
_nbParts=100,_hsteps=0.1,_domain_name="Gamma");
Segment sa(_v1=pa.p2(), _v2=pa.p1(),_hsteps=0.1,_domain_name="Sigma");
Mesh Me2(surfaceFrom(pa+sa,"Omega"), _generator=gmsh);
Note the way to get the end points of the parametrized arc that guarantee the contour is closed! The surfaceFrom()
function is explained in the following.
When the first and last points of the parametrized curve coincides, the curve is closed and can be used to build the surface enclosed:
Parametrization pe(0,2*pi_,2*cos(x_1),sin(x_1), Parameters(),"2cos(t),sin(t)");
ParametrizedArc pae(_parametrization = pe,_partitioning=_linearPartition,
_nbParts=50,_hsteps=0.1,_domain_name="Gamma");
Mesh Mee(surfaceFrom(pae), _generator=gmsh);
Hint
Parametrization of the parametrized arc is the arc parametrisation given in construction but normalize to \([0,1]\) interval.