Commit 2b6629c1 by Kirill Terekhov

Synchronize

Some fixes for previous commit.
parent eab4719f
......@@ -41,7 +41,7 @@
\begin{document}
\title{Mesh format}
\title{XML Mesh format}
\author{Kirill Terekhov}
\maketitle
......@@ -324,7 +324,7 @@ Each xml tag contains attributes that describe the way the data is stored on the
The "GLOBAL\_ID" tag in the example defines a single integer entry on all the nodes, faces and cells, and on some sets. The "WHATEVER" tag defines a binary data of arbitrary size only to some sets. When one would like to have just a handful of entries unrelated to the mesh elements one can prescribe them to the mesh, i.e. write Definition="Mesh".
\section{Nodes}
This is a mandatory XML tag for the file that describes all the nodes of the mesh. The "Number" attribute describes the total number of nodes. Optional attribute "Dimension" tells the number of space dimensions, that is the number of coordinates in each entry, defaults to 3. The contents of the XML tag inside of "$<![CDATA[]]>$" can be entered in any format suitable to represent vectors as per \S~\ref{parsing}. Nodes are mesh elements of dimension 0.
This is a mandatory XML tag for the file that describes all the nodes of the mesh. The "Number" attribute describes the total number of nodes. Optional attribute "Dimension" tells the number of space dimensions, that is the number of coordinates in each entry, defaults to 3. The contents of the XML tag inside of "$<![CDATA[]]>$" can be entered in any format suitable to represent vectors as described in \S~\ref{data_format}. Nodes are mesh elements of dimension 0.
\section{Faces, Edges, Cells}
XML Tags Faces and Edges are optional and could be used to define only some of the elements of the mesh. For example one may introduce only boundary faces in XML tag Faces. The XML Tag Cells is mandatory and it represents cells of the mesh. One can optionally provide an optional attribute "Number" that will be used to check that the number of elements red is correct. Edges, faces and cells are mesh elements of dimension 1, 2 and 3 respectively.
\subsubsection{Connections}
......
......@@ -951,11 +951,9 @@ namespace INMOST
};
template<typename typeA, typename typeB>
Matrix<typename Promote<typeA,typeB>::type> operator *(const typeA & coef, const Matrix<typeB> & other)
{
return other*coef;
}
//template<typename typeA, typename typeB>
//Matrix<typename Promote<typeA,typeB>::type> operator *(const typeA & coef, const Matrix<typeB> & other)
//{return other*coef;}
typedef Matrix<INMOST_DATA_REAL_TYPE> rMatrix; //shortcut for real matrix
......
......@@ -237,11 +237,17 @@ namespace INMOST
elems = &new_edges;
curtype = EDGE;
}
for(int q = 0; q < TagElems.NumAttrib(); ++q)
{
XMLReader::XMLAttrib & attr = TagElems.GetAttib(q);
if( attr.name == "Number" ) nelems = atoi(attr.value.c_str());
if( attr.name == "Number" )
{
nelems = atoi(attr.value.c_str());
matchelems = true;
//std::cout << "nelems: " << nelems << " text " << attr.value.c_str() << std::endl;
}
else reader.Report("Unused attribute for %ss %s='%s'",TagElems.name.c_str(),attr.name.c_str(),attr.value.c_str());
}
......@@ -265,11 +271,7 @@ namespace INMOST
for(int q = 0; q < TagConns.NumAttrib(); ++q)
{
XMLReader::XMLAttrib & attr = TagConns.GetAttib(q);
if( attr.name == "Number" )
{
nconns = atoi(attr.value.c_str());
matchelems = true;
}
if( attr.name == "Number" ) nconns = atoi(attr.value.c_str());
else if( attr.name == "Type" ) subtype = reader.atoes(attr.value.c_str());
else if( attr.name == "Offset" ) offset = atoi(attr.value.c_str());
else reader.Report("Unused attribute for %ss %s='%s'",TagConns.name.c_str(),attr.name.c_str(),attr.value.c_str());
......
......@@ -1652,7 +1652,7 @@ namespace INMOST
{
dim = dims;
DeleteTag(tag_coords);
tag_coords = CreateTag("COORD",DATA_REAL, NODE,NONE,dim);
tag_coords = CreateTag("PROTECTED_COORD",DATA_REAL, NODE,NONE,dim);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment