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
72872ed4
Commit
72872ed4
authored
15 years ago
by
Éric Béchet
Browse files
Options
Downloads
Patches
Plain Diff
bricolage
parent
24458bd2
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
contrib/arc/CMakeLists.txt
+1
-0
1 addition, 0 deletions
contrib/arc/CMakeLists.txt
contrib/arc/highlevel.h
+107
-0
107 additions, 0 deletions
contrib/arc/highlevel.h
contrib/arc/mainElasticity.cpp
+1
-1
1 addition, 1 deletion
contrib/arc/mainElasticity.cpp
with
109 additions
and
1 deletion
contrib/arc/CMakeLists.txt
+
1
−
0
View file @
72872ed4
...
...
@@ -3,6 +3,7 @@ add_executable(boris EXCLUDE_FROM_ALL contrib/arc/boris.cpp ${GMSH_SRC})
target_link_libraries
(
boris
${
LINK_LIBRARIES
}
)
# tests pour eric et christophe:
list
(
APPEND EXTERNAL_INCLUDES contrib/arc
)
add_executable
(
elastic EXCLUDE_FROM_ALL contrib/arc/mainElasticity.cpp
${
GMSH_SRC
}
)
target_link_libraries
(
elastic
${
LINK_LIBRARIES
}
)
This diff is collapsed.
Click to expand it.
contrib/arc/highlevel.h
0 → 100644
+
107
−
0
View file @
72872ed4
//
// C++ Interface: highlevel
//
// Description:
//
//
// Author: <Eric Bechet>, (C) 2009
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef highlevel_H
#define highlevel_H
#include
<vector>
#include
"dofManager.h"
class
entity
{};
class
Vector
{};
class
Tensor2
{};
class
Tensor4
{};
template
<
class
T
>
struct
TensorialTraits
{};
template
<
>
struct
TensorialTraits
<
double
>
{
typedef
double
ValType
;
typedef
Vector
GradType
;
typedef
Tensor2
HessType
;
};
template
<
>
struct
TensorialTraits
<
Vector
>
{
typedef
Vector
ValType
;
typedef
Tensor2
GradType
;
typedef
Tensor4
HessType
;
};
template
<
class
T
>
class
Function
// Fonction au sens EF du terme.
// renvoie valeur , gradient, hessien, etc...pour un element donné et un point donné
{
public:
virtual
~
Function
(){}
virtual
void
GetVal
(
double
uvw
[],
entity
*
e
,
T
&
Val
)
const
=
0
;
virtual
void
GetGrad
(
double
uvw
[],
entity
*
e
,
typename
TensorialTraits
<
T
>::
GradType
&
Grad
)
const
=
0
;
virtual
void
GetHess
(
double
uvw
[],
entity
*
e
,
typename
TensorialTraits
<
T
>::
HessType
&
Hess
)
const
=
0
;
};
class
SpaceBase
// renvoie des clefs de dofs
{
public:
virtual
void
getDofs
(
entity
*
e
,
std
::
vector
<
Dof
>
&
vecD
)
=
0
;
};
template
<
class
T
>
class
Space
:
public
SpaceBase
// renvoie des clefs de dofs et des fonctions de formes
{
public:
Space
(){};
virtual
~
Space
(){};
virtual
void
getDofsandSFs
(
entity
*
e
,
std
::
vector
<
std
::
pair
<
Dof
,
Function
<
T
>*
>
>
&
vecDFF
)
{}
virtual
void
getSFs
(
std
::
vector
<
std
::
pair
<
Dof
,
Function
<
T
>*
>
>
&
vecDFF
)
=
0
;
};
template
<
class
T
>
class
Field
:
public
Function
<
T
>
// renvoie des valeurs de champ (ff*valeurs dofs), gradient , etc...
{
public:
Field
(){};
virtual
~
Field
(){};
};
template
<
class
T1
,
class
T2
>
class
TermBilinear
// terme associe a un "element" / pt de gauss (contribution élémentaire)
// typiquement celui ci stoque ce qui doit etre stocke. C'est la base configurable du code
// on doit associer cela a un allocateur qui renvoie un pointeur sur ce truc
// Soit tous les elements/pts de gauss ont le meme terme , allocateur unique (pas de stockage aux pts de
// gauss par exemple
// soit ils ont qqc a stockuer et sont tous distincts
// on peut utiliser des membres statiques pour ce qui est constant pour tous les instances
{
TermBilinear
();
virtual
double
getTerm
(
double
uvw
[],
entity
&
e
,
Function
<
T1
>
&
SF
,
Function
<
T2
>
&
TF
)
=
0
;
};
class
FormBilinear
{};
// Renvoie des matrices élémentaires (ff)
// Accessoirement stocke des pointeurs vers les termes pour chaque element
// Doit etre initialisée AVANT toute opération (pour l'allocation)
class
FormLinear
{};
// renvoie des vecteurs élémentaires
// on devrait pouvoir construire une forme lin à partir d'une forme bilin pour les pb "matrix free"
// idem FormBilin
class
FormZero
{};
// renvoie des scalaires ex. resultat d'une integration
//algorithmes
/*void Construct(FormBilinear &B,Region &R,Integrator &I);
void Assemble(FormBilinear &B,Region &R,Assembler &A, Integrator &I);
void Construct(FormLinear &L,Region &R,Integrator &I);
void Assemble(FormLinear &L,Region &R,Assembler &A,Integrator &I);
void Construct(FormZero &Z,Region &R,Integrator &I);
void Assemble(FormZero &Z,Region &R,Assembler &A,Integrator &I);
*/
#endif // highlevel_H
This diff is collapsed.
Click to expand it.
contrib/arc/mainElasticity.cpp
+
1
−
1
View file @
72872ed4
...
...
@@ -2,7 +2,7 @@
#include
"elasticitySolver.h"
#include
"PView.h"
#include
"PViewData.h"
#include
"highlevel.h"
int
main
(
int
argc
,
char
*
argv
[]){
if
(
argc
!=
2
){
...
...
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