# User options
# ============
INCLUDE(CMakeDependentOption)
-OPTION(MEDCOUPLING_MICROMED "Build MED without MED file dependancy." OFF)
+OPTION(MEDCOUPLING_MICROMED "Build MED without MED file dependency." OFF)
OPTION(MEDCOUPLING_ENABLE_PYTHON "Build PYTHON bindings." ON)
OPTION(MEDCOUPLING_ENABLE_PARTITIONER "Build MEDPartitioner." ON)
OPTION(MEDCOUPLING_ENABLE_RENUMBER "Build Renumber." ON)
# - Config file for the @PROJECT_NAME@ package
# It defines the following variables.
-# Specific to the pacakge @PROJECT_NAME@ itself:
+# Specific to the package @PROJECT_NAME@ itself:
# @PROJECT_NAME_UC@_ROOT_DIR_EXP - the root path of the installation providing this CMake file
#
f.setMesh(targetMesh)
f.setName("AFieldName")
ml.WriteField("MyFirstField.med",f,True)
- # Re-read it ans test equality
+ # Re-read it and test equality
f2 = ml.ReadFieldCell("MyFirstField.med", f.getMesh().getName(), 0, f.getName(), 7, 8)
print "Is the read field identical to 'f' ?", f2.isEqual(f,1e-12,1e-12)
# Writing in several steps
from math import *
-Then we must instanciate a meshing object::
+Then we must instantiate a meshing object::
mesh=MEDCouplingUMesh.New()
mesh.setMeshDimension(2)
Classical method
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-First instanciate a meshing object. Therefore, we need to define :
+First instantiate a meshing object. Therefore, we need to define :
* its name
* its dimension
* its values
-The field will be a sin function dependant of distance of the barycenter of each cell from origin. So we need to create a barycenter field on the 3D mesh::
+The field will be a sin function dependent of distance of the barycenter of each cell from origin. So we need to create a barycenter field on the 3D mesh::
# Creation of field : with following definition
# => Definition of the mesh support
.. image:: images/zone1Mobm.jpg
From now on we work on "zone1Mobm". We will reduce the working area of "fixm" around "zone1Mobm".
-To achive this: reduce "fixm" taking only "fixm" cells located in the bounding box of "zone1Mobm" (MEDCouplingUMesh.getBoundingBox() and MEDCouplingUMesh.getCellsInBoundingBox()).
+To achieve this: reduce "fixm" taking only "fixm" cells located in the bounding box of "zone1Mobm" (MEDCouplingUMesh.getBoundingBox() and MEDCouplingUMesh.getCellsInBoundingBox()).
Name this object "partFixm", remove its orphan nodes and display it. ::
ids2=fixm.getCellsInBoundingBox(zone1Mobm.getBoundingBox(),1e-10)
- \a -DMEDCOUPLING_PARTITIONER_METIS=ON enables metis graph library in MEDPartitioner,
- \a -DMEDCOUPLING_PARTITIONER_PARMETIS=ON enables parmetis graph library in MEDPartitioner,
- \a -DMEDCOUPLING_PARTITIONER_SCOTCH=ON enables scotch graph library in MEDPartitioner,
-- \a -DMEDCOUPLING_MICROMED=ON build MED with MED file dependancy,
+- \a -DMEDCOUPLING_MICROMED=ON build MED with MED file dependency,
- \a -DMEDCOUPLING_ENABLE_PYTHON=ON builds PYTHON bindings,
- \a -DMEDCOUPLING_ENABLE_PARTITIONER builds MEDPartitioner,
- \a -DMEDCOUPLING_ENABLE_RENUMBER builds Renumber,
The MEDLoader high level API is hence accessible:
- at the MEDCoupling namespace level in C++ (direct static functions, no more MEDLoader class)
- at the MEDLoader module level in Python. Scripts using the high level API of the MEDLoader
-typically need to get read of all the occurences of "MEDLoader." in their code.
+typically need to get read of all the occurrences of "MEDLoader." in their code.
-Note that on the Python side the module MEDLoader is still here, but doesn't containt the MEDLoader class anymore.
+Note that on the Python side the module MEDLoader is still here, but doesn't contain the MEDLoader class anymore.
As before it re-includes all of MEDCoupling classes, plus the low level MEDLoader classes (MEDFile* classes).
\section port-full-ref Name changes - Reference list
\page references References
-Here follows a list of useful references :
+Below is a list of useful references :
-# \anchor RefManualMedFile Reference Manual for Med File, V. Lefebvre, E. Fayolle, Projet PAL: Définition du modèle d'échange de données MED V2.2, Note technique EDF/SINETICS, HI-26-03-012/A, https://hammi.extra.cea.fr/static/MED/web_med/index.html
-# VTK home page: \c http://public.kitware.com/VTK
\ref medcoupling "MEDCoupling" allows to make bridges between the approaches. For example \a pfl \ref MEDCoupling::DataArrayInt "DataArrayInt instance" retrieved directly
from the file in the second approach can be retrieved starting from first approach.
-Starting from mesh \a firstApproachMesh of read field in first approach \a fread, whith the whole mesh \a wholeMesh the profile \a pflComputed can be computed :
+Starting from mesh \a firstApproachMesh of read field in first approach \a fread, with the whole mesh \a wholeMesh the profile \a pflComputed can be computed :
\snippet MEDLoaderExamplesTest.py PySnippetReadFieldPartial1_5
/*!
- \page cpp Note for C++ developpers
+ \page cpp Note for C++ developers
Using the C++ API provided by MED requires you to be familiar with some specificities which are not
visible to the Python user.
The core elements of the API are:
- \ref CommInterface-det "CommInterface", this is the wrapper around the MPI library, and an instance
of this object is required in many constructors of the following objects.
-- \ref ParaMESH-det "ParaMESH", the parallel instanciation of a \ref meshes "MEDCoupling mesh"
-- \ref ParaFIELD-det "ParaFIELD", the parallel instanciation of a \ref fields "MEDCoupling field"
+- \ref ParaMESH-det "ParaMESH", the parallel instantiation of a \ref meshes "MEDCoupling mesh"
+- \ref ParaFIELD-det "ParaFIELD", the parallel instantiation of a \ref fields "MEDCoupling field"
- \ref MPIProcessorGroup-det "MPIProcessorGroup" (which inherits from the abstract
\ref MEDCoupling::ProcessorGroup "ProcessorGroup"), a group of processors (typically MPI nodes)
- Kriging points: built with \ref MEDCoupling::TypeOfField "ON_NODES_KR"
The spatial discretization is at the center of the \ref interpolation "interpolation" mechanisms,
-since one of the main interpolation paramter is indeed specifying from which source discretization
+since one of the main interpolation parameter is indeed specifying from which source discretization
to which target discretization one wants to go. For example:
-- a P0->P0 interpolation means that a field on cells will be transfered to another cell-based field;
-- a P1->P0 interpolation means that a field on nodes this time will be transfered to a cell-based field.
+- a P0->P0 interpolation means that a field on cells will be transferred to another cell-based field;
+- a P1->P0 interpolation means that a field on nodes this time will be transferred to a cell-based field.
- etc ...
Finally, in the code itself, the class \ref MEDCoupling::MEDCouplingFieldDiscretization "MEDCouplingFieldDiscretization"
\subsection interpkernelGeo2DBoolOpStep3 Step3 : Result polygon building.
This stage links each edge with wanted loc. \b Contrary to last 2 steps it is obviously boolean
-operation dependant. Let's take the case of the intersection that is used in
+operation dependent. Let's take the case of the intersection that is used in
P0->P0 interpolation. \n The principle of result polygon building is to build polygon by taking
edges localized as \b in or \b on.
\end{tabular}\right]
\f]
-This type of nature is particulary recommended to interpolate an intensive \b density
+This type of nature is particularly recommended to interpolate an intensive \b density
field (moderator density, power density).
The difference with \ref TableNatureOfFieldExampleConservVol "conservative volumic" seen above is that here the
target field is homogenized to the \b whole target cell. It explains why this nature of field does not follow the maximum principle.
\subsection{Rectangle}
-Finally it is worth puting aside the case \f$\mathbf{N} = 0\f$ (rectangle), which boils down to solving an ordinary
+Finally it is worth putting aside the case \f$\mathbf{N} = 0\f$ (rectangle), which boils down to solving an ordinary
2-unknows system:
\f[ x = \frac{p_x A_y - p_y A_x}{C_x A_y - C_y A_x}, y = \frac{C_x p_y-C_y p_x}{C_x A_y - C_y A_x} \f]
Several types of meshes are available in MEDCoupling:
-- \subpage MEDCouplingPointSetPage "Point set mesh" (abstract, can not be instanciated)
+- \subpage MEDCouplingPointSetPage "Point set mesh" (abstract, can not be instantiated)
- \subpage MEDCouplingUMeshPage "Unstructured meshes"
- \subpage MEDCouplingCMeshPage "Cartesian meshes"
- \subpage MEDCouplingExtrudedPage "3D Extruded meshes"
"MED" can (unfortunately) refer to:
- <b>\ref med-file "MED file format"</b>: the file format used to save a mesh (".med" extension)
-- <b>\ref med-file "MED-file library"</b>: the C++ library developped by EdF R&D (and provided
+- <b>\ref med-file "MED-file library"</b>: the C++ library developed by EdF R&D (and provided
with SALOME) to read/write MED file (warning: for advanced users only!)
- <b> \ref medcoupling "MEDCoupling"</b>: the (relatively) high level API to deal with mesh and fields in memory
- <b>\ref medloader MEDLoader</b>: part of the library dedicated to file I/O = a more user-friendly API than the MED-file library API
The most common confusion is between the MED library (what you are reading at present) and
the MED-file library ("MED fichier").
-The MED-file library is part of the prerequisites of the MED libary, and its only purpose is to read and write
+The MED-file library is part of the prerequisites of the MED library, and its only purpose is to read and write
MED files. This is a low level API written in C, and giving a fine-grain access to the structure
of the MED files (.med). The architecture diagramm below details those points further.
/*!
\page start Getting started
-If you are completly new to MED, this page will help you grasp the main concepts
+If you are completely new to MED, this page will help you grasp the main concepts
used overall in the \ref library "MED world", and have an idea of what you can achieve with MED.
The <a class="el" href="tutorial/index.html">tutorial</a> is also a good way to start.
}
/*!
- Computes the bouding box of a given element. iP in numPol mode.
+ Computes the bounding box of a given element. iP in numPol mode.
*/
template<class MyMeshType, class MyMatrix>
void CurveIntersector<MyMeshType,MyMatrix>::getElemBB (double* bb,
//================================================================================
/*!
- * \brief Creates empty box intended to further initalization via setData()
+ * \brief Creates empty box intended to further initialization via setData()
*/
//================================================================================
}
/*!
- * This method has the responsability to see if this->_expr can be seen as a unary function of something.
+ * This method has the responsibility to see if this->_expr can be seen as a unary function of something.
* Something defined as the contain of highest level barckets.
* Typically '(3*x+2)' and 'cos(4*l+p*n)' will be intercepted by this method whereas '3*x+2' not...etc..
*/
}
/*!
- * This method has the responsability to see if this->_expr is interpretable without any recursion.
+ * This method has the responsibility to see if this->_expr is interpretable without any recursion.
* \return true if no recursion needed, false if this->_expr is too complex to be interpreted at this level.
- * \throw exception if this->_expr is simple enough to try to interprate this and this expression contains an error.
+ * \throw exception if this->_expr is simple enough to try to interpret this and this expression contains an error.
*/
bool ExprParser::tryToInterpALeaf()
{
*/
double ExprParser::ReplaceAndTraduce(std::string& expr, int id, std::size_t bg, std::size_t end, int& delta)
{
- static const char MSG[]="Interal error : A string expected to be a float is not one ! Bug to signal !";
+ static const char MSG[]="Internal error : A string expected to be a float is not one ! Bug to signal !";
std::istringstream stream;
std::ostringstream oss;
std::size_t end2=end!=std::string::npos?end-bg:end;
}
/*!
- * This methode is const because 'node' is supposed to be equal geomitrically to _node.
+ * This method is const because 'node' is supposed to be equal geometrically to _node.
*/
void IntersectElement::setNode(Node *node) const
{
if(intersector->intersect(whereToFind,newNodes,order,commonNode))
{
if(newNodes.empty())
- throw Exception("Internal error occured - error in intersector implementation!");// This case should never happen
+ throw Exception("Internal error occurred - error in intersector implementation!");// This case should never happen
std::vector<Node *>::iterator iter=newNodes.begin();
std::vector<Node *>::reverse_iterator iterR=newNodes.rbegin();
f1->addSubEdgeInVector(f1->getStartNode(),*iter,outValForF1);
a2.getCenter(centerL); radiusL=a2.getRadius();
a1.getCenter(centerB); radiusB=a1.getRadius();
}
- // dividing from the begining by radiusB^2 to keep precision
+ // dividing from the beginning by radiusB^2 to keep precision
distBetweenCenters=Node::distanceBtw2PtSq(centerL,centerB);
cst=distBetweenCenters/(radiusB*radiusB);
cst+=radiusL*radiusL/(radiusB*radiusB);
/*!
* 'eps' is expected to be > 0.
* 'conn' is of size 3. conn[0] is start id, conn[1] is end id and conn[2] is middle id.
- * 'offset' is typically the number of nodes already existing in global 2D curve mesh. Additionnal coords 'addCoo' ids will be put after the already existing.
+ * 'offset' is typically the number of nodes already existing in global 2D curve mesh. Additional coords 'addCoo' ids will be put after the already existing.
*/
void EdgeArcCircle::tesselate(const int *conn, int offset, double eps, std::vector<int>& newConn, std::vector<double>& addCoo) const
{
* This method splits 'this' with 'other' into smaller pieces localizable. 'mapThis' is a map that gives the correspondance
* between nodes contained in 'this' and node ids in a global mesh.
* In the same way, 'mapOther' gives the correspondance between nodes contained in 'other' and node ids in a
- * global mesh from wich 'other' is extracted.
- * This method has 1 out paramater : 'edgesThis', After the call of this method, it contains the nodal connectivity (including type)
+ * global mesh from which 'other' is extracted.
+ * This method has 1 out parameter : 'edgesThis', After the call of this method, it contains the nodal connectivity (including type)
* of 'this' into globlal "this mesh".
* This method has 2 in/out parameters : 'subDivOther' and 'addCoo'.'otherEdgeIds' is useful to put values in
* 'edgesThis', 'subDivOther' and 'addCoo'.
if(!direction)
it.previousLoop();
Node *nodeToTest;
- int szMax(pol1Splitted.size()+1),ii(0);// here a protection against agressive users of IntersectMeshes of invalid input meshes
+ int szMax(pol1Splitted.size()+1),ii(0);// here a protection against aggressive users of IntersectMeshes of invalid input meshes
std::list<QuadraticPolygon *>::iterator ret;
do
{
ii++;
}
while(ret==iEnd && ii<szMax);
- if(ii==szMax)// here a protection against agressive users of IntersectMeshes of invalid input meshes
+ if(ii==szMax)// here a protection against aggressive users of IntersectMeshes of invalid input meshes
throw INTERP_KERNEL::Exception("QuadraticPolygon::fillAsMuchAsPossibleWith : Something is invalid with input polygons !");
return ret;
}
/****************************************************************/
/* Create a search tree based on the bounding boxes */
- /* Instanciate the intersector and initialise the result vector */
+ /* Instantiate the intersector and initialise the result vector */
/****************************************************************/
long start_filtering=clock();
- Values: positive real number.
- Default: 1.0E-12.
-# printLevel: Level of verboseness during the computations.
- - Values: interger between 0 and 3.
+ - Values: integer between 0 and 3.
- Default: 0.
*/
void Interpolation3DSurf::setOptions(double precision, int printLevel, double medianPlan,
throw INTERP_KERNEL::Exception("Invalid method specified ! Must be in : \"P0P0\" \"P0P1\" \"P1P0\" or \"P1P1\"");
/****************************************************************/
/* Create a search tree based on the bounding boxes */
- /* Instanciate the intersector and initialise the result vector */
+ /* Instantiate the intersector and initialise the result vector */
/****************************************************************/
long start_filtering=clock();
* - Values: positive real number.
* - Default: 1.0E-12.
* -# PrintLevel: Level of verboseness during the computations.
- * - Values: interger between 0 and 3.
+ * - Values: integer between 0 and 3.
* - Default: 0.
*/
template<class RealPlanar>
throw INTERP_KERNEL::Exception("Invalid method specified or intersection type ! Must be in : \"P0P0\" \"P0P1\" \"P1P0\" or \"P1P1\"");
/****************************************************************/
/* Create a search tree based on the bounding boxes */
- /* Instanciate the intersector and initialise the result vector */
+ /* Instantiate the intersector and initialise the result vector */
/****************************************************************/
long start_filtering=clock();
}
/*! Function that compares two angles from the values of the pairs (sin,cos)*/
- /*! Angles are considered in [0, 2Pi] bt are not computed explicitely */
+ /*! Angles are considered in [0, 2Pi] bt are not computed explicitly */
class AngleLess
{
public:
// just to be able to compile
}
- /*_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _*/
- /* Checks wether point A is inside the quadrangle BCDE */
- /*_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _*/
+ /*_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ */
+ /* Checks whether point A is inside the quadrangle BCDE */
+ /*_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ */
template<int dim> inline double check_inside(const double* A,const double* B,const double* C,const double* D,
const double* E,double* ABC, double* ADE)
}
/*!
- Computes the bouding box of a given element. iP in numPol mode.
+ Computes the bounding box of a given element. iP in numPol mode.
*/
template<class MyMeshType, class MyMatrix>
void PlanarIntersector<MyMeshType,MyMatrix>::getElemBB(double* bb, const MyMeshType& mesh, ConnType iP, ConnType nb_nodes)
Coords_B[SPACEDIM*i_B+idim] -= proj*linear_comb[idim];
}
- //Buid the matrix sending A into the Oxy plane and apply it to A and B
+ //Build the matrix sending A into the Oxy plane and apply it to A and B
if(do_rotate)
{
TranslationRotationMatrix rotation;
const double * sourceTria,
std::vector<double>& res)
{
- throw INTERP_KERNEL::Exception("intersectGeoBary incompatible with PointLocator. Desactivate P1P0Bary to avoid the problem");
+ throw INTERP_KERNEL::Exception("intersectGeoBary incompatible with PointLocator. Deactivate P1P0Bary to avoid the problem");
return 0.;
}
/*************************************************************/
/* Computes the 3D intersection between two COPLANAR */
/* Segments [A,B] and [C,D], stores the result in V. */
- /* If A belongs to [CD] then the vertex E (preceeding A) */
+ /* If A belongs to [CD] then the vertex E (preceding A) */
/* is used to decide if the crossing is real. If A coincides */
/* with C or D, a special treatment is performed */
/*************************************************************/
{
if(distance2<DIM>(A,D)<_epsilon)
crossprod<DIM>(A,C,E,_vdouble);//store the crossprod between vectors AC and AE (E=vertex preceding A)
- return false;//case of paralell segments
+ return false;//case of parallel segments
}
case 3://beware AB and CD may belong to a vertical plane
det = determinant(&AB[1],&DC[1]);//determinant of the last two coefficients
{
if(distance2<DIM>(A,D)<_epsilon)
crossprod<DIM>(A,C,E,_vdouble);//store the crossprod between vectors AC and AE (E=vertex preceding A)
- return false;//case of paralell segments
+ return false;//case of parallel segments
}
}
}
/*******************************************************/
/* adds the possible crossings between segments [A,B] (with end-point global indices i and i_next) */
/*and segments [C,D] and [E,F] to the list inter and updates _End_segments */
- /* In cases of ambiguity, the vertex G is used to decide wether the crossing should be accepted */
+ /* In cases of ambiguity, the vertex G is used to decide whether the crossing should be accepted */
/*******************************************************/
template<int DIM>
inline void PolygonAlgorithms<DIM>::addCrossings( const double * A, const double * B, int i , int i_next,
}
/*!
- * \param [out] matrix contain a dense matrix of size 12 with 3 rows containing each 4 colums. This matrix is the reduction of 4x4 matrix but the last
+ * \param [out] matrix contain a dense matrix of size 12 with 3 rows containing each 4 columns. This matrix is the reduction of 4x4 matrix but the last
* line containing [0,0,0,1] is omitted.
*/
bool ComputeRotTranslationMatrixToPut3PointsOnOXY(const double *p0, const double *p1, const double *p2, double *matrix)
MEDCouplingNormalizedUnstructuredMesh<2,2> wrap_target_mesh(target_mesh_mc);
// Go for interpolation...
INTERP_KERNEL::Interpolation2D myInterpolator;
- //optionnal call to parametrize your interpolation. First precision, tracelevel, intersector wanted.
+ //optional call to parametrize your interpolation. First precision, tracelevel, intersector wanted.
myInterpolator.setPrecision(1e-7);
myInterpolator.setPrintLevel(1);
source_mesh->decrRef();
* @param mesh2path the path to the file containing the target mesh, relative to {$MEDCOUPLING_ROOT_DIR}/share/resources/med/
* @param mesh2 the name of the target mesh
* @param correctVol the total volume of the intersection of the two meshes
- * @param prec maximum relative error to be tolerated in volume comparisions
+ * @param prec maximum relative error to be tolerated in volume comparisons
* @param doubleTest if false, only the test with mesh 1 as the source mesh and mesh 2 as the target mesh will be performed
*
*/
* @param mesh1 the name of the source mesh
* @param mesh2 the name of the target mesh
* @param correctVol the total volume of the intersection of the two meshes
- * @param prec maximum relative error to be tolerated in volume comparisions
+ * @param prec maximum relative error to be tolerated in volume comparisons
* @param doubleTest if false, only the test with mesh 1 as the source mesh and mesh 2 as the target mesh will be performed
*
*/
bool obvious,areOverlapped;
intersector->areOverlappedOrOnlyColinears(0,obvious,areOverlapped);
CPPUNIT_ASSERT(!obvious && !areOverlapped);
- CPPUNIT_ASSERT(intersector->intersect(0,v4,order,v3)); CPPUNIT_ASSERT(order); // order has no sence here because v4.size() expected to 1 but for valgrind serenity test.
+ CPPUNIT_ASSERT(intersector->intersect(0,v4,order,v3)); CPPUNIT_ASSERT(order); // order has no sense here because v4.size() expected to 1 but for valgrind serenity test.
CPPUNIT_ASSERT_EQUAL(1,(int)v4.size()); CPPUNIT_ASSERT_EQUAL(0,(int)v3.getNumberOfAssociations());
CPPUNIT_ASSERT_DOUBLES_EQUAL(e1->getRadius(),Node::distanceBtw2Pt(e1->getCenter(),(*(v4[0]))),ADMISSIBLE_ERROR);
CPPUNIT_ASSERT_DOUBLES_EQUAL(e2->getRadius(),Node::distanceBtw2Pt(e2->getCenter(),(*(v4[0]))),ADMISSIBLE_ERROR);
{
INTERP_KERNEL::PolygonAlgorithms<2> intersector (_Epsilon, _Precision);;
/*
- ////////////////// TEST DESACTIVATED by A. GEAY because memory fault :
+ ////////////////// TEST DEACTIVATED by A. GEAY because memory fault :
// conditional jump INTERP_KERNEL::PolygonAlgorithms<2>::intersectConvexPolygons(double const*, double const*, int, int) (PolygonAlgorithms.txx:629)
std::deque< double > actual_result = intersector.intersectConvexPolygons(_square1,_square1,4,4);
std::deque< double > expected_result;
* \a this is composed in cell types.
* The returned array is of size 3*n where n is the number of different types present in \a this.
* For every k in [0,n] ret[3*k+2]==-1 because it has no sense here.
- * This parameter is kept only for compatibility with other methode listed above.
+ * This parameter is kept only for compatibility with other method listed above.
*/
std::vector<int> MEDCoupling1GTUMesh::getDistributionOfTypes() const
{
}
/*!
- * \return DataArrayInt * - the internal reference to the nodal connectivity. The caller is not reponsible to deallocate it.
+ * \return DataArrayInt * - the internal reference to the nodal connectivity. The caller is not responsible to deallocate it.
*/
DataArrayInt *MEDCoupling1SGTUMesh::getNodalConnectivity() const
{
/*!
* Allocates memory to store an estimation of the given number of cells. Closer is the estimation to the number of cells effectively inserted,
* less will be the needs to realloc. If the number of cells to be inserted is not known simply put 0 to this parameter.
- * If a nodal connectivity previouly existed before the call of this method, it will be reset.
+ * If a nodal connectivity previously existed before the call of this method, it will be reset.
*
* \param [in] nbOfCells - estimation of the number of cell \a this mesh will contain.
*/
* \param [in] nodalConnOfCellEnd - the end (excluded) of nodal connectivity of the cell to add.
* \throw If the length of the input nodal connectivity array of the cell to add is not equal to number of nodes per cell relative to the unique geometric type
* attached to \a this.
- * \thow If the nodal connectivity array in \a this is null (call MEDCoupling1SGTUMesh::allocateCells before).
+ * \throw If the nodal connectivity array in \a this is null (call MEDCoupling1SGTUMesh::allocateCells before).
*/
void MEDCoupling1SGTUMesh::insertNextCell(const int *nodalConnOfCellBg, const int *nodalConnOfCellEnd)
{
* \param [in] nodalConnOfCellEnd - the end (excluded) of nodal connectivity of the cell to add.
* \throw If the length of the input nodal connectivity array of the cell to add is not equal to number of nodes per cell relative to the unique geometric type
* attached to \a this.
- * \thow If the nodal connectivity array in \a this is null (call MEDCoupling1SGTUMesh::allocateCells before).
+ * \throw If the nodal connectivity array in \a this is null (call MEDCoupling1SGTUMesh::allocateCells before).
*/
void MEDCoupling1DGTUMesh::insertNextCell(const int *nodalConnOfCellBg, const int *nodalConnOfCellEnd)
{
}
/*!
- * \return DataArrayInt * - the internal reference to the nodal connectivity. The caller is not reponsible to deallocate it.
+ * \return DataArrayInt * - the internal reference to the nodal connectivity. The caller is not responsible to deallocate it.
*/
DataArrayInt *MEDCoupling1DGTUMesh::getNodalConnectivity() const
{
}
/*!
- * \return DataArrayInt * - the internal reference to the nodal connectivity index. The caller is not reponsible to deallocate it.
+ * \return DataArrayInt * - the internal reference to the nodal connectivity index. The caller is not responsible to deallocate it.
*/
DataArrayInt *MEDCoupling1DGTUMesh::getNodalConnectivityIndex() const
{
void MEDCouplingCMesh::renumberCells(const int *old2NewBg, bool check)
{
- throw INTERP_KERNEL::Exception("Functionnality of renumbering cell not available for CMesh !");
+ throw INTERP_KERNEL::Exception("Functionality of renumbering cell not available for CMesh !");
}
void MEDCouplingCMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
/*!
* \a p1 is expected to be more refined than \a p2. \a p1 and \a p2 have to share a common ancestor. Compared to UpdateNeighborsOfOneWithTwoExt here \a p1 and \a p2 are \b not at the same level !
- * This method has 3 outputs. 2 two first are the resp the position of \a p1 and \a p2 relative to \a p1. And \a factToApplyOn2 is the coeff of refinement to be applied on \a p2 to be virtualy
+ * This method has 3 outputs. 2 two first are the resp the position of \a p1 and \a p2 relative to \a p1. And \a factToApplyOn2 is the coeff of refinement to be applied on \a p2 to be virtually
* on the same level as \a p1.
*/
void MEDCouplingCartesianAMRPatch::ComputeZonesOfTwoRelativeToOneDiffLev(int ghostLev, const MEDCouplingCartesianAMRPatch *p1, const MEDCouplingCartesianAMRPatch *p2, std::vector< std::pair<int,int> >& p1Zone, std::vector< std::pair<int,int> >& p2Zone, std::vector<int>& factToApplyOn2)
double tt=getTime(tmpp1,tmpp2);
ret << "Time attached to the mesh [unit] : " << tt << " [" << getTimeUnit() << "]\n";
ret << "Iteration : " << tmpp1 << " Order : " << tmpp2 << "\n";
- ret << "The nodal stucture of curve linear mesh is : [";
+ ret << "The nodal structure of curve linear mesh is : [";
std::copy(_structure.begin(),_structure.end(),std::ostream_iterator<int>(ret,",")); ret << "]\n";
ret << "The coords array is this : ";
if((const DataArrayDouble *)_coords)
void MEDCouplingCurveLinearMesh::renumberCells(const int *old2NewBg, bool check)
{
- throw INTERP_KERNEL::Exception("Functionnality of renumbering cell not available for CurveLinear Mesh !");
+ throw INTERP_KERNEL::Exception("Functionality of renumbering cell not available for CurveLinear Mesh !");
}
void MEDCouplingCurveLinearMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
case MEDCouplingFieldDiscretizationKriging::TYPE:
return new MEDCouplingFieldDiscretizationKriging;
default:
- throw INTERP_KERNEL::Exception("Choosen discretization is not implemented yet.");
+ throw INTERP_KERNEL::Exception("Chosen discretization is not implemented yet.");
}
}
/*!
* This method is typically the first step of renumbering. The implementation is empty it is not a bug only gauss is impacted
- * virtualy by this method.
+ * virtually by this method.
*/
void MEDCouplingFieldDiscretization::renumberCells(const int *old2NewBg, bool check)
{
/*!
* This method is typically the first step of renumbering. The impact on _discr_per_cell is necessary here.
- * virtualy by this method.
+ * virtually by this method.
*/
void MEDCouplingFieldDiscretizationPerCell::renumberCells(const int *old2NewBg, bool check)
{
{
if(dc[i]>=nbOfDesc)
{
- std::ostringstream oss; oss << "Cell # " << i << " of mesh \"" << mesh->getName() << "\" has an undefined gauss location ! Should never happend !";
+ std::ostringstream oss; oss << "Cell # " << i << " of mesh \"" << mesh->getName() << "\" has an undefined gauss location ! Should never happened !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
if(dc[i]<0)
}
/*!
- * This method converts a field on nodes (\a this) to a cell field (returned field). The convertion is a \b non \b conservative remapping !
- * This method is useful only for users that need a fast convertion from node to cell spatial discretization. The algorithm applied is simply to attach
+ * This method converts a field on nodes (\a this) to a cell field (returned field). The conversion is a \b non \b conservative remapping !
+ * This method is useful only for users that need a fast conversion from node to cell spatial discretization. The algorithm applied is simply to attach
* to each cell the average of values on nodes constituting this cell.
*
* \return MEDCouplingFieldDouble* - a new instance of MEDCouplingFieldDouble. The
}
/*!
- * This method converts a field on cell (\a this) to a node field (returned field). The convertion is a \b non \b conservative remapping !
- * This method is useful only for users that need a fast convertion from cell to node spatial discretization. The algorithm applied is simply to attach
+ * This method converts a field on cell (\a this) to a node field (returned field). The conversion is a \b non \b conservative remapping !
+ * This method is useful only for users that need a fast conversion from cell to node spatial discretization. The algorithm applied is simply to attach
* to each node the average of values on cell sharing this node. If \a this lies on a mesh having orphan nodes the values applied on them will be NaN (division by 0.).
*
* \return MEDCouplingFieldDouble* - a new instance of MEDCouplingFieldDouble. The
/*!
* This is expected to be a 3 components vector field on nodes (if not an exception will be thrown). \a this is also expected to lie on a MEDCouplingPointSet mesh.
- * Finaly \a this is also expected to be consistent.
+ * Finally \a this is also expected to be consistent.
* In these conditions this method returns a newly created field (to be dealed by the caller).
* The returned field will also 3 compo vector field be on nodes lying on the same mesh than \a this.
*
}
/*!
- * Builds a newly created field, that the caller will have the responsability to deal with.
+ * Builds a newly created field, that the caller will have the responsibility to deal with.
* \n This method makes the assumption that \a this field is correctly defined when this method is called (\a this->checkConsistencyLight() returns without any exception thrown), **no check of this will be done**.
* \n This method returns a restriction of \a this so that only tuple ids specified in [ \a partBg , \a partEnd ) will be contained in the returned field.
* \n Parameter [\a partBg, \a partEnd ) specifies **cell ids whatever the spatial discretization** of \a this (
}
/*!
- * Builds a newly created field, that the caller will have the responsability to deal with (decrRef()).
+ * Builds a newly created field, that the caller will have the responsibility to deal with (decrRef()).
* This method makes the assumption that the field is correctly defined when this method is called, no check of this will be done.
* This method returns a restriction of \a this so that only tuples with ids specified in \a part will be contained in the returned field.
* Parameter \a part specifies **cell ids whatever the spatial discretization of this** (
void MEDCouplingIMesh::renumberCells(const int *old2NewBg, bool check)
{
- throw INTERP_KERNEL::Exception("Functionnality of renumbering cell not available for IMesh !");
+ throw INTERP_KERNEL::Exception("Functionality of renumbering cell not available for IMesh !");
}
void MEDCouplingIMesh::getTinySerializationInformation(std::vector<double>& tinyInfoD, std::vector<int>& tinyInfo, std::vector<std::string>& littleStrings) const
const DataArrayDouble *MEDCouplingMappedExtrudedMesh::getDirectAccessOfCoordsArrIfInStructure() const
{
- throw INTERP_KERNEL::Exception("MEDCouplingMappedExtrudedMesh::getDirectAccessOfCoordsArrIfInStructure : no direct acess of DataArrayDouble holding nodes !");
+ throw INTERP_KERNEL::Exception("MEDCouplingMappedExtrudedMesh::getDirectAccessOfCoordsArrIfInStructure : no direct access of DataArrayDouble holding nodes !");
}
bool MEDCouplingMappedExtrudedMesh::isEqualIfNotWhy(const MEDCouplingMesh *other, double prec, std::string& reason) const
void MEDCouplingMappedExtrudedMesh::renumberCells(const int *old2NewBg, bool check)
{
- throw INTERP_KERNEL::Exception("Functionnality of renumbering cells unavailable for ExtrudedMesh");
+ throw INTERP_KERNEL::Exception("Functionality of renumbering cells unavailable for ExtrudedMesh");
}
/*!
/*!
* This method checks that [\b start, \b end) is compliant with ref length \b value.
- * typicaly start in [0,\b value) and end in [0,\b value). If value==start and start==end, it is supported.
+ * typically start in [0,\b value) and end in [0,\b value). If value==start and start==end, it is supported.
*/
void DataArray::CheckValueInRangeEx(int value, int start, int end, const std::string& msg)
{
/*!
* Returns the maximum norm of the vector defined by \a this array.
- * This method works even if the number of components is diferent from one.
+ * This method works even if the number of components is different from one.
* If the number of elements in \a this is 0, -1. is returned.
* \return double - the value of the maximum norm, i.e.
* the maximal absolute value among values of \a this array (whatever its number of components).
/*!
* Returns the minimum norm (absolute value) of the vector defined by \a this array.
- * This method works even if the number of components is diferent from one.
+ * This method works even if the number of components is different from one.
* If the number of elements in \a this is 0, std::numeric_limits<double>::max() is returned.
* \return double - the value of the minimum norm, i.e.
* the minimal absolute value among values of \a this array (whatever its number of components).
}
/*!
- * This method tries to find the permutation to apply to the first input \a ids1 to obtain the same array (without considering strings informations) the second
+ * This method tries to find the permutation to apply to the first input \a ids1 to obtain the same array (without considering strings information) the second
* input array \a ids2.
* \a ids1 and \a ids2 are expected to be both a list of ids (both with number of components equal to one) not sorted and with values that can be negative.
* This method will throw an exception is no such permutation array can be obtained. It is typically the case if there is some ids in \a ids1 not in \a ids2 or
}
/*!
- * This method allows to put a vector of vector of integer into a more compact data stucture (skyline).
+ * This method allows to put a vector of vector of integer into a more compact data structure (skyline).
* This method is not available into python because no available optimized data structure available to map std::vector< std::vector<int> >.
*
* \param [in] v the input data structure to be translate into skyline format.
* "MEDCouplingUMesh::buildDescendingConnectivity" and
* \ref MEDCoupling::MEDCouplingUMesh::getNodalConnectivityIndex
* "MEDCouplingUMesh::getNodalConnectivityIndex" etc.
- * This method preforms the reverse operation of DataArrayInt::computeOffsetsFull.
+ * This method performs the reverse operation of DataArrayInt::computeOffsetsFull.
* \return DataArrayInt * - a new instance of DataArrayInt, whose number of tuples
* equals to \a this->getNumberOfComponents() - 1, and number of components is 1.
* The caller is to delete this array using decrRef() as it is no more needed.
* components remains the same and number of tuples is inceamented by one.<br>
* This method is useful for allToAllV in MPI with contiguous policy. This method
* differs from computeOffsets() in that the number of tuples is changed by this one.
- * This method preforms the reverse operation of DataArrayInt::deltaShiftIndex.
+ * This method performs the reverse operation of DataArrayInt::deltaShiftIndex.
* \throw If \a this is not allocated.
* \throw If \a this->getNumberOfComponents() != 1.
*
/*!
* This method performs systematically an allocation of \a newNbOfElements elements in \a this.
* \a _nb_of_elem and \a _nb_of_elem_alloc will be equal even if only std::min<std::size_t>(_nb_of_elem,newNbOfElements) come from the .
- * The remaing part of the new allocated chunk are available but not set previouly !
+ * The remaining part of the new allocated chunk are available but not set previously !
*
* So this method should not be confused with MemArray<T>::reserve that is close to MemArray<T>::reAlloc but not same.
*/
}
/*!
- * This method desallocated \a this without modification of informations relative to the components.
+ * This method deallocated \a this without modification of information relative to the components.
* After call of this method, DataArrayDouble::isAllocated will return false.
* If \a this is already not allocated, \a this is let unchanged.
*/
}
/*!
- * This method is very poor and looks only if \a this and \a other are candidate for merge of fields lying repectively on them.
+ * This method is very poor and looks only if \a this and \a other are candidate for merge of fields lying respectively on them.
*/
bool MEDCouplingMesh::areCompatibleForMerge(const MEDCouplingMesh *other) const
{
}
/*!
- * This method returns the interpolation matrix policy. This policy specifies which interpolation matrix method to keep or prefered.
+ * This method returns the interpolation matrix policy. This policy specifies which interpolation matrix method to keep or preferred.
* If interpolation matrix policy is :
*
- * - set to IK_ONLY_PREFERED (0) (the default) : the INTERP_KERNEL only method is prefered. That is to say, if it is possible to treat the case
+ * - set to IK_ONLY_PREFERED (0) (the default) : the INTERP_KERNEL only method is preferred. That is to say, if it is possible to treat the case
* regarding spatial discretization of source and target with INTERP_KERNEL only method, INTERP_KERNEL only method will be performed.
* If not, the \b not only INTERP_KERNEL method will be attempt.
*
- * - set to NOT_IK_ONLY_PREFERED (1) : the \b NOT only INTERP_KERNEL method is prefered. That is to say, if it is possible to treat the case
+ * - set to NOT_IK_ONLY_PREFERED (1) : the \b NOT only INTERP_KERNEL method is preferred. That is to say, if it is possible to treat the case
* regarding spatial discretization of source and target with \b NOT only INTERP_KERNEL method, \b NOT only INTERP_KERNEL method, will be performed.
* If not, the INTERP_KERNEL only method will be attempt.
*
*
* If interpolation matrix policy is :
*
- * - set to IK_ONLY_PREFERED (0) (the default) : the INTERP_KERNEL only method is prefered. That is to say, if it is possible to treat the case
+ * - set to IK_ONLY_PREFERED (0) (the default) : the INTERP_KERNEL only method is preferred. That is to say, if it is possible to treat the case
* regarding spatial discretization of source and target with INTERP_KERNEL only method, INTERP_KERNEL only method will be performed.
* If not, the \b not only INTERP_KERNEL method will be attempt.
*
- * - set to NOT_IK_ONLY_PREFERED (1) : the \b NOT only INTERP_KERNEL method is prefered. That is to say, if it is possible to treat the case
+ * - set to NOT_IK_ONLY_PREFERED (1) : the \b NOT only INTERP_KERNEL method is preferred. That is to say, if it is possible to treat the case
* regarding spatial discretization of source and target with \b NOT only INTERP_KERNEL method, \b NOT only INTERP_KERNEL method, will be performed.
* If not, the INTERP_KERNEL only method will be attempt.
*
INTERP_KERNEL::Interpolation2D1D::DuplicateFacesType duplicateFaces=interpolation.retrieveDuplicateFaces();
if(!duplicateFaces.empty())
{
- std::ostringstream oss; oss << "An unexpected situation happend ! For the following 1D Cells are part of edges shared by 2D cells :\n";
+ std::ostringstream oss; oss << "An unexpected situation happened ! For the following 1D Cells are part of edges shared by 2D cells :\n";
for(std::map<int,std::set<int> >::const_iterator it=duplicateFaces.begin();it!=duplicateFaces.end();it++)
{
oss << "1D Cell #" << (*it).first << " is part of common edge of following 2D cells ids : ";
INTERP_KERNEL::Interpolation2D3D::DuplicateFacesType duplicateFaces=interpolation.retrieveDuplicateFaces();
if(!duplicateFaces.empty())
{
- std::ostringstream oss; oss << "An unexpected situation happend ! For the following 2D Cells are part of edges shared by 3D cells :\n";
+ std::ostringstream oss; oss << "An unexpected situation happened ! For the following 2D Cells are part of edges shared by 3D cells :\n";
for(std::map<int,std::set<int> >::const_iterator it=duplicateFaces.begin();it!=duplicateFaces.end();it++)
{
oss << "2D Cell #" << (*it).first << " is part of common face of following 3D cells ids : ";
INTERP_KERNEL::Interpolation2D3D::DuplicateFacesType duplicateFaces=interpolation.retrieveDuplicateFaces();
if(!duplicateFaces.empty())
{
- std::ostringstream oss; oss << "An unexpected situation happend ! For the following 2D Cells are part of edges shared by 3D cells :\n";
+ std::ostringstream oss; oss << "An unexpected situation happened ! For the following 2D Cells are part of edges shared by 3D cells :\n";
for(std::map<int,std::set<int> >::const_iterator it=duplicateFaces.begin();it!=duplicateFaces.end();it++)
{
oss << "2D Cell #" << (*it).first << " is part of common face of following 3D cells ids : ";
/*!
* This method builds a code considering already set field discretization int \a this : \a _src_ft and \a _target_ft.
- * This method returns 3 informations (2 in ouput parameters and 1 in return).
+ * This method returns 3 information (2 in output parameters and 1 in return).
*
* \param [out] srcMeth the string code of the discretization of source field template
* \param [out] trgMeth the string code of the discretization of target field template
* \param [in] st - the structure of grid ( \b without considering ghost cells).
* \param [in] part - the part in the structure ( \b without considering ghost cells) contained in grid whose structure is defined by \a st.
* \param [in] factor - the factor, the tuples in \a da will be multiply by.
- * \param [in,out] da - The DataArray in wich only tuples specified by \a part will be modified.
+ * \param [in,out] da - The DataArray in which only tuples specified by \a part will be modified.
*
* \sa BuildExplicitIdsFrom
*/
* \param [in] part - the part in the structure ( \b without considering ghost cells) contained in grid whose structure is defined by \a st.
* \param [in] ghostSize - \a ghostSize must be >= 0.
* \param [in] factor - the factor, the tuples in \a da will be multiply by.
- * \param [in,out] da - The DataArray in wich only tuples specified by \a part will be modified.
+ * \param [in,out] da - The DataArray in which only tuples specified by \a part will be modified.
*
* \sa MultiplyPartOf, PutInGhostFormat
*/
if(arrays1[i]!=0 && arrays2[i]!=0)
arrays1[i]->setSelectedComponents(arrays2[i],compoIds);
else if(arrays1[i]!=0 || arrays2[i]!=0)
- throw INTERP_KERNEL::Exception("TimeDiscretization::setSelectedComponents : some time array in correspondance are not defined symetrically !");
+ throw INTERP_KERNEL::Exception("TimeDiscretization::setSelectedComponents : some time array in correspondance are not defined symmetrically !");
}
}
}
/*!
- * This method has to be called with a lot of care. It set agressively the time in this with the
+ * This method has to be called with a lot of care. It set aggressively the time in this with the
* time in \a other.
*/
void TimeLabel::forceTimeOfThis(const TimeLabel& other) const
}
/*!
- * Allocates memory to store an estimation of the given number of cells. The closer is the estimation to the number of cells effectively inserted,
- * the less will the library need to reallocate memory. If the number of cells to be inserted is not known simply put 0 to this parameter.
- * If a nodal connectivity previouly existed before the call of this method, it will be reset.
+ * Allocates memory to store an estimation of the given number of cells.
+ * The closer the estimation to the number of cells effectively inserted, the less need the library requires
+ * to reallocate memory. If the number of cells to be inserted is not known simply assign 0 to this parameter.
+ * If a nodal connectivity previously existed before the call of this method, it will be reset.
*
* \param [in] nbOfCells - estimation of the number of cell \a this mesh will contain.
*
/*!
* Build a sub part of \b this lying or not on the same coordinates than \b this (regarding value of \b keepCoords).
* By default coordinates are kept. This method is close to MEDCouplingUMesh::buildPartOfMySelf except that here input
- * cellIds is not given explicitely but by a range python like.
+ * cellIds is not given explicitly but by a range python like.
*
* \param start
* \param end
* This method expects that \b this and \b otherDimM1OnSameCoords share the same coordinates array.
* otherDimM1OnSameCoords->getMeshDimension() is expected to be equal to this->getMeshDimension()-1.
* This method searches for nodes needed to be duplicated. These nodes are nodes fetched by \b otherDimM1OnSameCoords which are not part of the boundary of \b otherDimM1OnSameCoords.
- * If a node is in the boundary of \b this \b and in the boundary of \b otherDimM1OnSameCoords this node is considerd as needed to be duplicated.
+ * If a node is in the boundary of \b this \b and in the boundary of \b otherDimM1OnSameCoords this node is considered as needed to be duplicated.
* When the set of node ids \b nodeIdsToDuplicate is computed, cell ids in \b this is searched so that their connectivity includes at least 1 node in \b nodeIdsToDuplicate.
*
* \param [in] otherDimM1OnSameCoords a mesh lying on the same coords than \b this and with a mesh dimension equal to those of \b this minus 1. WARNING this input
* This method operates a modification of the connectivity and coords in \b this.
* Every time that a node id in [ \b nodeIdsToDuplicateBg, \b nodeIdsToDuplicateEnd ) will append in nodal connectivity of \b this
* its ids will be modified to id this->getNumberOfNodes()+std::distance(nodeIdsToDuplicateBg,std::find(nodeIdsToDuplicateBg,nodeIdsToDuplicateEnd,id)).
- * More explicitely the renumber array in nodes is not explicitely given in old2new to avoid to build a big array of renumbering whereas typically few node ids needs to be
+ * More explicitly the renumber array in nodes is not explicitly given in old2new to avoid to build a big array of renumbering whereas typically few node ids needs to be
* renumbered. The node id nodeIdsToDuplicateBg[0] will have id this->getNumberOfNodes()+0, node id nodeIdsToDuplicateBg[1] will have id this->getNumberOfNodes()+1,
* node id nodeIdsToDuplicateBg[2] will have id this->getNumberOfNodes()+2...
*
* Coordinates are \b NOT considered here and will remain unchanged by this method. this->_coords can ever been null for the needs of this method.
* Every time that a node id in [ \b nodeIdsToDuplicateBg, \b nodeIdsToDuplicateEnd ) will append in nodal connectivity of \b this
* its ids will be modified to id offset+std::distance(nodeIdsToDuplicateBg,std::find(nodeIdsToDuplicateBg,nodeIdsToDuplicateEnd,id)).
- * More explicitely the renumber array in nodes is not explicitely given in old2new to avoid to build a big array of renumbering whereas typically few node ids needs to be
+ * More explicitly the renumber array in nodes is not explicitly given in old2new to avoid to build a big array of renumbering whereas typically few node ids needs to be
* renumbered. The node id nodeIdsToDuplicateBg[0] will have id offset+0, node id nodeIdsToDuplicateBg[1] will have id offset+1,
* node id nodeIdsToDuplicateBg[2] will have id offset+2...
*
}
/*!
- * This method builds a newly allocated instance (with the same name than \a this) that the caller has the responsability to deal with.
+ * This method builds a newly allocated instance (with the same name than \a this) that the caller has the responsibility to deal with.
* This method returns an instance with all arrays allocated (connectivity, connectivity index, coordinates)
* but with length of these arrays set to 0. It allows to define an "empty" mesh (with nor cells nor nodes but compliant with
* some algos).
/*!
* Returns types of cells of the specified part of \a this mesh.
- * This method avoids computing sub-mesh explicitely to get its types.
+ * This method avoids computing sub-mesh explicitly to get its types.
* \param [in] begin - an array of cell ids of interest.
* \param [in] end - the end of \a begin, i.e. a pointer to its (last+1)-th element.
* \return std::set<INTERP_KERNEL::NormalizedCellType> - a set of enumeration items
* If not an exception will thrown. If this is an empty mesh with no cell an exception will be thrown too.
* No consideration of coordinate is done by this method.
* A 1D mesh is said contiguous if : a cell i with nodal connectivity (k,p) the cell i+1 the nodal connectivity should be (p,m)
- * If not false is returned. In case that false is returned a call to MEDCoupling::MEDCouplingUMesh::mergeNodes could be usefull.
+ * If not false is returned. In case that false is returned a call to MEDCoupling::MEDCouplingUMesh::mergeNodes could be useful.
*/
bool MEDCouplingUMesh::isContiguous1D() const
{
* \a this is composed in cell types.
* The returned array is of size 3*n where n is the number of different types present in \a this.
* For every k in [0,n] ret[3*k+2]==-1 because it has no sense here.
- * This parameter is kept only for compatibility with other methode listed above.
+ * This parameter is kept only for compatibility with other method listed above.
*/
std::vector<int> MEDCouplingUMesh::getDistributionOfTypes() const
{
*
* If all geometric types in \a code are exactly those in \a this null pointer is returned.
* If it exists a geometric type in \a this \b not in \a code \b no exception is thrown
- * and a DataArrayInt instance is returned that the user has the responsability to deallocate.
+ * and a DataArrayInt instance is returned that the user has the responsibility to deallocate.
*/
DataArrayInt *MEDCouplingUMesh::checkTypeConsistencyAndContig(const std::vector<int>& code, const std::vector<const DataArrayInt *>& idsPerType) const
{
/*!
* This method returns 2 newly allocated DataArrayInt instances. The first is an array of size 'this->getNumberOfCells()' with one component,
* that tells for each cell the pos of its type in the array on type given in input parameter. The 2nd output parameter is an array with the same
- * number of tuples than input type array and with one component. This 2nd output array gives type by type the number of occurence of type in 'this'.
+ * number of tuples than input type array and with one component. This 2nd output array gives type by type the number of occurrence of type in 'this'.
*/
DataArrayInt *MEDCouplingUMesh::getLevArrPerCellTypes(const INTERP_KERNEL::NormalizedCellType *orderBg, const INTERP_KERNEL::NormalizedCellType *orderEnd, DataArrayInt *&nbPerType) const
{
/*!
* This method takes in input a vector of MEDCouplingUMesh instances lying on the same coordinates with same mesh dimensions.
* Each mesh in \b ms must be sorted by type with the same order (typically using MEDCouplingUMesh::sortCellsInMEDFileFrmt).
- * This method is particulary useful for MED file interaction. It allows to aggregate several meshes and keeping the type sorting
+ * This method is particularly useful for MED file interaction. It allows to aggregate several meshes and keeping the type sorting
* and the track of the permutation by chunk of same geotype cells to retrieve it. The traditional formats old2new and new2old
* are not used here to avoid the build of big permutation array.
*
* Makes all given meshes share the nodal connectivity array. The common connectivity
* array is created by concatenating the connectivity arrays of all given meshes. All
* the given meshes must be of the same space dimension but dimension of cells **can
- * differ**. This method is particulary useful in MEDLoader context to build a \ref
+ * differ**. This method is particularly useful in MEDLoader context to build a \ref
* MEDCoupling::MEDFileUMesh "MEDFileUMesh" instance that expects that underlying
* MEDCouplingUMesh'es of different dimension share the same nodal connectivity array.
* \param [in,out] meshes - a vector of meshes to update.
/*!
* Merges nodes coincident with a given precision within all given meshes that share
* the nodal connectivity array. The given meshes **can be of different** mesh
- * dimension. This method is particulary useful in MEDLoader context to build a \ref
+ * dimension. This method is particularly useful in MEDLoader context to build a \ref
* MEDCoupling::MEDFileUMesh "MEDFileUMesh" instance that expects that underlying
* MEDCouplingUMesh'es of different dimension share the same nodal connectivity array.
* \param [in,out] meshes - a vector of meshes to update.
* This method works on an input pair (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn.
* This method builds an output pair (\b arrOut,\b arrIndexOut) that is a copy from \b arrIn for all cell ids \b not \b in [ \b idsOfSelectBg , \b idsOfSelectEnd ) and for
* cellIds \b in [ \b idsOfSelectBg , \b idsOfSelectEnd ) a copy coming from the corresponding values in input pair (\b srcArr, \b srcArrIndex).
- * This method is an generalization of MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx that performs the same thing but by without building explicitely a result output arrays.
+ * This method is an generalization of MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx that performs the same thing but by without building explicitly a result output arrays.
*
* \param [in] idsOfSelectBg begin of set of ids of the input extraction (included)
* \param [in] idsOfSelectEnd end of set of ids of the input extraction (excluded)
/*!
* This method works on an input pair (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn.
- * This method is an specialization of MEDCouplingUMesh::SetPartOfIndexedArrays in the case of assignement do not modify the index in \b arrIndxIn.
+ * This method is an specialization of MEDCouplingUMesh::SetPartOfIndexedArrays in the case of assignment do not modify the index in \b arrIndxIn.
*
* \param [in] idsOfSelectBg begin of set of ids of the input extraction (included)
* \param [in] idsOfSelectEnd end of set of ids of the input extraction (excluded)
* This method works on an input pair (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn.
* This method builds an output pair (\b arrOut,\b arrIndexOut) that is a copy from \b arrIn for all cell ids \b not \b in [ \b idsOfSelectBg , \b idsOfSelectEnd ) and for
* cellIds \b in [\b idsOfSelectBg, \b idsOfSelectEnd) a copy coming from the corresponding values in input pair (\b srcArr, \b srcArrIndex).
- * This method is an generalization of MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx that performs the same thing but by without building explicitely a result output arrays.
+ * This method is an generalization of MEDCouplingUMesh::SetPartOfIndexedArraysSameIdx that performs the same thing but by without building explicitly a result output arrays.
*
* \param [in] start begin of set of ids of the input extraction (included)
* \param [in] end end of set of ids of the input extraction (excluded)
/*!
* This method works on an input pair (\b arrIn, \b arrIndxIn) where \b arrIn indexes is in \b arrIndxIn.
- * This method is an specialization of MEDCouplingUMesh::SetPartOfIndexedArrays in the case of assignement do not modify the index in \b arrIndxIn.
+ * This method is an specialization of MEDCouplingUMesh::SetPartOfIndexedArrays in the case of assignment do not modify the index in \b arrIndxIn.
*
* \param [in] start begin of set of ids of the input extraction (included)
* \param [in] end end of set of ids of the input extraction (excluded)
* decrRef() as it is no more needed.
* \return MEDCoupling1SGTUMesh * - the mesh containing only INTERP_KERNEL::NORM_TETRA4 cells.
*
- * \warning This method operates on each cells in this independantly ! So it can leads to non conform mesh in returned value ! If you expect to have a conform mesh in output
+ * \warning This method operates on each cells in this independently ! So it can leads to non conform mesh in returned value ! If you expect to have a conform mesh in output
* the policy PLANAR_FACE_6 should be used on a mesh sorted with MEDCoupling1SGTUMesh::sortHexa8EachOther.
*
* \throw If \a this is not a 3D mesh (spaceDim==3 and meshDim==3).
/*!
* This private method is used to subdivide edges of a mesh with meshdim==2. If \a this has no a meshdim equal to 2 an exception will be thrown.
- * This method completly ignore coordinates.
+ * This method completely ignores coordinates.
* \param nodeSubdived is the nodal connectivity of subdivision of edges
* \param nodeIndxSubdived is the nodal connectivity index of subdivision of edges
* \param desc is descending connectivity in format specified in MEDCouplingUMesh::buildDescendingConnectivity2
* This method is part of the Slice3D algorithm. It is the first step of assembly process, ones coordinates have been computed (by MEDCouplingUMesh::split3DCurveWithPlane method).
* This method allows to compute given the status of 3D curve cells and the descending connectivity 3DSurf->3DCurve to deduce the intersection of each 3D surf cells
* with a plane. The result will be put in 'cut3DSuf' out parameter.
- * \param [in] cut3DCurve input paramter that gives for each 3DCurve cell if it owns fully to the plane or partially.
+ * \param [in] cut3DCurve input parameter that gives for each 3DCurve cell if it owns fully to the plane or partially.
* \param [out] nodesOnPlane, returns all the nodes that are on the plane.
* \param [in] nodal3DSurf is the nodal connectivity of 3D surf mesh.
* \param [in] nodalIndx3DSurf is the nodal connectivity index of 3D surf mesh.
* This method is part of the Slice3D algorithm. It is the second step of assembly process, ones coordinates have been computed (by MEDCouplingUMesh::split3DCurveWithPlane method).
* This method allows to compute given the result of 3D surf cells with plane and the descending connectivity 3D->3DSurf to deduce the intersection of each 3D cells
* with a plane. The result will be put in 'nodalRes' 'nodalResIndx' and 'cellIds' out parameters.
- * \param cut3DSurf input paramter that gives for each 3DSurf its intersection with plane (result of MEDCouplingUMesh::AssemblyForSplitFrom3DCurve).
+ * \param cut3DSurf input parameter that gives for each 3DSurf its intersection with plane (result of MEDCouplingUMesh::AssemblyForSplitFrom3DCurve).
* \param desc is the descending connectivity 3D->3DSurf
* \param descIndx is the descending connectivity index 3D->3DSurf
*/
}
/**
- * Construct a mapping between set of Nodes and the standart MEDCoupling connectivity format (c, cI).
+ * Construct a mapping between set of Nodes and the standard MEDCoupling connectivity format (c, cI).
*/
void MEDCouplingUMeshBuildQPFromMesh3(const double *coo1, int offset1, const double *coo2, int offset2, const std::vector<double>& addCoo,
const int *desc1Bg, const int *desc1End, const std::vector<std::vector<int> >& intesctEdges1,
// This initializes posBaseElt.
if(nbOfTurn==0)
{
- for(unsigned i=1;i<nbs && nbOfHit<maxNbOfHit;i++) // 2nd condition is to avoid ending with a cell wih one single edge
+ for(unsigned i=1;i<nbs && nbOfHit<maxNbOfHit;i++) // 2nd condition is to avoid ending with a cell with one single edge
{
cm.fillSonCellNodalConnectivity2(nbs-i,connBg+1,sz,tmpConn,typeOfSon);
INTERP_KERNEL::Edge *eCand(MEDCouplingUMeshBuildQPFromEdge2(typeOfSon,tmpConn,coords,m));
}
// Now move forward:
const unsigned fwdStart = (nbOfTurn == 0 ? 0 : posBaseElt); // the first element to be inspected going forward
- for(unsigned j=fwdStart+1;j<nbs && nbOfHit<maxNbOfHit;j++) // 2nd condition is to avoid ending with a cell wih one single edge
+ for(unsigned j=fwdStart+1;j<nbs && nbOfHit<maxNbOfHit;j++) // 2nd condition is to avoid ending with a cell with one single edge
{
cm.fillSonCellNodalConnectivity2((int)j,connBg+1,sz,tmpConn,typeOfSon); // get edge #j's connectivity
INTERP_KERNEL::Edge *eCand(MEDCouplingUMeshBuildQPFromEdge2(typeOfSon,tmpConn,coords,m));
break;
}
//push [posBaseElt,posEndElt) in newConnOfCell using e
- // The if clauses below are (volontary) not mutually exclusive: on a quad cell with 2 edges, the end of the connectivity is also its begining!
+ // The if clauses below are (voluntary) not mutually exclusive: on a quad cell with 2 edges, the end of the connectivity is also its beginning!
if(nbOfTurn==0)
- // at the begining of the connectivity (insert type)
+ // at the beginning of the connectivity (insert type)
EnterTheResultOf2DCellFirst(e,posBaseElt,posEndElt,(int)nbs,cm.isQuadratic(),coords,connBg+1,offset,newConnOfCell,appendedCoords,middles);
else if((nbOfHit+nbOfTurn) != (nbs-1))
// in the middle
}
/*!
- * It is the linear part of MEDCouplingUMesh::split2DCells. Here no additionnal nodes will be added in \b this. So coordinates pointer remain unchanged (is not even touch).
+ * It is the linear part of MEDCouplingUMesh::split2DCells. Here no additional nodes will be added in \b this. So coordinates pointer remain unchanged (is not even touch).
*
* \sa MEDCouplingUMesh::split2DCells
*/
/*!
- * It is the quadratic part of MEDCouplingUMesh::split2DCells. Here some additionnal nodes can be added at the end of coordinates array object.
+ * It is the quadratic part of MEDCouplingUMesh::split2DCells. Here some additional nodes can be added at the end of coordinates array object.
*
* \return int - the number of new nodes created.
* \sa MEDCouplingUMesh::split2DCells
/*!
* Partitions the first given 2D mesh using the second given 1D mesh as a tool.
* Thus the final result contains the aggregation of nodes of \a mesh2D, then nodes of \a mesh1D, then new nodes that are the result of the intersection
- * and finaly, in case of quadratic polygon the centers of edges new nodes.
+ * and finally, in case of quadratic polygon the centers of edges new nodes.
* The meshes should be in 2D space. In addition, returns two arrays mapping cells of the resulting mesh to cells of the input.
*
* \param [in] mesh2D - the 2D mesh (spacedim=meshdim=2) to be intersected using \a mesh1D tool. The mesh must be so that each point in the space covered by \a mesh2D
throw INTERP_KERNEL::Exception("MEDCouplingUMesh::ReplaceEdgeInFace: internal error, should never happen!");
int d = distance(startPos, endPos);
if (d == 1 || d == (1-dst)) // don't use modulo, for neg numbers, result is implementation defined ...
- modifiedFace.insert(++startPos, ++insidePoints.begin(), --insidePoints.end()); // insidePoints also contains start and end node. Those dont need to be inserted.
+ modifiedFace.insert(++startPos, ++insidePoints.begin(), --insidePoints.end()); // insidePoints also contains start and end node. Those don't need to be inserted.
else
modifiedFace.insert(++endPos, ++insidePoints.rbegin(), --insidePoints.rend());
}
mPartCand->getNodalConnectivity()->begin(), mPartCand->getNodalConnectivityIndex()->begin(),
idsGoodLine->begin(), idsGoodLine->end(),
/*out*/insidePoints, hitSegs);
- // Optim: smaller segments completly included in eIdx and not split won't need any further treatment:
+ // Optim: smaller segments completely included in eIdx and not split won't need any further treatment:
for (vector<int>::const_iterator its=hitSegs.begin(); its != hitSegs.end(); ++its)
hit[cands2[*its]] = true;
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
${NUMPY_INCLUDE_DIR}
- ${PTHREAD_INCLUDE_DIR} # pthread dependancy due to python2.7 library
+ ${PTHREAD_INCLUDE_DIR} # pthread dependency due to python2.7 library
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../MEDCoupling
self.assertEqual(f4.getMesh(),None)
pass
- # test a simple node to cell convertion of a field
+ # test a simple node to cell conversion of a field
def testSwig2NodeToCellDiscretization1(self):
f=MEDCouplingFieldDouble(ON_NODES) ; f.setTime(1.1,2,3)
a1=DataArrayDouble(4) ; a1.iota()
pass
def testSwig2Colinearize2D3(self):
- """ colinearize was too agressive, potentially producing cells with one edge """
+ """ colinearize was too aggressive, potentially producing cells with one edge """
# Flat polygon with 3 edges - nothing should happen (min number of edges for a linear polyg)
coo = DataArrayDouble([0.0,0.0, 2.0,0.0, 1.5,0.0, 1.0,0.0, 0.5,0.0], 5,2)
m = MEDCouplingUMesh("m", 2)
DataArrayDoubleTuple *aa,*aa2;
std::vector<double> bb,bb2;
int sw;
- const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 1st paramater for point.";
- const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 2nd paramater for vector.";
+ const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 1st parameter for point.";
+ const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnLine : 2nd parameter for vector.";
const double *p=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,1,spaceDim,true);
const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
std::vector<int> nodes;
DataArrayDoubleTuple *aa,*aa2;
std::vector<double> bb,bb2;
int sw;
- const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 1st paramater for point.";
- const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 2nd paramater for vector.";
+ const char msg[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 1st parameter for point.";
+ const char msg2[]="Python wrap of MEDCouplingPointSet::findNodesOnPlane : 2nd parameter for vector.";
const double *p=convertObjToPossibleCpp5_Safe(pt,sw,val,a,aa,bb,msg,1,spaceDim,true);
const double *v=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
std::vector<int> nodes;
DataArrayDoubleTuple *aa,*aa2;
std::vector<double> bb,bb2;
int sw;
- const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 1st paramater for origin.";
- const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 2nd paramater for vector.";
+ const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 1st parameter for origin.";
+ const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3D : 2nd parameter for vector.";
const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
//
DataArrayDoubleTuple *aa,*aa2;
std::vector<double> bb,bb2;
int sw;
- const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 1st paramater for origin.";
- const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 2nd paramater for vector.";
+ const char msg[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 1st parameter for origin.";
+ const char msg2[]="Python wrap of MEDCouplingUMesh::buildSlice3DSurf : 2nd parameter for vector.";
const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
//
DataArrayDoubleTuple *aa,*aa2;
std::vector<double> bb,bb2;
int sw;
- const char msg[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 1st paramater for origin.";
- const char msg2[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 2nd paramater for vector.";
+ const char msg[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 1st parameter for origin.";
+ const char msg2[]="Python wrap of MEDCouplingUMesh::clipSingle3DCellByPlane : 2nd parameter for vector.";
const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,3,true);
const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,3,true);
MCAuto<MEDCouplingUMesh> ret(self->clipSingle3DCellByPlane(orig,vect,eps));
DataArrayDoubleTuple *aa,*aa2;
std::vector<double> bb,bb2;
int sw;
- const char msg[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 1st paramater for origin.";
- const char msg2[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 2nd paramater for vector.";
+ const char msg[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 1st parameter for origin.";
+ const char msg2[]="Python wrap of MEDCouplingUMesh::getCellIdsCrossingPlane : 2nd parameter for vector.";
const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
return self->getCellIdsCrossingPlane(orig,vect,eps);
std::vector<double> bb,bb2;
int sw;
int spaceDim=3;
- const char msg[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 1st paramater for origin.";
- const char msg2[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 2nd paramater for vector.";
+ const char msg[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 1st parameter for origin.";
+ const char msg2[]="Python wrap of MEDCouplingFieldDouble::extractSlice3D : 2nd parameter for vector.";
const double *orig=convertObjToPossibleCpp5_Safe(origin,sw,val,a,aa,bb,msg,1,spaceDim,true);
const double *vect=convertObjToPossibleCpp5_Safe(vec,sw,val2,a2,aa2,bb2,msg2,1,spaceDim,true);
//
#ifdef WITH_NUMPY
// specific DataArray deallocator callback. This deallocator is used both in the constructor of DataArray and in the toNumPyArr
// method. This dellocator uses weakref to determine if the linked numArr is still alive or not. If alive the ownership is given to it.
-// if no more alive the "standart" DataArray deallocator is called.
+// if no more alive the "standard" DataArray deallocator is called.
void numarrdeal(void *pt, void *wron)
{
void **wronc=(void **)wron;
}
/*!
- * This method is an extention of PySlice_GetIndices but less
+ * This method is an extension of PySlice_GetIndices but less
* open than PySlice_GetIndicesEx that accepts too many situations.
*/
void GetIndicesOfSlice(PyObject *slice, Py_ssize_t length, Py_ssize_t *start, Py_ssize_t *stop, Py_ssize_t *step, const char *msgInCaseOfFailure)
return e->getConstPointer();
else
{
- std::ostringstream oss; oss << msg << "nb of tuples expected to be " << nbTuplesExpected << " , and input DataArrayDoubleTuple has always one tuple by contruction !";
+ std::ostringstream oss; oss << msg << "nb of tuples expected to be " << nbTuplesExpected << " , and input DataArrayDoubleTuple has always one tuple by construction !";
throw INTERP_KERNEL::Exception(oss.str().c_str());
}
}
m1.finishInsertingCells()
m2 = MEDCouplingDataForTest.buildCircle(0.25, 0.2, 0.4)
- # Was looping indefinitly:
+ # Was looping indefinitely:
m_intersec, resToM1, resToM2 = MEDCouplingUMesh.Intersect2DMeshes(m1, m2, eps)
m_intersec.zipCoords()
coo_tgt = DataArrayDouble([-0.5, -0.5, -0.5, 0.5, 0.5, 0.5, 0.5, -0.5, -0.03284271247461901, 0.4828427124746191,
@unittest.skipUnless(MEDCouplingHasNumPyBindings(),"requires numpy")
def test4(self):
- """ Idem test3 except that here serialization/deserialization is done explicitely."""
+ """ Idem test3 except that here serialization/deserialization is done explicitly."""
arr=DataArrayDouble(10) ; arr.iota()
m=MEDCouplingCMesh() ; m.setCoords(arr,arr,arr)
m=m.buildUnstructured()
/*!
* This method potentially releases big data arrays if \a this is coming from a file. If \a this has been built from scratch this method will have no effect.
- * This method is the symetrical method of MEDFileFields::loadArraysIfNecessary.
+ * This method is the symmetrical method of MEDFileFields::loadArraysIfNecessary.
* This method is useful to reduce \b safely amount of heap memory necessary for \a this by using MED file as database.
*
* \sa MEDFileFields::loadArraysIfNecessary
* This code corresponds to the distribution of types in the corresponding mesh.
* \param [in] newCode idem to param \a oldCode except that here the new distribution is given.
* \param [in] renumO2N the old to new renumber array.
- * \return If true a renumbering has been performed. The structure in \a this has been modified. If false, nothing has been done: it is typically the case if \a meshName is not refered by any
+ * \return If true a renumbering has been performed. The structure in \a this has been modified. If false, nothing has been done: it is typically the case if \a meshName is not referred by any
* field in \a this.
*/
bool MEDFileFields::renumberEntitiesLyingOnMesh(const std::string& meshName, const std::vector<int>& oldCode, const std::vector<int>& newCode, const DataArrayInt *renumO2N)
* This method as MEDFileField1TSW::setLocNameOnLeaf, is dedicated for advanced user that a want a very fine control on their data structure
* without overhead. This method can be called only regarding information returned by MEDFileField1TSWithoutSDA::getFieldSplitedByType or MEDFileField1TSWithoutSDA::getFieldSplitedByType2.
* This method changes the attribute (here it's profile name) of the leaf datastructure (MEDFileFieldPerMeshPerTypePerDisc instance).
- * It is the responsability of the caller to invoke MEDFileFieldGlobs::appendProfile or MEDFileFieldGlobs::getProfile
+ * It is the responsibility of the caller to invoke MEDFileFieldGlobs::appendProfile or MEDFileFieldGlobs::getProfile
* to keep a valid instance.
* If \b this do not have any leaf that correspond to the request of the input parameter (\b mName, \b typ, \b locId) an INTERP_KERNEL::Exception will be thrown.
* If \b newPflName profile name does not already exist the profile with old name will be renamed with name \b newPflName.
* This method as MEDFileField1TSW::setProfileNameOnLeaf, is dedicated for advanced user that a want a very fine control on their data structure
* without overhead. This method can be called only regarding information returned by MEDFileField1TSWithoutSDA::getFieldSplitedByType or MEDFileField1TSWithoutSDA::getFieldSplitedByType2.
* This method changes the attribute (here it's localization name) of the leaf datastructure (MEDFileFieldPerMeshPerTypePerDisc instance).
- * It is the responsability of the caller to invoke MEDFileFieldGlobs::appendProfile or MEDFileFieldGlobs::getProfile
+ * It is the responsibility of the caller to invoke MEDFileFieldGlobs::appendProfile or MEDFileFieldGlobs::getProfile
* to keep a valid instance.
* If \b this do not have any leaf that correspond to the request of the input parameter (\b mName, \b typ, \b locId) an INTERP_KERNEL::Exception will be thrown.
* This method is an extension of MEDFileField1TSWithoutSDA::setProfileNameOnLeafExt method because it performs a modification of global info.
/*!
* This method potentially releases big data arrays if \a this is coming from a file. If \a this has been built from scratch this method will have no effect.
- * This method is the symetrical method of MEDFileAnyTypeField1TS::loadArraysIfNecessary.
+ * This method is the symmetrical method of MEDFileAnyTypeField1TS::loadArraysIfNecessary.
* This method is useful to reduce \b safely amount of heap memory necessary for \a this by using MED file as database.
*
* \sa MEDFileAnyTypeField1TS::loadArraysIfNecessary
/*!
* This method returns as MEDFileAnyTypeField1TS new instances as number of components in \a this.
- * The returned instances are deep copy of \a this except that for globals that are share with those contained in \a this.
- * ** WARNING ** do no forget to rename the ouput instances to avoid to write n-times in the same MED file field !
+ * The returned instances are deep copy of \a this except that for globals that are shared with those contained in \a this.
+ * ** WARNING ** do no forget to rename the output instances to avoid to write n-times in the same MED file field !
*/
std::vector< MCAuto< MEDFileAnyTypeField1TS > > MEDFileAnyTypeField1TS::splitComponents() const
{
/*!
* This method returns as MEDFileAnyTypeField1TS new instances as number of spatial discretizations in \a this.
- * The returned instances are shallowed copied of \a this except that for globals that are share with those contained in \a this.
+ * The returned instances are shallowed copied of \a this except that for globals that are shared with those contained in \a this.
*/
std::vector< MCAuto< MEDFileAnyTypeField1TS > > MEDFileAnyTypeField1TS::splitDiscretizations() const
{
/*!
* This method returns as MEDFileAnyTypeField1TS new instances as number of maximal number of discretization in \a this.
- * The returned instances are shallowed copied of \a this except that for globals that are share with those contained in \a this.
+ * The returned instances are shallowed copied of \a this except that for globals that are shared with those contained in \a this.
*/
std::vector< MCAuto< MEDFileAnyTypeField1TS > > MEDFileAnyTypeField1TS::splitMultiDiscrPerGeoTypes() const
{
}
/*!
- * Leaf method of field with profile assignement. This method is the most general one. No optimization is done here.
+ * Leaf method of field with profile assignment. This method is the most general one. No optimization is done here.
* \param [in] pflName input containing name of profile if any. 0 if no profile (except for GAUSS_PT where a no profile can hide a profile when splitted by loc_id).
* \param [in] multiTypePfl is the end user profile specified in high level API
* \param [in] idsInPfl is the selection into the \a multiTypePfl whole profile that corresponds to the current geometric type.
start=_end;
if(type==ON_CELLS && !_localization.empty())
{
- if(_localization!="MED_GAUSS_ELNO")//For compatibily with MED2.3
+ if(_localization!="MED_GAUSS_ELNO")//For compatibility with MED2.3
setType(ON_GAUSS_PT);
else
{
/*!
* - \c this->_loc_id mutable attribute is used for elt id in mesh offsets.
*
- * \param [in] offset the offset id used to take into account that \a result is not compulsary empty in input
+ * \param [in] offset the offset id used to take into account that \a result is not compulsory empty in input
* \param [in] entriesOnSameDisc some entries **on same localization** if not the result can be invalid. The _start and _end on them are relative to \a arr parameter.
* \param [in] explicitIdsInMesh ids in mesh of the considered chunk.
* \param [in] newCode one of the input parameter to explicit the new geo type dispatch (in classical format same than those asked by MEDFileFields::renumberEntitiesLyingOnMesh)
}
const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(typ);
std::ostringstream oss; oss << "MEDFileFieldPerMesh::getLeafGivenTypeAndLocId : no such geometric type \"" << cm.getRepr() << "\" in this !" << std::endl;
- oss << "Possiblities are : ";
+ oss << "Possibilities are : ";
for(std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > >::const_iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
{
const INTERP_KERNEL::CellModel& cm2=INTERP_KERNEL::CellModel::GetCellModel((*it)->getGeoType());
}
const INTERP_KERNEL::CellModel& cm=INTERP_KERNEL::CellModel::GetCellModel(typ);
std::ostringstream oss; oss << "MEDFileFieldPerMesh::getLeafGivenTypeAndLocId : no such geometric type \"" << cm.getRepr() << "\" in this !" << std::endl;
- oss << "Possiblities are : ";
+ oss << "Possibilities are : ";
for(std::vector< MCAuto< MEDFileFieldPerMeshPerTypeCommon > >::const_iterator it=_field_pm_pt.begin();it!=_field_pm_pt.end();it++)
{
const INTERP_KERNEL::CellModel& cm2=INTERP_KERNEL::CellModel::GetCellModel((*it)->getGeoType());
int _nval;
std::string _profile;
std::string _localization;
- //! only on assignement -3 : ON_NODES, -2 : ON_CELLS, -1 : ON_GAUSS_NE, 0..* : ON_GAUSS_PT
+ //! only on assignment -3 : ON_NODES, -2 : ON_CELLS, -1 : ON_GAUSS_NE, 0..* : ON_GAUSS_PT
mutable int _loc_id;
mutable int _profile_it;
MCAuto<PartDefinition> _pd;
*
* If 'this' is empty this method will throw an INTERP_KERNEL::Exception.
* If there is \b only node fields defined in 'this' -1 is returned and 'levs' output parameter will be empty. In this
- * case the caller has to know the underlying mesh it refers to. By defaut it is the level 0 of the corresponding mesh.
+ * case the caller has to know the underlying mesh it refers to. By default it is the level 0 of the corresponding mesh.
*
- * This method is usefull to make the link between meshDimension of the underlying mesh in 'this' and the levels on 'this'.
+ * This method is useful to make the link between meshDimension of the underlying mesh in 'this' and the levels on 'this'.
* It is possible (even if it is not common) that the highest level in 'this' were not equal to the meshDimension of the underlying mesh in 'this'.
*
* Let's consider the typical following case :
/*!
* This method splits into discretization each time steps in \a this.
- * ** WARNING ** the returned instances are not compulsary defined on the same time steps series !
+ * ** WARNING ** the returned instances are not compulsory defined on the same time steps series !
*/
std::vector< MCAuto<MEDFileAnyTypeFieldMultiTSWithoutSDA> > MEDFileAnyTypeFieldMultiTSWithoutSDA::splitDiscretizations() const
{
/*!
* This method potentially releases big data arrays if \a this is coming from a file. If \a this has been built from scratch this method will have no effect.
- * This method is the symetrical method of MEDFileAnyTypeFieldMultiTS::loadArraysIfNecessary.
+ * This method is the symmetrical method of MEDFileAnyTypeFieldMultiTS::loadArraysIfNecessary.
* This method is useful to reduce \b safely amount of heap memory necessary for \a this by using MED file as database.
*
* \sa MEDFileAnyTypeFieldMultiTS::loadArraysIfNecessary
/*!
* This method returns as MEDFileAnyTypeFieldMultiTS new instances as number of components in \a this.
- * The returned instances are deep copy of \a this except that for globals that are share with those contained in \a this.
- * ** WARNING ** do no forget to rename the ouput instances to avoid to write n-times in the same MED file field !
+ * The returned instances are deep copy of \a this except that for globals that are shared with those contained in \a this.
+ * ** WARNING ** do no forget to rename the output instances to avoid to write n-times in the same MED file field !
*/
std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > MEDFileAnyTypeFieldMultiTS::splitComponents() const
{
/*!
* This method returns as MEDFileAnyTypeFieldMultiTS new instances as number of discretizations over time steps in \a this.
- * The returned instances are shallow copied of \a this included globals that are share with those contained in \a this.
+ * The returned instances are shallow copied of \a this included globals that are shared with those contained in \a this.
*/
std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > MEDFileAnyTypeFieldMultiTS::splitDiscretizations() const
{
/*!
* This method returns as MEDFileAnyTypeFieldMultiTS new instances as number of sub-discretizations over time steps in \a this.
- * The returned instances are shallow copied of \a this included globals that are share with those contained in \a this.
+ * The returned instances are shallow copied of \a this included globals that are shared with those contained in \a this.
*/
std::vector< MCAuto< MEDFileAnyTypeFieldMultiTS > > MEDFileAnyTypeFieldMultiTS::splitMultiDiscrPerGeoTypes() const
{
}
/*!
- * \param [in] nbOfEntity - number of entity that can be either cells or nodes. Not other possiblity.
+ * \param [in] nbOfEntity - number of entity that can be either cells or nodes. Not other possibility.
* \param [in] nip - number of integration points. 1 for ON_CELLS and NO_NODES
*/
void MEDFileField1TSStructItem2::checkInRange(int nbOfEntity, int nip, const MEDFileFieldGlobsReal *globs)
}
/*!
- * This method has no impact on groups. This method only works on families. This method firstly removes families not refered by any groups in \a this, then all unused entities
+ * This method has no impact on groups. This method only works on families. This method firstly removes families not referred by any groups in \a this, then all unused entities
* are put as belonging to family 0 ("FAMILLE_ZERO"). Finally, all orphanFamilies are killed.
* This method raises an exception if "FAMILLE_ZERO" is already belonging to a group.
*
}
/*!
- * \b WARNING this implementation is dependant from MEDCouplingMappedExtrudedMesh::buildUnstructured !
+ * \b WARNING this implementation is dependent from MEDCouplingMappedExtrudedMesh::buildUnstructured !
* \sa MEDCouplingMappedExtrudedMesh::buildUnstructured , MEDCouplingMappedExtrudedMesh::build3DUnstructuredMesh
*/
MEDFileUMesh *MEDFileUMesh::New(const MEDCouplingMappedExtrudedMesh *mem)
if(getAxisType()!=AX_CART)
{
std::ostringstream oss; oss << "MEDFileMesh::checkCartesian : request for method that is dedicated to a cartesian convention ! But you are not in cartesian convention (" << DataArray::GetAxisTypeRepr(getAxisType()) << ").";
- oss << std::endl << "To perform operation you have two possiblities :" << std::endl;
+ oss << std::endl << "To perform operation you have two possibilities :" << std::endl;
oss << " - call setAxisType(AX_CART)" << std::endl;
oss << " - call cartesianize()";
throw INTERP_KERNEL::Exception(oss.str().c_str());
/*!
* This method is for advanced users. There is two storing strategy of mesh in \a this.
* Either MEDCouplingUMesh, or vector of MEDCoupling1GTUMesh instances.
- * When assignement is done the first one is done, which is not optimal in write mode for MED file.
+ * When assignment is done the first one is done, which is not optimal in write mode for MED file.
* This method allows to switch from MEDCouplingUMesh mode to MEDCoupling1GTUMesh mode.
*/
void MEDFileUMesh::forceComputationOfParts() const
}
/*!
- * Returns a pointer to mesh at the specified level (here 0 is compulsary for cartesian mesh).
+ * Returns a pointer to mesh at the specified level (here 0 is compulsory for cartesian mesh).
*
* \return a pointer to cartesian mesh that need to be managed by the caller.
* \warning the returned pointer has to be managed by the caller.
/*!
* This method is dedicated to the killers that use a same family name to store different family ids. MED file API authorizes it.
- * So this method renames families (if needed generaly not !) in order to have a discriminant name for families.
+ * So this method renames families (if needed generally not !) in order to have a discriminant name for families.
*/
void MEDFileMeshL2::RenameFamiliesFromFileToMemInternal(std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > >& crudeFams)
{
/*!
* This method is dedicated to the killers that use a same family name to store different family ids. MED file API authorizes it.
- * So this method renames families (if needed generaly not !) in order to have a discriminant name for families.
+ * So this method renames families (if needed generally not !) in order to have a discriminant name for families.
*/
void MEDFileMeshL2::RenameFamiliesFromMemToFileInternal(std::vector< std::pair<std::string,std::pair<int,std::vector<std::string> > > >& crudeFams)
{
}
/*!
- * This method sets the epsilon value used for node comparison when trying to buid a profile for a field on node/cell on an already written mesh.
+ * This method sets the epsilon value used for node comparison when trying to build a profile for a field on node/cell on an already written mesh.
*/
void MEDCoupling::SetEpsilonForNodeComp(double val)
{
/*!
* This method operates a safe copy from 'src' to 'dest' by checking the size of 'src' before trying to copy.
- * If size of 'src' string is higher than 'maxLgth' the behaviour is dependant from 'behaviour' parameter.
+ * If size of 'src' string is higher than 'maxLgth' the behaviour is dependent from 'behaviour' parameter.
* If 'behaviour' equals 0 an exception is thrown. If 'behaviour' equals 1 an attempt of zipping of string will be done
* ( see zipString to have more details).
*/
// 53619905 | 1 2 6 8
// 53619906 | SCALAIRE
// 53619907 | -63312600499 1 0 0 0 -2 0 2
- // where -63312600499 is actualy -633 and 12600499
+ // where -63312600499 is actually -633 and 12600499
char hold=_curPos[_width];
_curPos[_width] = '\0';
int result = atoi( _curPos );
Group* IntermediateMED::addNewGroup(std::vector<SauvUtilities::Group*>* groupsToFix)
{
- if ( _groups.size() == _groups.capacity() ) // re-allocation would occure
+ if ( _groups.size() == _groups.capacity() ) // re-allocation would occur
{
std::vector<Group> newGroups( _groups.size() );
newGroups.push_back( Group() );
init( dimm );
}
/*!
- * \brief Initialize iteration on cells of given dimention
+ * \brief Initialize iteration on cells of given dimension
*/
void CellsByDimIterator::init(const int dimm)
{
fcount.stop();
}
}
- } // loop on fiels
+ } // loop on files
}
//================================================================================
return m
def __convertGeo2MED(self,geoFileName):
- """ Convert all the geometry (all the meshes) contained in teh CASE file into MEDCouplingUMesh'es. """
+ """ Convert all the geometry (all the meshes) contained in the CASE file into MEDCouplingUMesh'es. """
fd=open(os.path.join(self._dirName,geoFileName),"r+b") ; fd.seek(0,2) ; end=fd.tell() ; fd.seek(0) ; title=fd.read(80)
title=title.strip().lower()
if "binary" not in title:
#
finalVersion=ml.MEDFileVersionOfFileStr(realFnOut)
#
- print(("File \"%s\" has been converted to 3.0 successfuly ( %s -> %s ) !\nOutput file is here : \"%s\" !"%(fn,initalVersion,finalVersion,realFnOut)))
+ print(("File \"%s\" has been converted to 3.0 successfully ( %s -> %s ) !\nOutput file is here : \"%s\" !"%(fn,initalVersion,finalVersion,realFnOut)))
pass
if __name__=="__main__":
pass
# Tricky test of the case of in a MED file containing a Field on GAUSS_NE is lying on a profile that is reality represents all the geom entities of a level.
# By default when using setFieldProfile method such profile is not created because it is not useful ! So here a trick is used to force MEDLoader to do that
- # for the necessity of the test ! The idea is too create artificially a mesh having one more fictious cell per type and to roll back right after !
+ # for the necessity of the test ! The idea is too create artificially a mesh having one more fictitious cell per type and to roll back right after !
def testMEDField15(self):
fname="Pyfile36.med"
m0=MEDLoaderDataForTest.build2DMesh_1()
pass
def testMEDFileUMeshSetName(self):
- """ This test is a small but important one for MEDReader in sauv mode. When .sauv file is loaded the convertion is performed in memory and a preparation is done then.
+ """ This test is a small but important one for MEDReader in sauv mode. When .sauv file is loaded the conversion is performed in memory and a preparation is done then.
This preparation makes access to internal MEDCouplingMesh pointers whose name must be updated.
"""
fname="Pyfile79.med"
self.assertEqual(mm.getFamiliesIdsOnGroup("RID"),(-4,3))
mm.write(fileName,2)
# now read such funny file !
- mm2=MEDFileMesh.New(fileName) # <- normaly mdump of Pyfile98.med must contain only RID and FAMILLE_ZERO families.
+ mm2=MEDFileMesh.New(fileName) # <- normally mdump of Pyfile98.med must contain only RID and FAMILLE_ZERO families.
self.assertTrue(mm.isEqual(mm2,1e-16))
self.assertEqual(mm2.getFamiliesNames(),("FAMILLE_ZERO",'RIDF!/__\\!0000','RIDF!/__\\!0001'))
self.assertEqual(mm2.getFamiliesNamesWithFilePointOfView(),("FAMILLE_ZERO","RIDF","RIDF"))
pass
def test28(self):
- """ This test defines 2 fields f0,f1,f2,f3 lying on an unstructured mesh whith cells including NORM_POINT1.
+ """ This test defines 2 fields f0,f1,f2,f3 lying on an unstructured mesh with cells including NORM_POINT1.
Both f0 and f1 are on NODES and f2 and f3 are on cells. f1 and f2 share the same support.
f0 is on a nodal support that is not matchable with any cells (including NORM_POINT1)
This test is a more aggressive version of test26.
pass
def test35(self):
- """ Emulate MEDReader in // mode context. Here a Simple mesh having more nodes than really needed. This test focuses on that point particulary."""
+ """ Emulate MEDReader in // mode context. Here a Simple mesh having more nodes than really needed. This test focuses on that point particularly."""
fname="ForMEDReader35.med"
arrX=DataArrayDouble(7) ; arrX.iota()
arrY=DataArrayDouble([0.,1.])
try:
medfd=cr.loadInMEDFileDS()
except:
- print "An error occured during the conversion!"
+ print "An error occurred during the conversion!"
print "#######################################"
raise
medfd.write(fOut,2)
*
* The method creates as many MED-files as there are domains in the
* collection. It also creates a master file that lists all the MED files.
- * The MED files created in ths manner contain joints that describe the
+ * The MED files created in this manner contain joints that describe the
* connectivity between subdomains.
*
* \param filename name of the master file that will contain the list of the MED files
xadj[n], // edgelocnbr , number of edges
xadj[n], // edgelocsiz , same as edgelocnbr if edgeloctab is compact
adjncy, // edgeloctab[edgelocnbr], global indexes of edges
- 0, // edgegsttab , optionnal, should be computed internally, set to zero
+ 0, // edgegsttab , optional, should be computed internally, set to zero
_edge_weight); // edloloctab , graph edges loads, set to zero
SCOTCH_Strat scotch_strategy;
std::vector<std::string> GetInfosOfField(const char *fileName, const char *meshName, const int idomain );
#ifdef HAVE_MPI
- //not adviced, interblocking, use sendAndReceive
+ //not advised, interblocking, use sendAndReceive
//void SendVectorOfString(const std::vector<std::string>& vec, const int target);
//std::vector<std::string> RecvVectorOfString(const int source);
//TODO void sendRecvVectorOfString(const std::vector<std::string>& vec, const int source, const int target);
}
catch(...)
{
- cerr<<"an unknown type exception error was occured"<<endl;
+ cerr<<"an unknown type exception error has occurred"<<endl;
fflush(stderr);
return 1;
}
}
catch(...)
{
- cerr<<"proc "<<MyGlobals::_Rank<<" : an unknown type exception error was occured"<<endl;
+ cerr<<"proc "<<MyGlobals::_Rank<<" : an unknown type exception error has occurred"<<endl;
fflush(stderr);
MPI_Finalize();
return 1;
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIR} # pthread dependancy due to python2.7 library
+ ${PTHREAD_INCLUDE_DIR} # pthread dependency due to python2.7 library
${NUMPY_INCLUDE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
(but this is not strictly respected overall in practice ...). It is used in all
the \ref parallel "DEC related classes".
- It is typically instanciated after the MPI_Init() call in a program and is afterwards passed as a
+ It is typically instantiated after the MPI_Init() call in a program and is afterwards passed as a
parameter to the constructors of various \ref parallel "parallel objects" so that they access the
MPI library via this common interface.
* \c ICoCo::Field, or directly a \c MEDCoupling::MEDCouplingFieldDouble instance.
* See the various signatures of the method DisjointDEC::attachLocalField()
*
- * The derivations of this class should be considered for practical instanciation:
+ * The derivations of this class should be considered for practical instantiation:
* - \ref InterpKernelDEC-det "InterpKernelDEC"
* - \ref ExplicitCoincidentDEC-det "ExplicitCoincidentDEC"
* - \ref StructuredCoincidentDEC-det "StructuredCoincidentDEC"
/**
* Check that the sources and targets procs form a partition of the world communicator referenced in the groups.
- * This world communicator is not necessarily MPI_WORLD_COMM, but it has to be covered completly for the DECs to work.
+ * This world communicator is not necessarily MPI_WORLD_COMM, but it has to be covered completely for the DECs to work.
*/
void DisjointDEC::checkPartitionGroup() const
{
{
//locate the distant meshes
ElementLocator locator(*_local_field, *_target_group, *_source_group);
- //transfering option from InterpKernelDEC to ElementLocator
+ //transferring option from InterpKernelDEC to ElementLocator
locator.copyOptions(*this);
MEDCouplingPointSet* distant_mesh=0;
int* distant_ids=0;
if (_target_group->containsMyRank())
{
ElementLocator locator(*_local_field, *_source_group, *_target_group);
- //transfering option from InterpKernelDEC to ElementLocator
+ //transferring option from InterpKernelDEC to ElementLocator
locator.copyOptions(*this);
MEDCouplingPointSet* distant_mesh=0;
int* distant_ids=0;
"_MapOfRequestStruct".
That structure RequestStruct give the possibility to manage
the structures MPI_Request and MPI_Status * of MPI. It give
- also the possibility to get informations about that request :
+ also the possibility to get information about that request :
target, send/recv, tag, [a]synchronous, type, outcount.
. That identifier is used to control an asynchronous request
// Receive (read) in synchronous mode count values of type datatype in buffer from source
// (returns RequestId identifier even if the corresponding structure is deleted :
// it is only in order to have the same signature as the asynchronous mode)
- // The output argument OutCount is optionnal : *OutCount <= count
+ // The output argument OutCount is optional : *OutCount <= count
int MPIAccess::recv(void* buffer, int count, MPI_Datatype datatype, int source, int &RequestId, int *OutCount)
{
int sts = MPI_SUCCESS ;
return _comm_interface.requestFree( request ) ;
}
- // Print all informations of all known requests for debugging purpose
+ // Print all information of all known requests for debugging purpose
void MPIAccess::check() const
{
int i = 0 ;
. We assume that buffers are allocated with a new double[]. so a
delete [] is done.
- . The structure SendBuffStruct permit to keep the adress of the buffer
+ . The structure SendBuffStruct permit to keep the address of the buffer
and to manage a reference counter of that buffer. It contains
also MPI_Datatype for the delete [] (double *) ... when the counter
is null.
int nbcomp = _local_field->getField()->getNumberOfComponents();
double* distant_values = new double [_nb_distant_points*nbcomp];
- //cheap interpolation : the value of the cell is transfered to the point
+ //cheap interpolation : the value of the cell is transferred to the point
for (int i=0; i<_nb_distant_points; i++)
for (int j=0; j <nbcomp; j++)
distant_values[i*nbcomp+j]=values[(_distant_locations[i]-1)*nbcomp+j];
seen in \ref ParaMEDMEMOverlapDECAlgoStep2 "here in Step2".
As will be dealt in Step 6, for final matrix-vector computations, the resulting matrix of the
- couple (k,m) whereever it is computed (proc \#k or proc \#m)
+ couple (k,m) wherever it is computed (proc \#k or proc \#m)
will be stored in \b proc\#m.
- If proc \#k is in charge (performs the matrix computation) for this couple (k,m), target ids
in charge of the matrix, proc \#m receives the source ids
from remote proc \#k, and thus the matrix is directly correct, no need for renumbering as
in \ref ParaMEDMEMOverlapDECAlgoStep5 "Step 5". However proc \#k must
- keep track of the ids sent to proc \#m for te matrix-vector computation.
+ keep track of the ids sent to proc \#m for the matrix-vector computation.
This is incarnated by OverlapMapping::keepTracksOfSourceIds in proc k.
This step is performed in MEDCoupling::OverlapElementLocator::exchangeMeshes method.
}
/*!
- * This method recieves source remote mesh on proc 'procId' if sourceOrTarget==True
- * This method recieves target remote mesh on proc 'procId' if sourceOrTarget==False
+ * This method receives source remote mesh on proc 'procId' if sourceOrTarget==True
+ * This method receives target remote mesh on proc 'procId' if sourceOrTarget==False
*/
void OverlapElementLocator::receiveRemoteMeshFrom(int procId, bool sourceOrTarget)
{
* This method returns, if it exists, an array with only one component and as many as tuples as _field has.
* This array gives for every element on which this->_field lies, its global number, if this->_field is nodal.
* For example if _field is a nodal field : returned array will be the nodal global numbers.
- * The content of this method is used to inform Working side to accumulate data recieved by lazy side.
+ * The content of this method is used to inform Working side to accumulate data received by lazy side.
*/
DataArrayInt* ParaFIELD::returnCumulativeGlobalNumbering() const
{
return;
}
- /* Connection to remote programm */
+ /* Connection to remote program */
MPI2Connector *mpio = new MPI2Connector;
gcom = mpio->remoteMPI2Connect(service);
MPI_Comm_size( gcom, &gsize );
dec.synchronize();
dec.setForcedRenormalization(false);
dec.sendData();
- /* Deconnection of remote programm */
+ /* Deconnection of remote program */
mpio->remoteMPI2Disconnect(service);
/* clean-up */
delete mpio;
return;
}
- /* Connection to remote programm */
+ /* Connection to remote program */
MPI2Connector *mpio = new MPI2Connector;
gcom = mpio->remoteMPI2Connect(service);
const double *expected=targetResults[grank-(gsize-lsize)];
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[0],res[0],1e-13);
CPPUNIT_ASSERT_DOUBLES_EQUAL(expected[1],res[1],1e-13);
- /* Deconnection of remote programm */
+ /* Deconnection of remote program */
mpio->remoteMPI2Disconnect(service);
/* clean-up */
delete mpio;
delete [] intBuf; delete [] dblBuf;
return NULL;
}
- // put recieved data into the list
+ // put received data into the list
int pyerr = 0;
if ( type == MPI_DOUBLE )
{
INCLUDE_DIRECTORIES(
${PYTHON_INCLUDE_DIRS}
- ${PTHREAD_INCLUDE_DIR} # pthread dependancy due to python2.7 library
+ ${PTHREAD_INCLUDE_DIR} # pthread dependency due to python2.7 library
${CMAKE_CURRENT_SOURCE_DIR}
${NUMPY_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}