Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yuhao Liu
ogs
Commits
d76ea984
Commit
d76ea984
authored
11 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
Reduce number of warnings in MeshLib when using clang.
parent
529f732f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
MeshLib/Elements/Element.h
+2
-3
2 additions, 3 deletions
MeshLib/Elements/Element.h
MeshLib/Location.h
+1
-1
1 addition, 1 deletion
MeshLib/Location.h
MeshLib/Mesh.h
+13
-13
13 additions, 13 deletions
MeshLib/Mesh.h
MeshLib/Node.h
+7
-7
7 additions, 7 deletions
MeshLib/Node.h
with
23 additions
and
24 deletions
MeshLib/Elements/Element.h
+
2
−
3
View file @
d76ea984
...
@@ -64,7 +64,7 @@ public:
...
@@ -64,7 +64,7 @@ public:
void
setNode
(
unsigned
idx
,
Node
*
node
);
void
setNode
(
unsigned
idx
,
Node
*
node
);
/// Get array of element nodes.
/// Get array of element nodes.
Node
*
const
*
getNodes
()
const
{
return
_nodes
;
}
;
Node
*
const
*
getNodes
()
const
{
return
_nodes
;
}
/// Get dimension of the mesh element.
/// Get dimension of the mesh element.
virtual
unsigned
getDimension
()
const
=
0
;
virtual
unsigned
getDimension
()
const
=
0
;
...
@@ -129,9 +129,8 @@ public:
...
@@ -129,9 +129,8 @@ public:
/**
/**
* Get the value for this element. The value can be used to store a link
* Get the value for this element. The value can be used to store a link
* to external information (for instance an index of a field) like material groups.
* to external information (for instance an index of a field) like material groups.
* @return
*/
*/
unsigned
getValue
()
const
{
return
_value
;
}
;
unsigned
getValue
()
const
{
return
_value
;
}
/**
/**
* Set the index value for external information.
* Set the index value for external information.
...
...
This diff is collapsed.
Click to expand it.
MeshLib/Location.h
+
1
−
1
View file @
d76ea984
...
@@ -33,7 +33,7 @@ struct Location
...
@@ -33,7 +33,7 @@ struct Location
std
::
size_t
item_id
;
std
::
size_t
item_id
;
Location
(
std
::
size_t
meshid
,
MeshItemType
itemtype
,
std
::
size_t
itemid
)
Location
(
std
::
size_t
meshid
,
MeshItemType
itemtype
,
std
::
size_t
itemid
)
:
mesh_id
(
meshid
),
item_type
(
itemtype
),
item_id
(
itemid
){}
;
:
mesh_id
(
meshid
),
item_type
(
itemtype
),
item_id
(
itemid
){}
};
};
/// Lexicographic order of Location.
/// Lexicographic order of Location.
...
...
This diff is collapsed.
Click to expand it.
MeshLib/Mesh.h
+
13
−
13
View file @
d76ea984
...
@@ -52,40 +52,40 @@ public:
...
@@ -52,40 +52,40 @@ public:
void
addElement
(
Element
*
elem
);
void
addElement
(
Element
*
elem
);
/// Returns the dimension of the mesh (determined by the maximum dimension over all elements).
/// Returns the dimension of the mesh (determined by the maximum dimension over all elements).
unsigned
getDimension
()
const
{
return
_mesh_dimension
;
}
;
unsigned
getDimension
()
const
{
return
_mesh_dimension
;
}
/// Get the minimum edge length over all elements of the mesh.
/// Get the minimum edge length over all elements of the mesh.
double
getMinEdgeLength
()
{
return
_edge_length
[
0
];
}
;
double
getMinEdgeLength
()
{
return
_edge_length
[
0
];
}
/// Get the maximum edge length over all elements of the mesh.
/// Get the maximum edge length over all elements of the mesh.
double
getMaxEdgeLength
()
{
return
_edge_length
[
1
];
}
;
double
getMaxEdgeLength
()
{
return
_edge_length
[
1
];
}
/// Get the node with the given index.
/// Get the node with the given index.
const
Node
*
getNode
(
unsigned
idx
)
const
{
return
_nodes
[
idx
];
}
;
const
Node
*
getNode
(
unsigned
idx
)
const
{
return
_nodes
[
idx
];
}
/// Get the element with the given index.
/// Get the element with the given index.
const
Element
*
getElement
(
unsigned
idx
)
const
{
return
_elements
[
idx
];
}
;
const
Element
*
getElement
(
unsigned
idx
)
const
{
return
_elements
[
idx
];
}
/// Get the minimum edge length for the mesh
/// Get the minimum edge length for the mesh
double
getMinEdgeLength
()
const
{
return
_edge_length
[
0
];
}
;
double
getMinEdgeLength
()
const
{
return
_edge_length
[
0
];
}
/// Get the maximum edge length for the mesh
/// Get the maximum edge length for the mesh
double
getMaxEdgeLength
()
const
{
return
_edge_length
[
1
];
}
;
double
getMaxEdgeLength
()
const
{
return
_edge_length
[
1
];
}
/// Get the number of elements
/// Get the number of elements
std
::
size_t
getNElements
()
const
{
return
_elements
.
size
();
}
;
std
::
size_t
getNElements
()
const
{
return
_elements
.
size
();
}
/// Get the number of nodes
/// Get the number of nodes
std
::
size_t
getNNodes
()
const
{
return
_nodes
.
size
();
}
;
std
::
size_t
getNNodes
()
const
{
return
_nodes
.
size
();
}
/// Get name of the mesh.
/// Get name of the mesh.
const
std
::
string
getName
()
const
{
return
_name
;
}
;
const
std
::
string
getName
()
const
{
return
_name
;
}
/// Get the nodes-vector for the mesh.
/// Get the nodes-vector for the mesh.
std
::
vector
<
Node
*>
const
&
getNodes
()
const
{
return
_nodes
;
}
;
std
::
vector
<
Node
*>
const
&
getNodes
()
const
{
return
_nodes
;
}
/// Get the element-vector for the mesh.
/// Get the element-vector for the mesh.
std
::
vector
<
Element
*>
const
&
getElements
()
const
{
return
_elements
;
}
;
std
::
vector
<
Element
*>
const
&
getElements
()
const
{
return
_elements
;
}
/// Resets the IDs of all mesh-nodes to their position in the node vector
/// Resets the IDs of all mesh-nodes to their position in the node vector
void
resetNodeIDs
();
void
resetNodeIDs
();
...
@@ -98,7 +98,7 @@ public:
...
@@ -98,7 +98,7 @@ public:
void
setEdgeLengthRange
(
const
double
&
min_length
,
const
double
&
max_length
);
void
setEdgeLengthRange
(
const
double
&
min_length
,
const
double
&
max_length
);
/// Changes the name of the mesh.
/// Changes the name of the mesh.
void
setName
(
const
std
::
string
&
name
)
{
this
->
_name
=
name
;
}
;
void
setName
(
const
std
::
string
&
name
)
{
this
->
_name
=
name
;
}
/// Get id of the mesh
/// Get id of the mesh
std
::
size_t
getID
()
const
{
return
_id
;
}
std
::
size_t
getID
()
const
{
return
_id
;
}
...
...
This diff is collapsed.
Click to expand it.
MeshLib/Node.h
+
7
−
7
View file @
d76ea984
...
@@ -60,16 +60,16 @@ public:
...
@@ -60,16 +60,16 @@ public:
Node
(
const
Node
&
node
);
Node
(
const
Node
&
node
);
/// Return all the nodes connected to this one
/// Return all the nodes connected to this one
const
std
::
vector
<
MeshLib
::
Node
*>&
getConnectedNodes
()
const
{
return
_connected_nodes
;
}
;
const
std
::
vector
<
MeshLib
::
Node
*>&
getConnectedNodes
()
const
{
return
_connected_nodes
;
}
/// Get an element the node is part of.
/// Get an element the node is part of.
const
Element
*
getElement
(
unsigned
idx
)
const
{
return
_elements
[
idx
];
}
;
const
Element
*
getElement
(
unsigned
idx
)
const
{
return
_elements
[
idx
];
}
/// Get all elements the node is part of.
/// Get all elements the node is part of.
const
std
::
vector
<
Element
*>&
getElements
()
const
{
return
_elements
;
}
;
const
std
::
vector
<
Element
*>&
getElements
()
const
{
return
_elements
;
}
/// Get number of elements the node is part of.
/// Get number of elements the node is part of.
std
::
size_t
getNElements
()
const
{
return
_elements
.
size
();
}
;
std
::
size_t
getNElements
()
const
{
return
_elements
.
size
();
}
/// Destructor
/// Destructor
virtual
~
Node
();
virtual
~
Node
();
...
@@ -79,12 +79,12 @@ protected:
...
@@ -79,12 +79,12 @@ protected:
* Add an element the node is part of.
* Add an element the node is part of.
* This method is called by Mesh::addElement(Element*), see friend definition.
* This method is called by Mesh::addElement(Element*), see friend definition.
*/
*/
void
addElement
(
Element
*
elem
)
{
_elements
.
push_back
(
elem
);
}
;
void
addElement
(
Element
*
elem
)
{
_elements
.
push_back
(
elem
);
}
void
setConnectedNodes
(
std
::
vector
<
Node
*>
&
connected_nodes
)
{
this
->
_connected_nodes
=
connected_nodes
;
}
;
void
setConnectedNodes
(
std
::
vector
<
Node
*>
&
connected_nodes
)
{
this
->
_connected_nodes
=
connected_nodes
;
}
/// Sets the ID of a node to the given value.
/// Sets the ID of a node to the given value.
void
setID
(
unsigned
id
)
{
this
->
_id
=
id
;
}
;
void
setID
(
unsigned
id
)
{
this
->
_id
=
id
;
}
/// Update coordinates of a node.
/// Update coordinates of a node.
/// This method automatically also updates the areas/volumes of all connected elements.
/// This method automatically also updates the areas/volumes of all connected elements.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment