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
aae3df2d
Commit
aae3df2d
authored
15 years ago
by
Éric Béchet
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
de897743
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
contrib/arc/highlevel.h
+32
-2
32 additions, 2 deletions
contrib/arc/highlevel.h
contrib/arc/mainElasticity.cpp
+1
-1
1 addition, 1 deletion
contrib/arc/mainElasticity.cpp
with
33 additions
and
3 deletions
contrib/arc/highlevel.h
+
32
−
2
View file @
aae3df2d
...
@@ -31,20 +31,24 @@ template<class T> struct TensorialTraits
...
@@ -31,20 +31,24 @@ template<class T> struct TensorialTraits
typedef
T
ValType
;
typedef
T
ValType
;
typedef
T
GradType
[
3
];
typedef
T
GradType
[
3
];
typedef
T
HessType
[
3
][
3
];
typedef
T
HessType
[
3
][
3
];
static
const
int
nb_basis_vectors
=
1
;
// par défaut considéré comme un scalaire
};
};
/*
template<> struct TensorialTraits<double>
template
<
>
struct
TensorialTraits
<
double
>
{
{
typedef
double
ValType
;
typedef
double
ValType
;
typedef
Vector
GradType
;
typedef
Vector
GradType
;
typedef
Tensor2
HessType
;
typedef
Tensor2
HessType
;
static
const
int
nb_basis_vectors
=
1
;
// scalaire
};
};
/*
template<> struct TensorialTraits<Vector>
template<> struct TensorialTraits<Vector>
{
{
typedef Vector ValType;
typedef Vector ValType;
typedef Tensor2 GradType;
typedef Tensor2 GradType;
typedef Tensor3 HessType;
typedef Tensor3 HessType;
static const int nb_basis_vectors=3; // trois vecteurs de base linéairement indépendants.
};
};
*/
*/
...
@@ -61,7 +65,7 @@ public:
...
@@ -61,7 +65,7 @@ public:
class
SpaceBase
// renvoie des clefs de dofs
class
SpaceBase
// renvoie des clefs de dofs
{
{
public:
public:
virtual
void
getDofs
(
MElement
*
e
,
std
::
vector
<
Dof
>
&
vecD
)
{};
//
=0;
virtual
void
getDofs
(
MElement
*
e
,
std
::
vector
<
Dof
>
&
vecD
)
=
0
;
};
};
template
<
class
T
>
class
Space
:
public
SpaceBase
// renvoie des clefs de dofs et des fonctions de formes
template
<
class
T
>
class
Space
:
public
SpaceBase
// renvoie des clefs de dofs et des fonctions de formes
...
@@ -74,6 +78,32 @@ public:
...
@@ -74,6 +78,32 @@ public:
};
};
template
<
class
T
>
class
SpaceLagrange
:
public
Space
<
T
>
// approximation Lagrange ...
{
private:
int
_iField
;
Dof
getLocalDof
(
MElement
*
e
,
int
i
)
const
{
int
iComp
=
i
/
e
->
getNumVertices
();
int
ithLocalVertex
=
i
%
e
->
getNumVertices
();
return
Dof
(
e
->
getVertex
(
ithLocalVertex
)
->
getNum
(),
Dof
::
createTypeWithTwoInts
(
iComp
,
_iField
));
}
public
:
SpaceLagrange
(
int
iField
)
:
_iField
(
iField
){};
virtual
~
SpaceLagrange
(){};
virtual
void
getDofsandSFs
(
MElement
*
e
,
std
::
vector
<
std
::
pair
<
Dof
,
Function
<
T
>*
>
>
&
vecDFF
){}
virtual
void
getSFs
(
std
::
vector
<
std
::
pair
<
Dof
,
Function
<
T
>*
>
>
&
vecDFF
){};
//=0;
virtual
void
getDofs
(
MElement
*
e
,
std
::
vector
<
Dof
>
&
vecD
)
{
int
ndofs
=
e
->
getNumVertices
()
*
TensorialTraits
<
T
>::
nb_basis_vectors
;
for
(
int
i
=
0
;
i
<
ndofs
;
++
i
)
vecD
.
push_back
(
getLocalDof
(
e
,
i
));
}
};
template
<
class
T
>
class
Field
:
public
Function
<
T
>
// renvoie des valeurs de champ (ff*valeurs dofs), gradient , etc...
template
<
class
T
>
class
Field
:
public
Function
<
T
>
// renvoie des valeurs de champ (ff*valeurs dofs), gradient , etc...
{
{
public:
public:
...
...
This diff is collapsed.
Click to expand it.
contrib/arc/mainElasticity.cpp
+
1
−
1
View file @
aae3df2d
...
@@ -21,7 +21,7 @@ int main (int argc, char* argv[])
...
@@ -21,7 +21,7 @@ int main (int argc, char* argv[])
fnl
.
func
();
fnl
.
func
();
fnl
.
func2
();
fnl
.
func2
();
SpaceLagrange
<
double
>
L
(
123
);
// globals are still present in Gmsh
// globals are still present in Gmsh
GmshInitialize
(
argc
,
argv
);
GmshInitialize
(
argc
,
argv
);
...
...
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