Skip to content
GitLab
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
bc2792d3
Commit
bc2792d3
authored
Oct 25, 2010
by
Kenneth Leiter
Browse files
Merge to current master
parents
6fd19037
ab5584f2
Changes
12
Hide whitespace changes
Inline
Side-by-side
XdmfGridCurvilinear.cpp
View file @
bc2792d3
...
...
@@ -94,7 +94,7 @@ public:
private:
XdmfTopologyTypeCurvilinear
(
const
XdmfGridCurvilinear
*
const
curvilinearGrid
)
:
XdmfTopologyType
(
0
,
"foo"
,
XdmfTopologyType
::
Structured
),
XdmfTopologyType
(
0
,
"foo"
,
XdmfTopologyType
::
Structured
,
0x1110
),
mCurvilinearGrid
(
curvilinearGrid
)
{
}
...
...
XdmfGridRectilinear.cpp
View file @
bc2792d3
...
...
@@ -187,7 +187,7 @@ public:
private:
XdmfTopologyTypeRectilinear
(
const
XdmfGridRectilinear
*
const
rectilinearGrid
)
:
XdmfTopologyType
(
0
,
"foo"
,
XdmfTopologyType
::
Structured
),
XdmfTopologyType
(
0
,
"foo"
,
XdmfTopologyType
::
Structured
,
0x1101
),
mRectilinearGrid
(
rectilinearGrid
)
{
}
...
...
XdmfGridRegular.cpp
View file @
bc2792d3
...
...
@@ -186,7 +186,7 @@ public:
private:
XdmfTopologyTypeRegular
(
const
XdmfGridRegular
*
const
regularGrid
)
:
XdmfTopologyType
(
0
,
"foo"
,
XdmfTopologyType
::
Structured
),
XdmfTopologyType
(
0
,
"foo"
,
XdmfTopologyType
::
Structured
,
0x1102
),
mRegularGrid
(
regularGrid
)
{
}
...
...
XdmfTopologyType.cpp
View file @
bc2792d3
...
...
@@ -11,19 +11,19 @@
// Supported XdmfTopologyTypes
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
NoTopologyType
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
0
,
"NoTopology"
,
NoCellType
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
0
,
"NoTopology"
,
NoCellType
,
0x0
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Polyvertex
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
1
,
"Polyvertex"
,
Linear
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
1
,
"Polyvertex"
,
Linear
,
0x1
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Polyline
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
1
,
"Polyline"
,
Linear
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
1
,
"Polyline"
,
Linear
,
0x2
));
return
p
;
}
...
...
@@ -35,145 +35,146 @@ boost::shared_ptr<const XdmfTopologyType> XdmfTopologyType::Polygon(const unsign
{
return
type
->
second
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
nodesPerElement
,
"Polygon"
,
Linear
));
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
nodesPerElement
,
"Polygon"
,
Linear
,
0x3
));
previousTypes
[
nodesPerElement
]
=
p
;
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Triangle
()
{
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
3
,
"Triangle"
,
Linear
));
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
3
,
"Triangle"
,
Linear
,
0x4
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Quadrilateral
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
4
,
"Quadrilateral"
,
Linear
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
4
,
"Quadrilateral"
,
Linear
,
0x5
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Tetrahedron
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
4
,
"Tetrahedron"
,
Linear
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
4
,
"Tetrahedron"
,
Linear
,
0x6
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Pyramid
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
5
,
"Pyramid"
,
Linear
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
5
,
"Pyramid"
,
Linear
,
0x7
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Wedge
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
6
,
"Wedge"
,
Linear
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
6
,
"Wedge"
,
Linear
,
0x8
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Hexahedron
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
8
,
"Hexahedron"
,
Linear
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
8
,
"Hexahedron"
,
Linear
,
0x9
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Edge_3
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
3
,
"Edge_3"
,
Quadratic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
3
,
"Edge_3"
,
Quadratic
,
0x22
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Triangle_6
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
6
,
"Triangle_6"
,
Quadratic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
6
,
"Triangle_6"
,
Quadratic
,
0x24
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Quadrilateral_8
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
8
,
"Quadrilateral_8"
,
Quadratic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
8
,
"Quadrilateral_8"
,
Quadratic
,
0x25
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Quadrilateral_9
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
9
,
"Quadrilateral_9"
,
Quadratic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
9
,
"Quadrilateral_9"
,
Quadratic
,
0x23
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Tetrahedron_10
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
10
,
"Tetrahedron_10"
,
Quadratic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
10
,
"Tetrahedron_10"
,
Quadratic
,
0x26
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Pyramid_13
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
13
,
"Pyramid_13"
,
Quadratic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
13
,
"Pyramid_13"
,
Quadratic
,
0x27
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Wedge_15
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
15
,
"Wedge_15"
,
Quadratic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
15
,
"Wedge_15"
,
Quadratic
,
0x28
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Wedge_18
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
18
,
"Wedge_18"
,
Quadratic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
18
,
"Wedge_18"
,
Quadratic
,
0x29
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Hexahedron_20
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
20
,
"Hexahedron_20"
,
Quadratic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
20
,
"Hexahedron_20"
,
Quadratic
,
0x30
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Hexahedron_24
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
24
,
"Hexahedron_24"
,
Quadratic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
24
,
"Hexahedron_24"
,
Quadratic
,
0x31
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Hexahedron_27
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
27
,
"Hexahedron_27"
,
Quadratic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
27
,
"Hexahedron_27"
,
Quadratic
,
0x32
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Hexahedron_64
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
64
,
"Hexahedron_64"
,
Cubic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
64
,
"Hexahedron_64"
,
Cubic
,
0x33
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Hexahedron_64_GLL
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
64
,
"Hexahedron_64_GLL"
,
Cubic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
64
,
"Hexahedron_64_GLL"
,
Cubic
,
0x35
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Hexahedron_125
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
125
,
"Hexahedron_125"
,
Quartic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
125
,
"Hexahedron_125"
,
Quartic
,
0x34
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Hexahedron_125_GLL
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
125
,
"Hexahedron_125_GLL"
,
Quartic
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
125
,
"Hexahedron_125_GLL"
,
Quartic
,
0x36
));
return
p
;
}
boost
::
shared_ptr
<
const
XdmfTopologyType
>
XdmfTopologyType
::
Mixed
()
{
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
0
,
"Mixed"
,
Arbitrary
));
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
p
(
new
XdmfTopologyType
(
0
,
"Mixed"
,
Arbitrary
,
0x70
));
return
p
;
}
XdmfTopologyType
::
XdmfTopologyType
(
const
unsigned
int
nodesPerElement
,
const
std
::
string
&
name
,
const
CellType
cellType
)
:
XdmfTopologyType
::
XdmfTopologyType
(
const
unsigned
int
nodesPerElement
,
const
std
::
string
&
name
,
const
CellType
cellType
,
const
unsigned
int
id
)
:
mCellType
(
cellType
),
mID
(
id
),
mName
(
name
),
mNodesPerElement
(
nodesPerElement
)
{
...
...
@@ -297,6 +298,11 @@ XdmfTopologyType::CellType XdmfTopologyType::getCellType() const
return
mCellType
;
}
unsigned
int
XdmfTopologyType
::
getID
()
const
{
return
mID
;
}
std
::
string
XdmfTopologyType
::
getName
()
const
{
return
mName
;
...
...
XdmfTopologyType.hpp
View file @
bc2792d3
...
...
@@ -90,6 +90,13 @@ public:
*/
CellType
getCellType
()
const
;
/**
* Get the id of this cell type, necessary in order to create grids containing mixed cells.
*
* @return the ID of the topology type.
*/
virtual
unsigned
int
getID
()
const
;
/**
* Get the name of this topology type.
*
...
...
@@ -113,7 +120,7 @@ protected:
* by Xdmf should be accessed through more specific static methods that construct XdmfTopologyType -
* i.e. XdmfTopologyType::Tetrahedron()
*/
XdmfTopologyType
(
const
unsigned
int
nodesPerElement
,
const
std
::
string
&
name
,
const
CellType
cellType
);
XdmfTopologyType
(
const
unsigned
int
nodesPerElement
,
const
std
::
string
&
name
,
const
CellType
cellType
,
const
unsigned
int
id
);
private:
...
...
@@ -122,9 +129,11 @@ private:
static
boost
::
shared_ptr
<
const
XdmfTopologyType
>
New
(
const
std
::
map
<
std
::
string
,
std
::
string
>
&
itemProperties
);
CellType
mCellType
;
std
::
string
mName
;
unsigned
int
mNodesPerElement
;
const
CellType
mCellType
;
const
unsigned
int
mID
;
const
std
::
string
mName
;
const
unsigned
int
mNodesPerElement
;
};
#endif
/* XDMFTOPOLOGYTYPE_HPP_ */
core/XdmfHDF5Writer.hpp
View file @
bc2792d3
...
...
@@ -62,8 +62,6 @@ private:
XdmfHDF5Writer
(
const
XdmfHDF5Writer
&
hdf5Writer
);
// Not implemented.
void
operator
=
(
const
XdmfHDF5Writer
&
hdf5Writer
);
// Not implemented.
int
mDataSetId
;
};
#endif
/* XDMFHDF5WRITER_HPP_ */
core/XdmfHeavyDataController.cpp
View file @
bc2792d3
...
...
@@ -4,9 +4,9 @@
#include
"XdmfHeavyDataController.hpp"
#include
"XdmfSystemUtils.hpp"
XdmfHeavyDataController
::
XdmfHeavyDataController
(
const
std
::
string
&
heavyDataF
ilePath
,
const
std
::
string
&
dataSetPath
,
const
unsigned
int
size
,
const
boost
::
shared_ptr
<
const
XdmfArrayType
>
type
)
:
XdmfHeavyDataController
::
XdmfHeavyDataController
(
const
std
::
string
&
f
ilePath
,
const
std
::
string
&
dataSetPath
,
const
unsigned
int
size
,
const
boost
::
shared_ptr
<
const
XdmfArrayType
>
type
)
:
mDataSetPath
(
dataSetPath
),
mFilePath
(
XdmfSystemUtils
::
getRealPath
(
heavyDataF
ilePath
)),
mFilePath
(
XdmfSystemUtils
::
getRealPath
(
f
ilePath
)),
mSize
(
size
),
mType
(
type
)
{
...
...
core/XdmfHeavyDataController.hpp
View file @
bc2792d3
...
...
@@ -69,7 +69,7 @@ public:
protected:
XdmfHeavyDataController
(
const
std
::
string
&
hdf5F
ilePath
,
const
std
::
string
&
dataSetPath
,
const
unsigned
int
size
,
const
boost
::
shared_ptr
<
const
XdmfArrayType
>
type
);
XdmfHeavyDataController
(
const
std
::
string
&
f
ilePath
,
const
std
::
string
&
dataSetPath
,
const
unsigned
int
size
,
const
boost
::
shared_ptr
<
const
XdmfArrayType
>
type
);
std
::
string
mDataSetPath
;
std
::
string
mFilePath
;
...
...
core/XdmfHeavyDataWriter.cpp
View file @
bc2792d3
...
...
@@ -4,7 +4,15 @@
#include
"XdmfHeavyDataWriter.hpp"
#include
"XdmfSystemUtils.hpp"
XdmfHeavyDataWriter
::
XdmfHeavyDataWriter
()
:
mDataSetId
(
0
),
mFilePath
(
""
),
mMode
(
Default
)
{
}
XdmfHeavyDataWriter
::
XdmfHeavyDataWriter
(
const
std
::
string
&
filePath
)
:
mDataSetId
(
0
),
mFilePath
(
XdmfSystemUtils
::
getRealPath
(
filePath
)),
mMode
(
Default
)
{
...
...
core/XdmfHeavyDataWriter.hpp
View file @
bc2792d3
...
...
@@ -67,8 +67,10 @@ public:
protected:
XdmfHeavyDataWriter
();
XdmfHeavyDataWriter
(
const
std
::
string
&
filePath
);
int
mDataSetId
;
std
::
string
mFilePath
;
Mode
mMode
;
...
...
core/XdmfWriter.cpp
View file @
bc2792d3
...
...
@@ -19,6 +19,8 @@ class XdmfWriter::XdmfWriterImpl {
public:
XdmfWriterImpl
(
const
std
::
string
&
xmlFilePath
,
const
boost
::
shared_ptr
<
XdmfHeavyDataWriter
>
heavyDataWriter
)
:
mDepth
(
0
),
mDocumentTitle
(
"Xdmf"
),
mHeavyDataWriter
(
heavyDataWriter
),
mLastXPathed
(
false
),
mLightDataLimit
(
100
),
...
...
@@ -29,9 +31,7 @@ public:
mXMLFilePath
(
XdmfSystemUtils
::
getRealPath
(
xmlFilePath
)),
mXPathCount
(
0
),
mXPathString
(
""
),
mDocumentTitle
(
"Xdmf"
),
mVersionString
(
"2.0"
),
mDepth
(
0
)
mVersionString
(
"2.0"
)
{
};
...
...
@@ -56,6 +56,8 @@ public:
xmlDocSetRootElement
(
mXMLDocument
,
mXMLCurrentNode
);
}
int
mDepth
;
std
::
string
mDocumentTitle
;
boost
::
shared_ptr
<
XdmfHeavyDataWriter
>
mHeavyDataWriter
;
bool
mLastXPathed
;
unsigned
int
mLightDataLimit
;
...
...
@@ -67,9 +69,8 @@ public:
std
::
map
<
const
XdmfItem
*
const
,
std
::
string
>
mXPath
;
unsigned
int
mXPathCount
;
std
::
string
mXPathString
;
std
::
string
mDocumentTitle
;
std
::
string
mVersionString
;
int
mDepth
;
};
boost
::
shared_ptr
<
XdmfWriter
>
XdmfWriter
::
New
(
const
std
::
string
&
xmlFilePath
)
...
...
core/XdmfWriter.hpp
View file @
bc2792d3
...
...
@@ -149,6 +149,7 @@ private:
void
operator
=
(
const
XdmfWriter
&
coreWriter
);
// Not implemented.
XdmfWriterImpl
*
mImpl
;
};
#endif
/* XDMFWRITER_HPP_ */
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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