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
50bad078
Commit
50bad078
authored
15 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
ideas for functionSpace
parent
cb680490
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Solver/functionSpace.h
+80
-0
80 additions, 0 deletions
Solver/functionSpace.h
with
80 additions
and
0 deletions
Solver/functionSpace.h
0 → 100644
+
80
−
0
View file @
50bad078
#ifndef _FUNCTION_SPACE_H_
#define _FUNCTION_SPACE_H_
#include
"SVector3.h"
class
STensor3
{};
class
SVoid
{};
class
basisFunction
{
public:
void
f
(
MElement
*
ele
,
double
u
,
double
v
,
double
w
,
double
*
s
)
=
0
;
void
df
(
MElement
*
ele
,
double
u
,
double
v
,
double
w
,
double
*
s
)
=
0
;
};
class
scalarPolynomialBasisFunction
:
public
basisFunction
{
private:
polynomialBasis
*
_basis
;
public:
void
f
(
MElement
*
ele
,
double
u
,
double
v
,
double
w
,
doble
*
s
);
void
df
(
MElement
*
ele
,
double
u
,
double
v
,
double
w
,
double
*
s
);
};
class
vectorPolynomialBasisFunction
:
public
basisFunction
{
private:
polynomialBasis
*
_basis
[
3
];
public:
void
f
(
MElement
*
ele
,
double
u
,
double
v
,
double
w
,
doble
*
s
);
void
df
(
MElement
*
ele
,
double
u
,
double
v
,
double
w
,
double
*
s
);
};
template
<
class
T
>
struct
TensorialTraits
{
typedef
T
ValType
;
typedef
T
GradType
[
3
];
typedef
T
HessType
[
3
][
3
];
typedef
SVoid
DivType
;
typedef
SVoid
CurlType
;
};
template
<
>
struct
TensorialTraits
<
double
>
{
typedef
double
ValType
;
typedef
SVector3
GradType
;
typedef
STensor3
HessType
;
typedef
SVoid
DivType
;
typedef
SVoid
CurlType
;
};
template
<
>
struct
TensorialTraits
<
SVector3
>
{
typedef
SVector3
ValType
;
typedef
STensor3
GradType
;
typedef
SVoid
HessType
;
typedef
double
DivType
;
typedef
SVector3
CurlType
;
};
template
<
class
T
>
class
functionSpace
{
protected:
typedef
typename
TensorialTraits
<
T
>::
ValType
ValType
;
typedef
typename
TensorialTraits
<
T
>::
GradType
GradType
;
std
::
vector
<
basisFunction
*>
basisFunctions
;
public:
ValType
f
(
MElement
*
ele
,
double
u
,
double
v
,
double
w
);
GradType
gradf
(
MElement
*
ele
,
double
u
,
double
v
,
double
w
);
int
getNumKeys
(
MElement
*
ele
);
void
getKeys
(
MElement
*
ele
,
Dof
*
keys
);
};
template
<
class
T
>
class
productFunctionSpace
:
public
functionSpace
{
private:
std
::
vector
<
functionSpace
*>
_spaces
;
public:
ValType
f
(
MElement
*
ele
,
double
u
,
double
v
,
double
w
);
GradType
gradf
(
MElement
*
ele
,
double
u
,
double
v
,
double
w
);
};
#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