Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xdmf
Xdmf
Commits
62be8bc4
Commit
62be8bc4
authored
Sep 23, 2010
by
Kenneth Leiter
Browse files
ENH: Fix some formatting due to patches.
parent
43654bc7
Changes
6
Hide whitespace changes
Inline
Side-by-side
core/XdmfArray.cpp
View file @
62be8bc4
...
...
@@ -380,6 +380,18 @@ unsigned int XdmfArray::getCapacity() const
return
0
;
}
std
::
string
XdmfArray
::
getDimensionString
()
const
{
return
mDimensionString
;
}
int
XdmfArray
::
getElementSize
()
const
{
boost
::
shared_ptr
<
const
XdmfArrayType
>
aType
=
getArrayType
();
if
(
aType
==
NULL
)
return
(
0
);
return
(
aType
->
getElementSize
());
}
boost
::
shared_ptr
<
XdmfHDF5Controller
>
XdmfArray
::
getHDF5Controller
()
{
return
boost
::
const_pointer_cast
<
XdmfHDF5Controller
>
(
static_cast
<
const
XdmfArray
&>
(
*
this
).
getHDF5Controller
());
...
...
@@ -413,18 +425,6 @@ std::map<std::string, std::string> XdmfArray::getItemProperties() const
return
arrayProperties
;
}
int
XdmfArray
::
getElementSize
()
const
{
boost
::
shared_ptr
<
const
XdmfArrayType
>
aType
=
getArrayType
();
if
(
aType
==
NULL
)
return
(
0
);
return
(
aType
->
getElementSize
());
}
std
::
string
XdmfArray
::
getDimensionString
()
const
{
return
(
mDimensionString
);
}
std
::
string
XdmfArray
::
getItemTag
()
const
{
return
ItemTag
;
...
...
core/XdmfArray.hpp
View file @
62be8bc4
...
...
@@ -87,9 +87,19 @@ public:
*/
unsigned
int
getCapacity
()
const
;
std
::
map
<
std
::
string
,
std
::
string
>
getItemProperties
()
const
;
/**
* Get the original dimensions string from the stored array
*
* @return the dimension string from the stored array
*/
std
::
string
getDimensionString
()
const
;
std
::
string
getItemTag
()
const
;
/**
* Get the size of an element in this array
*
* @return the size of an array element (0 if ArrayType is undefined)
*/
int
getElementSize
()
const
;
/**
* Get the hdf5 controller attached to this XdmfArray.
...
...
@@ -105,6 +115,10 @@ public:
*/
boost
::
shared_ptr
<
const
XdmfHDF5Controller
>
getHDF5Controller
()
const
;
std
::
map
<
std
::
string
,
std
::
string
>
getItemProperties
()
const
;
std
::
string
getItemTag
()
const
;
/**
* Get the name of the array.
*
...
...
@@ -307,20 +321,6 @@ public:
template
<
typename
T
>
void
setValuesInternal
(
const
boost
::
shared_ptr
<
std
::
vector
<
T
>
>
array
);
/**
* Get the size of an element in this array
*
* @return the size of an array element (0 if ArrayType is undefined)
*/
int
getElementSize
()
const
;
/**
* Get the original dimensions string from the stored array
*
* @return the dimension string from the stored array
*/
std
::
string
getDimensionString
()
const
;
/**
* Exchange the contents of the vector with the contents of this XdmfArray. No copy is made. The internal arrays are swapped.
*
...
...
core/XdmfArrayType.cpp
View file @
62be8bc4
...
...
@@ -155,11 +155,14 @@ bool XdmfArrayType::operator!=(const XdmfArrayType & arrayType) const
bool
XdmfArrayType
::
IsEqual
(
boost
::
shared_ptr
<
XdmfArrayType
>
arrayType
)
{
if
(
arrayType
==
NULL
)
return
false
;
if
(
this
==
arrayType
.
get
()
&&
mName
==
arrayType
->
mName
&&
mPrecision
==
arrayType
->
mPrecision
)
return
true
;
if
(
arrayType
==
NULL
)
{
return
false
;
}
if
(
this
==
arrayType
.
get
()
&&
mName
==
arrayType
->
mName
&&
mPrecision
==
arrayType
->
mPrecision
)
{
return
true
;
}
return
false
;
}
...
...
core/XdmfCore.i
View file @
62be8bc4
...
...
@@ -200,39 +200,39 @@ swig -v -c++ -python -o XdmfCorePython.cpp XdmfCore.i
void
copyValueAsInt8
(
int
index
,
char
value
)
{
$
self-
>
insert
(
index
,
&
value);
$
self-
>
insert
(
index
,
value
)
;
}
void
copyValueAsInt16
(
int
index
,
short
value
)
{
$
self-
>
insert
(
index
,
&
value);
$
self-
>
insert
(
index
,
value
)
;
}
void
copyValueAsInt32
(
int
index
,
int
value
)
{
$
self-
>
insert
(
index
,
&
value);
$
self-
>
insert
(
index
,
value
)
;
}
void
copyValueAsInt64
(
int
index
,
long
value
)
{
$
self-
>
insert
(
index
,
&
value);
$
self-
>
insert
(
index
,
value
)
;
}
void
copyValueAsFloat32
(
int
index
,
float
value
)
{
$
self-
>
insert
(
index
,
&
value);
$
self-
>
insert
(
index
,
value
)
;
}
void
copyValueAsFloat64
(
int
index
,
double
value
)
{
$
self-
>
insert
(
index
,
&
value);
$
self-
>
insert
(
index
,
value
)
;
}
void
copyValueAsUInt8
(
int
index
,
unsigned
char
value
)
{
$
self-
>
insert
(
index
,
&
value);
$
self-
>
insert
(
index
,
value
)
;
}
void
copyValueAsUInt16
(
int
index
,
unsigned
short
value
)
{
$
self-
>
insert
(
index
,
&
value);
$
self-
>
insert
(
index
,
value
)
;
}
void
copyValueAsUInt32
(
int
index
,
unsigned
int
value
)
{
$
self-
>
insert
(
index
,
&
value);
$
self-
>
insert
(
index
,
value
)
;
}
}
;
...
...
core/XdmfWriter.hpp
View file @
62be8bc4
...
...
@@ -20,7 +20,6 @@ class XdmfHDF5Writer;
* If a dataset is encountered that resides in a different heavy data file on disk, the dataset is read from disk and written
* to the new hdf5 file. If this is undesired, the XdmfWriter can be set to DistributedHeavyData mode in which the writer
* will automatically reference any hdf5 dataset even if it resides in a different file than the one currently being written to.
* written.
*/
class
XdmfWriter
:
public
XdmfVisitor
,
public
Loki
::
Visitor
<
XdmfArray
>
{
...
...
utils/tests/Cxx/CMakeLists.txt
View file @
62be8bc4
...
...
@@ -5,27 +5,27 @@ SET_PROPERTY(GLOBAL APPEND PROPERTY CXX_TEST_DEPENDENCIES
)
# Include our test macros
include
(
UseCxxTest
)
include
(
AddTestsCxx
)
# Add any cxx tests here:
# Note: We don't want to use a foreach loop to test the files incase we
# have extra arguments (id: ADD_
CXX_
TEST(testname inputfile))
# have extra arguments (id: ADD_TEST
_CXX
(testname inputfile))
# Read UseCxxTest.cmake for more information
# ---------------------------------------
ADD_
CXX_
TEST
(
TestXdmfTopologyConverter
)
ADD_TEST
_CXX
(
TestXdmfTopologyConverter
)
if
(
XDMF_BUILD_EXODUS_IO
)
ADD_
CXX_
TEST
(
TestXdmfExodusIO
)
ADD_TEST
_CXX
(
TestXdmfExodusIO
)
endif
(
XDMF_BUILD_EXODUS_IO
)
# Add any cxx cleanup here:
# Note: We don't want to use a foreach loop to test the files incase we
# have multiple files (ie: CLEAN_
CXX_
TEST(testname outputfile1 ...))
# have multiple files (ie: CLEAN_TEST
_CXX
(testname outputfile1 ...))
# Read UseCxxTest.cmake for more information
# ---------------------------------------
CLEAN_
CXX_
TEST
(
TestXdmfTopologyConverter
)
CLEAN_TEST
_CXX
(
TestXdmfTopologyConverter
)
if
(
XDMF_BUILD_EXODUS_IO
)
CLEAN_
CXX_
TEST
(
TestXdmfExodusIO
CLEAN_TEST
_CXX
(
TestXdmfExodusIO
TestXdmfExodusIO.exo
)
endif
(
XDMF_BUILD_EXODUS_IO
)
\ No newline at end of file
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