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
276ef1e6
Commit
276ef1e6
authored
11 years ago
by
Karsten Rink
Browse files
Options
Downloads
Patches
Plain Diff
setup of basic structure
parent
e62709c6
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
MeshLib/ElementStatus.cpp
+2
-2
2 additions, 2 deletions
MeshLib/ElementStatus.cpp
MeshLib/ElementStatus.h
+26
-9
26 additions, 9 deletions
MeshLib/ElementStatus.h
with
28 additions
and
11 deletions
MeshLib/ElementStatus.cpp
+
2
−
2
View file @
276ef1e6
/**
* \file
* \file
ElementStatus.cpp
* \author Karsten Rink
* \date 2012-12-18
* \brief Implementation of the ElementStatus class.
...
...
@@ -17,7 +17,7 @@
namespace
MeshLib
{
ElementStatus
::
ElementStatus
(
Mesh
const
*
const
mesh
)
:
_mesh
(
mesh
),
_status
(
mesh
->
getNElements
(),
true
)
:
_mesh
(
mesh
),
_element
_status
(
mesh
->
getNElements
(),
true
)
{
}
...
...
This diff is collapsed.
Click to expand it.
MeshLib/ElementStatus.h
+
26
−
9
View file @
276ef1e6
/**
* \file
* \file
ElementStatus.h
* \author Karsten Rink
* \date 2012-12-18
* \brief Definition of the ElementStatus class.
...
...
@@ -20,30 +20,47 @@
namespace
MeshLib
{
/**
*
An object to store which elements of the mesh are active and which are inactive
*
Manages active/inactive mesh elements and their nodes
*/
class
ElementStatus
{
public:
/// Constructor
using mesh
/// Constructor
ElementStatus
(
Mesh
const
*
const
mesh
);
bool
getElementStatus
(
unsigned
i
)
{
return
_status
[
i
];
};
/// Returns a vector of active element IDs
std
::
vector
<
unsigned
>
getActiveElements
()
const
{};
bool
isActive
(
unsigned
i
)
{
return
_status
[
i
];
};
/// Returns a vector of active node IDs
std
::
vector
<
unsigned
>
getActiveNodes
()
const
{};
/// Returns the status of element i
bool
getElementStatus
(
unsigned
i
)
const
{
return
_element_status
[
i
];
}
void
setActive
(
unsigned
i
)
{
_status
[
i
]
=
true
;
};
/// Returns a vector of active elements connected to a node
std
::
vector
<
MeshLib
::
Element
*>
getActiveElements
(
unsigned
node_id
)
const
{};
/// Returns the total number of active nodes
unsigned
getNActiveNodes
()
const
{};
void
setInactive
(
unsigned
i
)
{
_status
[
i
]
=
false
;
};
/// Returns the total number of active elements
unsigned
getNActiveElements
()
const
{};
void
setElementStatus
(
unsigned
i
,
bool
status
)
{
_status
[
i
]
=
status
;
};
/// Returns the status of element
bool
isActive
(
unsigned
i
)
const
{
return
_element_status
[
i
];
}
/// Sets the status of element i
void
setElementStatus
(
unsigned
i
,
bool
status
)
{
_element_status
[
i
]
=
status
;
}
/// Sets the status of material group i
void
setMaterialStatus
(
unsigned
i
,
bool
status
)
{};
~
ElementStatus
()
{};
protected
:
Mesh
const
*
const
_mesh
;
std
::
vector
<
bool
>
_status
;
std
::
vector
<
bool
>
_element
_status
;
};
/* class */
...
...
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