Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
INMOST
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Terekhov
INMOST
Commits
35a37cf4
Commit
35a37cf4
authored
Mar 26, 2018
by
igor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temporary solution on print_tag instead of Mesh::file_options
parent
d2dcaa2b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
22 deletions
+44
-22
Source/Data/tag.cpp
Source/Data/tag.cpp
+14
-12
Source/Headers/inmost_data.h
Source/Headers/inmost_data.h
+22
-3
Source/IO/mesh_vtk_file.cpp
Source/IO/mesh_vtk_file.cpp
+8
-7
No files found.
Source/Data/tag.cpp
View file @
35a37cf4
...
...
@@ -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
()
...
...
Source/Headers/inmost_data.h
View file @
35a37cf4
...
...
@@ -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
];
...
...
Source/IO/mesh_vtk_file.cpp
View file @
35a37cf4
...
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment