Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
53b26ccc
Commit
53b26ccc
authored
12 years ago
by
Nicolas Marsic
Browse files
Options
Downloads
Patches
Plain Diff
Port to MElement
parent
69b16dec
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
FunctionSpace/FunctionSpace.cpp
+1
-1
1 addition, 1 deletion
FunctionSpace/FunctionSpace.cpp
FunctionSpace/FunctionSpace.h
+12
-12
12 additions, 12 deletions
FunctionSpace/FunctionSpace.h
with
13 additions
and
13 deletions
FunctionSpace/FunctionSpace.cpp
+
1
−
1
View file @
53b26ccc
...
...
@@ -3,7 +3,7 @@
using
namespace
std
;
FunctionSpace
::
FunctionSpace
(
void
){
ebLookUp
=
new
map
<
Element
*
,
Basis
*
,
ElementComparator
>
;
ebLookUp
=
new
map
<
M
Element
*
,
Basis
*
,
ElementComparator
>
;
}
FunctionSpace
::~
FunctionSpace
(
void
){
...
...
This diff is collapsed.
Click to expand it.
FunctionSpace/FunctionSpace.h
+
12
−
12
View file @
53b26ccc
...
...
@@ -2,7 +2,7 @@
#define _FUNCTIONSPACE_H_
#include
<map>
#include
"Element.h"
#include
"
M
Element.h"
#include
"Jacobian.h"
#include
"Basis.h"
...
...
@@ -21,39 +21,39 @@
class
FunctionSpace
{
private:
class
ElementComparator
{
public:
bool
operator
()(
const
Element
*
a
,
const
Element
*
b
)
const
;
bool
operator
()(
const
M
Element
*
a
,
const
M
Element
*
b
)
const
;
};
std
::
map
<
Element
*
,
Basis
*
,
ElementComparator
>*
ebLookUp
;
// Element to Basis Lookup
std
::
map
<
M
Element
*
,
Basis
*
,
ElementComparator
>*
ebLookUp
;
// Element to Basis Lookup
public
:
FunctionSpace
(
void
);
~
FunctionSpace
(
void
);
void
associate
(
Element
&
element
,
Basis
&
basis
);
void
associate
(
M
Element
&
element
,
Basis
&
basis
);
void
associate
(
int
physical
,
Basis
&
basis
);
Basis
&
getBasis
(
Element
&
element
)
const
;
Basis
&
getBasis
(
M
Element
&
element
)
const
;
};
//////////////////////
// Inline Functions //
//////////////////////
inline
void
FunctionSpace
::
associate
(
Element
&
element
,
Basis
&
basis
){
ebLookUp
->
insert
(
std
::
pair
<
Element
*
,
Basis
*>
(
&
element
,
&
basis
));
inline
void
FunctionSpace
::
associate
(
M
Element
&
element
,
Basis
&
basis
){
ebLookUp
->
insert
(
std
::
pair
<
M
Element
*
,
Basis
*>
(
&
element
,
&
basis
));
}
inline
Basis
&
FunctionSpace
::
getBasis
(
Element
&
element
)
const
{
inline
Basis
&
FunctionSpace
::
getBasis
(
M
Element
&
element
)
const
{
return
*
(
ebLookUp
->
find
(
&
element
)
->
second
);
}
inline
bool
FunctionSpace
::
ElementComparator
::
operator
()
(
const
Element
*
a
,
const
Element
*
b
)
const
{
return
a
->
get
Id
()
<
b
->
get
Id
();
(
const
M
Element
*
a
,
const
M
Element
*
b
)
const
{
return
a
->
get
Num
()
<
b
->
get
Num
();
}
#endif
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