Commit 35a37cf4 authored by igor's avatar igor

Temporary solution on print_tag instead of Mesh::file_options

parent d2dcaa2b
......@@ -163,8 +163,8 @@ namespace INMOST
{
for(int i = 0; i < NUM_ELEMENT_TYPS; i++)
{
pos[i] = other.pos[i];
sparse[i] = other.sparse[i];
pos[i] = other.pos[i];
sparse[i] = other.sparse[i];
}
tagname = other.tagname;
dtype = other.dtype;
......@@ -173,23 +173,25 @@ namespace INMOST
size = other.size;
record_size = other.record_size;
bytes_size = other.bytes_size;
print_tag = other.print_tag; //Temporary solution: @see Mesh::file_options
}
TagMemory & TagMemory::operator =(TagMemory const & other)
{
for(int i = 0; i < NUM_ELEMENT_TYPS; i++)
{
pos[i] = other.pos[i];
sparse[i] = other.sparse[i];
pos[i] = other.pos[i];
sparse[i] = other.sparse[i];
}
tagname = other.tagname;
dtype = other.dtype;
bulk_data_type = other.bulk_data_type;
m_link = other.m_link;
size = other.size;
record_size = other.record_size;
bytes_size = other.bytes_size;
return *this;
tagname = other.tagname;
dtype = other.dtype;
bulk_data_type = other.bulk_data_type;
m_link = other.m_link;
size = other.size;
record_size = other.record_size;
bytes_size = other.bytes_size;
print_tag = other.print_tag; //Temporary solution: @see Mesh::file_options
return *this;
}
TagMemory::TagMemory()
......
......@@ -170,13 +170,20 @@ namespace INMOST
/// on certain elements of the mesh.
bool sparse[NUM_ELEMENT_TYPS];
///Number of bytes used to store data for one element. It is size times bytes_size for data of
// fixed size or number of bytes for the structure used to represent data of variable size.
/// fixed size or number of bytes for the structure used to represent data of variable size.
INMOST_DATA_ENUM_TYPE record_size;
///Print this tag to files.
/// Temporary solution for compatibility with external packages.
/// @see Mesh::SetPrint
/// @see Mesh::GetPrint
/// \todo The general solution:
/// @see Mesh::file_options
bool print_tag;
///Link to the mesh.
Mesh * m_link;
/// Provide access to interface.
///Provide access to interface.
friend class Tag;
/// For debug purposes only.
///For debug purposes only.
friend class Storage;
};
......@@ -222,6 +229,8 @@ namespace INMOST
__INLINE bool isSparseByDim(INMOST_DATA_INTEGER_TYPE typenum)const;
__INLINE bool isDefinedByDim(INMOST_DATA_INTEGER_TYPE typenum)const;
__INLINE void SetBulkDataType(INMOST_MPI_Type type);
__INLINE void SetPrint(bool print);
__INLINE bool GetPrint() const;
friend class TagManager;
friend class Storage;
friend class Mesh;
......@@ -788,6 +797,16 @@ namespace INMOST
mem->sparse[ElementNum(type)] = true;
}
__INLINE void Tag::SetPrint(bool print)
{
mem->print_tag = print;
}
__INLINE bool Tag::GetPrint() const
{
return mem->print_tag;
}
__INLINE INMOST_DATA_ENUM_TYPE Tag::GetPositionByDim(INMOST_DATA_ENUM_TYPE typenum) const
{
return mem->pos[typenum];
......
......@@ -329,13 +329,14 @@ safe_output:
//printf("%s %d %d %d\n",tag_names[i].c_str(),t.isDefined(CELL),!t.isSparse(CELL),t.GetDataType() != DATA_BULK);
if (((t.isDefined(CELL) && !t.isSparse(CELL))
|| (t.isDefined(FACE) && output_faces)) &&
t.GetDataType() != DATA_BULK &&
t.GetDataType() != DATA_REFERENCE &&
t.GetDataType() != DATA_REMOTE_REFERENCE &&
t != CoordsTag() &&
t != SharedTag() &&
t != SendtoTag() &&
t != ProcessorsTag())
t.GetPrint() && //Temporary solution: @see Mesh::file_option
t.GetDataType() != DATA_BULK &&
t.GetDataType() != DATA_REFERENCE &&
t.GetDataType() != DATA_REMOTE_REFERENCE &&
t != CoordsTag() &&
t != SharedTag() &&
t != SendtoTag() &&
t != ProcessorsTag())
{
//printf("added!\n");
tags.push_back(t);
......
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