\ref MEDCoupling "MEDCoupling namespace".
The true parallel functionalities of the \ref library "MED library" are detailed here: \ref parallel
-The memory management of the various strucutres is eased by the class
+The memory management of the various structures is eased by the class
\ref MEDCoupling::MCAuto "MCAuto". It acts as an auto pointer and takes care of deleting the
memory automatically when going out of scope. See an example usage in \ref cpp_mcfielddouble_WriteVTK .
Beware however that not all functions return a pointer that should be deleted when going out of scope.
\image html SampGeo2D1.png "An example of intersection of 2 polygons."
\image latex SampGeo2D1.eps "An example of intersection of 2 polygons."
-After \ref interpkernelGeo2DBoolOpStep1 "spliting process" \a P1 has 6 edges and \a P2 has 6 edges too.
+After \ref interpkernelGeo2DBoolOpStep1 "splitting process" \a P1 has 6 edges and \a P2 has 6 edges too.
\anchor interpkernelGeo2DEx2
-\image html SampGeo2D2.png "After spliting process two edges of P1 have been located has out."
-\image latex SampGeo2D2.eps "After spliting process two edges of P1 have been located has out."
+\image html SampGeo2D2.png "After splitting process two edges of P1 have been located has out."
+\image latex SampGeo2D2.eps "After splitting process two edges of P1 have been located has out."
\note BLUE is for OUT, GREEN for IN and RED for ON.
Some differences still exist :
-- \c setMeshAtLevel, \c setMeshAtLevelOld simply call \c setMeshAtLevelGen with repectively \c newOrOld parameter
+- \c setMeshAtLevel, \c setMeshAtLevelOld simply calls \c setMeshAtLevelGen with subsequent \c newOrOld parameter
set to true and false. These methods specify if a renumbering computation is needed or not. \c setMeshAtLevelOld is faster
than \c setMeshAtLevel because no renumbering computation is done. If the user is not warranty about the order of its meshes to enter
it is better to use \c setMeshAtLevel method.
from math import *
- # Definition of environnement variables
+ # Definition of environment variables
spaceDimension = 3
N = 4
nbOfNodes = N*N*N
* its dimension
* its number of cells
-.. note:: All this initialisation are necessary. If one lacks, you will have a segmentation fault!.
+.. note:: All this initialisation is necessary. If one is missing, you'll have a segmentation fault!.
::
Multi mesh Case
````````````````
-In spite of a MEDCoupling mesh has only one dimension, it's possible to genrate a file with multi dimension.
+In spite of a MEDCoupling mesh has only one dimension, it's possible to generate a file with multi dimension.
Therefore, you need to create as meshes as necessary dimensions.
You have to give the connectivity of the faces on the bottom face of the 3D cube: the list of the nodes which belong to the face.
/*!
* This class deals with units.
* This class has two main responsibilities :
- * - interprete units by giving simply their representation in string type.
+ * - interpret units by giving simply their representation in string type.
* - performing operations on these units.
*
* All the possible units are represented with a unique tuple with 5 elements
namespace INTERP_KERNEL
{
/*!
- * This method computes eigenvalues of a 3x3 symmetric matrix stored with 6 values in 'matrix'. The convension chosen for 'matrix' is described here:
+ * This method computes eigenvalues of a 3x3 symmetric matrix stored with 6 values in 'matrix'. The convention chosen for 'matrix' is described here:
* matrix[0]=m_xx, matrix[1]=m_yy, matrix[2]=m_zz,
* matrix[3]=m_xy, matrix[4]=m_yz, matrix[5]=m_xz
* This method returns the 3 eigenvalues in 'eigenVals'.
}
/*!
- * This method computes one eigenvector of a 3x3 symmetric matrix stored with 6 values in 'matrix'. The convension chosen for 'matrix' is described here:
+ * This method computes one eigenvector of a 3x3 symmetric matrix stored with 6 values in 'matrix'. The convention chosen for 'matrix' is described here:
* matrix[0]=m_xx, matrix[1]=m_yy, matrix[2]=m_zz,
* matrix[3]=m_xy, matrix[4]=m_yz, matrix[5]=m_xz
* This method returns the eigenvector of the corresponding eigenvalue in 'eigenVal'. The returned eigenValue is normalized.
/*!
* This method is trying to permute the connectivity of 'oppFace' face so that the k_th node of 'baseFace' is associated to the
* k_th node in retConnOfOppFace. Excluded faces 'baseFace' and 'oppFace' all the other faces in 'conn' must be QUAD4 faces.
- * If the arragement process succeeds true is returned and retConnOfOppFace is filled.
+ * If the arrangement process succeeds true is returned and retConnOfOppFace is filled.
*/
bool CellSimplify::tryToArrangeOppositeFace(const int *conn, int lgth, int lgthBaseFace, const int *baseFace, const int *oppFace, int nbOfFaces, int *retConnOfOppFace)
{
double t11 = T22, t12 = -T12, t21 = -T21, t22 = T11;
// vector
double r11 = p[0]-triaCoords[2*SPACEDIM], r12 = p[1]-triaCoords[2*SPACEDIM+1];
- // barycentric coordinates: mutiply matrix by vector
+ // barycentric coordinates: multiply matrix by vector
bc[0] = (t11 * r11 + t12 * r12)/Tdet;
bc[1] = (t21 * r11 + t22 * r12)/Tdet;
bc[2] = 1. - bc[0] - bc[1];
double t11 = T22, t12 = -T12, t21 = -T21, t22 = T11;
// vector
double r11 = p[_XX]-n[2][_XX], r12 = p[_YY]-n[2][_YY];
- // barycentric coordinates: mutiply matrix by vector
+ // barycentric coordinates: multiply matrix by vector
bc[0] = (t11 * r11 + t12 * r12)/Tdet;
bc[1] = (t21 * r11 + t22 * r12)/Tdet;
bc[2] = 1. - bc[0] - bc[1];
(XA[0]*XB[1]-XA[1]*XB[0])*XC[2];
}
- /*! Subroutine of checkEqualPolygins that tests if two list of nodes (not necessarily distincts) describe the same polygon, assuming they share a comon point.*/
+ /*! Subroutine of checkEqualPolygins that tests if two list of nodes (not necessarily distincts) describe the same polygon, assuming they share a common point.*/
/*! Indexes istart1 and istart2 designate two points P1 in L1 and P2 in L2 that have identical coordinates. Generally called with istart1=0.*/
/*! Integer sign ( 1 or -1) indicate the direction used in going all over L2. */
template<class T, int dim>
/*!
* This method allows to compute, if needed, the packed nodal connectivity pair.
- * Indeed, it is possible to store in \a this a nodal connectivity array bigger than ranges convered by nodal connectivity index array.
+ * Indeed, it is possible to store in \a this a nodal connectivity array bigger than ranges covered by nodal connectivity index array.
* It is typically the case when nodalConnIndx starts with an id greater than 0, and finishes with id less than number of tuples in \c this->_conn.
*
* If \a this looks packed (the front of nodal connectivity index equal to 0 and back of connectivity index equal to number of tuple of nodal connectivity array)
void MEDCouplingFieldDiscretizationGauss::getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const
{
- throw INTERP_KERNEL::Exception("getValueOnPos(i,j,k) : Not applyable for Gauss points !");
+ throw INTERP_KERNEL::Exception("getValueOnPos(i,j,k) : Not applicable for Gauss points !");
}
DataArrayDouble *MEDCouplingFieldDiscretizationGauss::getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const
void MEDCouplingFieldDiscretizationGaussNE::getValueOnPos(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, int i, int j, int k, double *res) const
{
- throw INTERP_KERNEL::Exception("getValueOnPos(i,j,k) : Not applyable for Gauss points !");
+ throw INTERP_KERNEL::Exception("getValueOnPos(i,j,k) : Not applicable for Gauss points !");
}
DataArrayDouble *MEDCouplingFieldDiscretizationGaussNE::getValueOnMulti(const DataArrayDouble *arr, const MEDCouplingMesh *mesh, const double *loc, int nbOfPoints) const
/*!
* Computes the doubly contracted product of every tensor defined by the tuple of \a this
- * array contating 6 components.
+ * array containing 6 components.
* \return DataArrayDouble * - the new instance of DataArrayDouble, whose each tuple
* is calculated from the tuple <em>(t)</em> of \a this array as follows:
* \f$ t[0]^2+t[1]^2+t[2]^2+2*t[3]^2+2*t[4]^2+2*t[5]^2\f$.
/*!
* Computes distribution of values of \a this one-dimensional array between given value
- * ranges (casts). This method is typically useful for entity number spliting by types,
+ * ranges (casts). This method is typically useful for entity number splitting by types,
* for example.
* \warning The values contained in \a arrBg should be sorted ascendently. No
* check of this is be done. If not, the result is not warranted.
* If this method has correctly worked, \a this will be able to be considered as a linked list.
* This method does nothing if number of tuples is lower of equal to 1.
*
- * This method is useful for users having an unstructured mesh having only SEG2 to rearrange internaly the connectibity without any coordinates consideration.
+ * This method is useful for users having an unstructured mesh having only SEG2 to rearrange internally the connectibity without any coordinates consideration.
*
* \sa MEDCouplingUMesh::orderConsecutiveCells1D, DataArrayInt::fromLinkedListOfPairToList
*/
* std::distance( \a nodeStBg, \a nodeStEnd ) is equal to the space dimension. The returned value is equal to
* the meshDimension (or the zipped spaceDimension).
*
- * \param [out] zipNodeSt - The zipped node strucutre
+ * \param [out] zipNodeSt - The zipped node structure
* \return int - the
*/
int MEDCouplingStructuredMesh::ZipNodeStructure(const int *nodeStBg, const int *nodeStEnd, int zipNodeSt[3])
MEDCOUPLING_EXPORT TimeLabel& operator=(const TimeLabel& other);
//! This method should be called when write access has been done on this.
MEDCOUPLING_EXPORT void declareAsNew() const;
- //! This method should be called on high level classes as Field or Mesh to take into acount modifications done in aggregates objects.
+ //! This method should be called on high level classes as Field or Mesh to take into account modifications done in aggregates objects.
MEDCOUPLING_EXPORT virtual void updateTime() const = 0;
MEDCOUPLING_EXPORT std::size_t getTimeOfThis() const { return _time; }
protected:
/*!
* This method computes the micro edges constituting each cell in \a this. Micro edge is an edge for non quadratic cells. Micro edge is an half edge for quadratic cells.
- * This method works for both meshes with mesh dimenstion equal to 2 or 3. Dynamical cells are not supported (polygons, polyhedrons...)
+ * This method works for both meshes with mesh dimension equal to 2 or 3. Dynamical cells are not supported (polygons, polyhedrons...)
*
* \sa explode3DMeshTo1D, buildDescendingConnectiviy
*/
/*!
* Returns a new DataArrayDouble holding barycenters of all cells. The barycenter is
* computed by averaging coordinates of cell nodes, so this method is not a right
- * choice for degnerated meshes (not well oriented, cells with measure close to zero).
+ * choice for degenerated meshes (not well oriented, cells with measure close to zero).
* \return DataArrayDouble * - a new instance of DataArrayDouble, of size \a
* this->getNumberOfCells() tuples per \a this->getSpaceDimension()
* components. The caller is to delete this array using decrRef() as it is
* \param [out] subDiv2 - for each cell in \a m2Desc returns nodes that split it using convention \a m1Desc first, then \a m2Desc, then addCoo
* \param [out] colinear2 - for each cell in \a m2Desc returns the edges in \a m1Desc that are colinear to it.
* \param [out] addCoo - nodes to be append at the end
- * \param [out] mergedNodes - gives all pair of nodes of \a m2Desc that have same location than some nodes in \a m1Desc. key is id in \a m2Desc offseted and value is id in \a m1Desc.
+ * \param [out] mergedNodes - gives all pair of nodes of \a m2Desc that have same location than some nodes in \a m1Desc. key is id in \a m2Desc offsetted and value is id in \a m1Desc.
*/
void MEDCouplingUMesh::Intersect1DMeshes(const MEDCouplingUMesh *m1Desc, const MEDCouplingUMesh *m2Desc, double eps,
std::vector< std::vector<int> >& intersectEdge1, std::vector< std::vector<int> >& colinear2, std::vector< std::vector<int> >& subDiv2, std::vector<double>& addCoo, std::map<int,int>& mergedNodes)
/*!
* \b WARNING this method is \b potentially \b non \b const (if returned array is empty).
* \b WARNING this method lead to have a non geometric type sorted mesh (for MED file users) !
- * This method performs a conformization of \b this. So if a edge in \a this can be split into entire edges in \a this this method
+ * This method performs a conformization of \b this. So if a edge in \a this can be split into entire edges in \a this method
* will suppress such edges to use sub edges in \a this. So this method does not add nodes in \a this if merged edges are both linear (INTERP_KERNEL::NORM_SEG2).
* In the other cases new nodes can be created. If any are created, they will be appended at the end of the coordinates object before the invocation of this method.
*
}
/*!
- * This method performs a sub splitting as splitDiscretizations does but finer. This is the finest spliting level that can be done.
+ * This method performs a sub splitting as splitDiscretizations does but finer. This is the finest splitting level that can be done.
* This method implements the minimal splitting so that each returned elements are mono Gauss discretization per geometric type.
*
* \sa splitDiscretizations
/*!
* This method is an extension of MEDFileFieldPerMesh::finishField method. It deals with profiles. This method should be called when type is different from ON_NODES.
* 'dads', 'locs' and 'geoTypes' input parameters have the same number of elements.
- * No check of this is performed. 'da' array contains an array in old2New style to be applyied to mesh to obtain the right support.
+ * No check of this is performed. 'da' array contains an array in old2New style to be applied to mesh to obtain the right support.
* The order of cells in the returned field is those imposed by the profile.
* \param [in] mesh is the global mesh.
*/
else
{
std::ostringstream oss; oss << "MEDFileFieldPerMesh::finishFieldNode2 : The field on nodes lies on a node profile so that it is impossible to find a submesh having exactly the same nodes of that profile !!!";
- oss << "So it is impossible to return a well definied MEDCouplingFieldDouble instance on specified mesh on a specified meshDim !" << std::endl;
+ oss << "So it is impossible to return a well defined MEDCouplingFieldDouble instance on specified mesh on a specified meshDim !" << std::endl;
oss << "To retrieve correctly such a field you have 3 possibilities :" << std::endl;
oss << " - use an another meshDim compatible with the field on nodes (MED file does not have such information)" << std::endl;
oss << " - use an another a meshDimRelToMax equal to 1 -> it will return a mesh with artificial cell POINT1 containing the profile !" << std::endl;
* Returns names of all families of \a this mesh but like they would be in file.
* This method is here only for MED file families gurus. If you are a kind user forget this method :-)
* This method is only useful for aggressive users that want to have in their file a same family lying both on cells and on nodes. This is not a good idea for lisibility !
- * For your information internaly in memory such families are renamed to have a nicer API.
+ * For your information internally in memory such families are renamed to have a nicer API.
*/
std::vector<std::string> MEDFileMesh::getFamiliesNamesWithFilePointOfView() const
{
std::vector<int> levs=getNonEmptyLevels();
if(std::find(levs.begin(),levs.end(),0)==levs.end() || std::find(levs.begin(),levs.end(),-1)==levs.end())
- throw INTERP_KERNEL::Exception("MEDFileUMesh::buildInnerBoundaryAlongM1Group : This method works only for mesh definied on level 0 and -1 !");
+ throw INTERP_KERNEL::Exception("MEDFileUMesh::buildInnerBoundaryAlongM1Group : This method works only for mesh defined on level 0 and -1 !");
MUMesh m0=getMeshAtLevel(0);
MUMesh m1=getMeshAtLevel(-1);
int nbNodes=m0->getNumberOfNodes();
}
}
std::ostringstream oss;
- oss << "MEDFileMeshSupports::getSupMeshWithName : no such name \"" << name << "\". Possibilitities are :";
+ oss << "MEDFileMeshSupports::getSupMeshWithName : no such name \"" << name << "\". Possibilities are :";
std::copy(mns.begin(),mns.end(),std::ostream_iterator<std::string>(oss,","));
oss << " !";
throw INTERP_KERNEL::Exception(oss.str());
struct Cell
{
std::vector< Node* > _nodes;
- mutable bool _reverse; // to reverse orienation of a face only
+ mutable bool _reverse; // to reverse orientation of a face only
mutable TID* _sortedNodeIDs; // for comparison
mutable TID _number;
MCAuto< MEDCouplingMesh > mesh = _fileMesh->getMeshAtLevel( 1 );
MCAuto< MEDCouplingUMesh > umesh = mesh->buildUnstructured();
- // write the index connecting nodes with their coodrinates
+ // write the index connecting nodes with their coordinates
const int nbNodes = umesh->getNumberOfNodes();
*_sauvFile << " ENREGISTREMENT DE TYPE 2" << endl
d=MEDLoader.DataArrayDouble.New()
d.alloc(1,1)
d.iota(1.)
- # seting a long name
+ # setting a long name
d.setInfoOnComponent(0,"CONCENTRATION of I129")
f.setArray(d)
f.setName("field")
del tes0
#
tes1=f.getFieldOnMeshAtLevel(ON_NODES,1,m)
- self.assertEqual(ON_CELLS,tes1.getTypeOfField())# it is not a bug even if ON_NODES has been sepecified
+ self.assertEqual(ON_CELLS,tes1.getTypeOfField())# it is not a bug even if ON_NODES has been specified
self.assertEqual(0,tes1.getMesh().getMeshDimension())
self.assertEqual(2,tes1.getMesh().getNumberOfCells())
self.assertEqual(135,tes1.getMesh().getNumberOfNodes())
pass
#
tes3=f.getFieldOnMeshAtLevel(ON_NODES,1,m)
- self.assertEqual(ON_CELLS,tes3.getTypeOfField())# it is not a bug even if ON_NODES has been sepecified
+ self.assertEqual(ON_CELLS,tes3.getTypeOfField())# it is not a bug even if ON_NODES has been specified
self.assertEqual(0,tes3.getMesh().getMeshDimension())
self.assertEqual(2,tes3.getMesh().getNumberOfCells())
self.assertEqual(135,tes3.getMesh().getNumberOfNodes())
pass
def testMEDFileUMeshLoadPart1(self):
- """ This method tests MEDFileUMesh.LoadPart that loads only a part of a specified mesh in a MED file. The part is specfied using a slice of cell ids. Only nodes on which cells lies are loaded to reduce at most the amount of
+ """ This method tests MEDFileUMesh.LoadPart that loads only a part of a specified mesh in a MED file. The part is specified using a slice of cell ids. Only nodes on which cells lies are loaded to reduce at most the amount of
memory of the returned instance.
"""
fileName="Pyfile81.med"
mml2=mml.prepare()
self.assertTrue(isinstance(mml2,MEDCurveLinearMeshMultiLev)) # here the 2nd support is a part of CMesh that is also a CMesh -> CMesh not a UMesh
a,b,c=mml2.buildVTUArrays()
- self.assertTrue(not c)#False here because a is the result of a computation not the internal strucutre
+ self.assertTrue(not c)#False here because a is the result of a computation not the internal structure
self.assertTrue(a.isEqual(a0Exp[pfl2],1e-12))
self.assertEqual(b,[3,3])
a6,a7=mml2.retrieveFamilyIdsOnCells()
pass
allFMTSLeavesToDisplay.append(allFMTSLeavesToDisplay2)
pass
- # Here 2 MED fields in input and at the end 5 ! 1+4 ! 4 fields have been built from zeField0 due to subspliting per dis / per geo type
+ # Here 2 MED fields in input and at the end 5 ! 1+4 ! 4 fields have been built from zeField0 due to subsplitting per dis / per geo type
self.assertEqual(len(allFMTSLeavesToDisplay),1)
self.assertEqual(len(allFMTSLeavesToDisplay[0]),5)
allFMTSLeavesPerTimeSeries=MEDFileAnyTypeFieldMultiTS.SplitIntoCommonTimeSeries(sum(allFMTSLeavesToDisplay,[]))
//updating _src_ids_zip_st2 and _src_ids_zip_st2 with received matrix.
fillSourceIdsZipReceivedForMultiply();
- // Prepare proc list for future field data exchange (mutliply()):
+ // Prepare proc list for future field data exchange (multiply()):
_proc_ids_to_send_vector_st = procsToSendField;
// Make some space on local proc:
_matrixes_st.clear();