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
30954f8f
Commit
30954f8f
authored
12 years ago
by
Nicolas Marsic
Browse files
Options
Downloads
Patches
Plain Diff
Jacobian correction (??) + FunctionSpace & DofManager cooperation
parent
b11b7fba
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
+5
-3
5 additions, 3 deletions
FunctionSpace/FunctionSpace.cpp
FunctionSpace/FunctionSpace.h
+27
-1
27 additions, 1 deletion
FunctionSpace/FunctionSpace.h
with
32 additions
and
4 deletions
FunctionSpace/FunctionSpace.cpp
+
5
−
3
View file @
30954f8f
...
...
@@ -5,14 +5,15 @@ using namespace std;
FunctionSpace
::
FunctionSpace
(
const
GroupOfElement
&
goe
,
int
basisType
,
int
order
){
// Save GroupOfElement //
this
->
goe
=
&
goe
;
this
->
goe
=
&
goe
;
// Look for 1st element to get element type //
// (We suppose only one type of Mesh !!) //
int
elementType
=
goe
.
get
(
0
).
getType
();
// Create Basis //
basis
=
BasisGenerator
::
generate
(
elementType
,
basisType
,
order
);
// Init Struct //
basis
=
BasisGenerator
::
generate
(
elementType
,
basisType
,
order
);
eToGoD
=
new
map
<
const
MElement
*
,
const
GroupOfDof
*
,
ElementComparator
>
;
// Count Function per Entity //
int
nVertex
=
goe
.
get
(
0
).
getNumVertices
();
...
...
@@ -37,5 +38,6 @@ FunctionSpace::FunctionSpace(const GroupOfElement& goe, int basisType, int order
FunctionSpace
::~
FunctionSpace
(
void
){
delete
basis
;
delete
eToGoD
;
}
This diff is collapsed.
Click to expand it.
FunctionSpace/FunctionSpace.h
+
27
−
1
View file @
30954f8f
#ifndef _FUNCTIONSPACE_H_
#define _FUNCTIONSPACE_H_
#include
<map>
#include
"Dof.h"
#include
"GroupOfDof.h"
#include
"Basis.h"
#include
"GroupOfElement.h"
#include
"MElement.h"
...
...
@@ -13,14 +18,19 @@
@todo
Hybrid Mesh@n
Put DofManager::dofFromElement here ??
*/
class
ElementComparator
;
class
FunctionSpace
{
private:
friend
class
DofManager
;
const
Basis
*
basis
;
const
GroupOfElement
*
goe
;
std
::
map
<
const
MElement
*
,
const
GroupOfDof
*
,
ElementComparator
>*
eToGoD
;
int
fPerVertex
;
int
fPerEdge
;
int
fPerFace
;
...
...
@@ -39,6 +49,14 @@ class FunctionSpace{
int
getNFunctionPerEdge
(
MElement
&
element
)
const
;
int
getNFunctionPerFace
(
MElement
&
element
)
const
;
int
getNFunctionPerCell
(
MElement
&
element
)
const
;
private:
void
associate
(
const
MElement
&
element
,
const
GroupOfDof
&
god
);
};
class
ElementComparator
{
public:
bool
operator
()(
const
MElement
*
a
,
const
MElement
*
b
)
const
;
};
//////////////////////
...
...
@@ -69,4 +87,12 @@ inline int FunctionSpace::getNFunctionPerCell(MElement& element) const{
return
fPerCell
;
}
inline
void
FunctionSpace
::
associate
(
const
MElement
&
element
,
const
GroupOfDof
&
god
){
//return fPerCell;
}
inline
bool
ElementComparator
::
operator
()(
const
MElement
*
a
,
const
MElement
*
b
)
const
{
return
a
->
getNum
()
<
b
->
getNum
();
}
#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