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
e581d300
Commit
e581d300
authored
12 years ago
by
Nicolas Marsic
Browse files
Options
Downloads
Patches
Plain Diff
LineBasis
parent
7087c224
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
FunctionSpace/CMakeLists.txt
+5
-3
5 additions, 3 deletions
FunctionSpace/CMakeLists.txt
FunctionSpace/LineNodeBasis.cpp
+97
-0
97 additions, 0 deletions
FunctionSpace/LineNodeBasis.cpp
FunctionSpace/LineNodeBasis.h
+34
-0
34 additions, 0 deletions
FunctionSpace/LineNodeBasis.h
with
136 additions
and
3 deletions
FunctionSpace/CMakeLists.txt
+
5
−
3
View file @
e581d300
...
@@ -16,13 +16,15 @@ set(SRC
...
@@ -16,13 +16,15 @@ set(SRC
CurlBasis.cpp
CurlBasis.cpp
DivBasis.cpp
DivBasis.cpp
QuadNodeBasis.cpp
QuadEdgeBasis.cpp
LagrangeGenerator.cpp
LagrangeGenerator.cpp
LagrangeBasis.cpp
LagrangeBasis.cpp
TriLagrangeBasis.cpp
TriLagrangeBasis.cpp
LineNodeBasis.cpp
QuadNodeBasis.cpp
QuadEdgeBasis.cpp
TriNodeBasis.cpp
TriNodeBasis.cpp
TriEdgeBasis.cpp
TriEdgeBasis.cpp
TriNedelecBasis.cpp
TriNedelecBasis.cpp
...
...
This diff is collapsed.
Click to expand it.
FunctionSpace/LineNodeBasis.cpp
0 → 100644
+
97
−
0
View file @
e581d300
#include
"LineNodeBasis.h"
#include
"Legendre.h"
using
namespace
std
;
LineNodeBasis
::
LineNodeBasis
(
int
order
){
// Set Basis Type //
this
->
order
=
order
;
type
=
0
;
dim
=
1
;
nVertex
=
2
;
nEdge
=
(
order
-
1
);
nFace
=
0
;
nCell
=
0
;
nEdgeClosure
=
2
;
nFaceClosure
=
0
;
size
=
nVertex
+
nEdge
+
nFace
+
nCell
;
// Legendre Polynomial //
Polynomial
*
intLegendre
=
new
Polynomial
[
order
];
Legendre
::
integrated
(
intLegendre
,
order
);
// Basis //
node
=
new
vector
<
Polynomial
*>
(
nVertex
);
edge
=
new
vector
<
vector
<
Polynomial
*>*>
(
nEdgeClosure
);
face
=
new
vector
<
vector
<
Polynomial
*>*>
(
nFaceClosure
);
cell
=
new
vector
<
Polynomial
*>
(
nCell
);
(
*
edge
)[
0
]
=
new
vector
<
Polynomial
*>
(
nEdge
);
(
*
edge
)[
1
]
=
new
vector
<
Polynomial
*>
(
nEdge
);
// Vertex Based (Lagrange) //
(
*
node
)[
0
]
=
new
Polynomial
(
Polynomial
(
1
,
0
,
0
,
0
)
-
Polynomial
(
1
,
1
,
0
,
0
)
*
0.5
);
(
*
node
)[
1
]
=
new
Polynomial
(
Polynomial
(
1
,
0
,
0
,
0
)
+
Polynomial
(
1
,
1
,
0
,
0
)
*
0.5
);
// Edge Based //
const
int
permutation
[
2
]
=
{
0
,
1
};
const
Polynomial
x
[
2
]
=
{
Polynomial
(
+
1
,
1
,
0
,
0
),
Polynomial
(
-
1
,
1
,
0
,
0
)
};
for
(
int
c
=
0
;
c
<
2
;
c
++
){
unsigned
int
i
=
0
;
for
(
int
l
=
1
;
l
<
order
;
l
++
){
(
*
(
*
edge
)[
c
])[
i
]
=
new
Polynomial
(
intLegendre
[
l
].
compose
(
x
[
permutation
[
c
]]));
i
++
;
}
}
// Free Temporary Sapce //
delete
[]
intLegendre
;
}
LineNodeBasis
::~
LineNodeBasis
(
void
){
// Vertex Based //
for
(
int
i
=
0
;
i
<
nVertex
;
i
++
)
delete
(
*
node
)[
i
];
delete
node
;
// Edge Based //
for
(
int
c
=
0
;
c
<
2
;
c
++
){
for
(
int
i
=
0
;
i
<
nEdge
;
i
++
)
delete
(
*
(
*
edge
)[
c
])[
i
];
delete
(
*
edge
)[
c
];
}
delete
edge
;
// Face Based //
delete
face
;
// Cell Based //
delete
cell
;
}
This diff is collapsed.
Click to expand it.
FunctionSpace/LineNodeBasis.h
0 → 100644
+
34
−
0
View file @
e581d300
#ifndef _LINENODEBASIS_H_
#define _LINENODEBASIS_H_
#include
"BasisScalar.h"
/**
@class LineNodeBasis
@brief A Node Basis for Lines
This class can instantiate a Node-Based Basis
(high or low order) for Lines.@n
It uses an @em adaptation of
<a href="http://www.hpfem.jku.at/publications/szthesis.pdf">Zaglmayr's</a>
Basis for @em high @em order Polynomial%s generation.@n
This Basis is a restriction of a Quad Basis to @f$y = 0@f$.@n
It also uses the following mapping: @f$x = \frac{u + 1}{2}@f$.
*/
class
LineNodeBasis
:
public
BasisScalar
{
public:
//! @param order The order of the Basis
//!
//! Returns a new Node-Basis for Lines of the given order
LineNodeBasis
(
int
order
);
//! Deletes this Basis
//!
virtual
~
LineNodeBasis
(
void
);
};
#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