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
453efcfa
Commit
453efcfa
authored
14 years ago
by
Emilie Marchandise
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
16dde1d0
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+1
-1
1 addition, 1 deletion
CMakeLists.txt
Solver/crossConfTerm.h
+2
-2
2 additions, 2 deletions
Solver/crossConfTerm.h
Solver/helmholtzTerm.h
+1
-1
1 addition, 1 deletion
Solver/helmholtzTerm.h
Solver/orthogonalTerm.h
+75
-0
75 additions, 0 deletions
Solver/orthogonalTerm.h
with
79 additions
and
4 deletions
CMakeLists.txt
+
1
−
1
View file @
453efcfa
...
@@ -79,7 +79,7 @@ set(GMSH_API
...
@@ -79,7 +79,7 @@ set(GMSH_API
Geo/Homology.h
Geo/Homology.h
Mesh/meshGEdge.h Mesh/meshGFace.h Mesh/meshGFaceOptimize.h
Mesh/meshGEdge.h Mesh/meshGFace.h Mesh/meshGFaceOptimize.h
Mesh/meshGFaceDelaunayInsertion.h
Mesh/meshGFaceDelaunayInsertion.h
Solver/dofManager.h Solver/femTerm.h Solver/laplaceTerm.h Solver/elasticityTerm.h
Solver/dofManager.h Solver/femTerm.h Solver/laplaceTerm.h Solver/elasticityTerm.h
Solver/crossConfTerm.h Solver/orthogonalTerm.h
Solver/linearSystem.h Solver/linearSystemGMM.h Solver/linearSystemCSR.h
Solver/linearSystem.h Solver/linearSystemGMM.h Solver/linearSystemCSR.h
Solver/linearSystemFull.h Solver/elasticitySolver.h
Solver/linearSystemFull.h Solver/elasticitySolver.h
Post/PView.h Post/PViewData.h Plugin/PluginManager.h
Post/PView.h Post/PViewData.h Plugin/PluginManager.h
...
...
This diff is collapsed.
Click to expand it.
Solver/crossConfTerm.h
+
2
−
2
View file @
453efcfa
...
@@ -46,7 +46,7 @@ class crossConfTerm : public femTerm<double> {
...
@@ -46,7 +46,7 @@ class crossConfTerm : public femTerm<double> {
{
{
MElement
*
e
=
se
->
getMeshElement
();
MElement
*
e
=
se
->
getMeshElement
();
int
nbNodes
=
e
->
getNumVertices
();
int
nbNodes
=
e
->
getNumVertices
();
int
integrationOrder
=
2
*
(
e
->
getPolynomialOrder
()
-
1
);
int
integrationOrder
=
2
*
(
e
->
getPolynomialOrder
()
-
1
);
int
npts
;
int
npts
;
IntPt
*
GP
;
IntPt
*
GP
;
double
jac
[
3
][
3
];
double
jac
[
3
][
3
];
...
@@ -54,7 +54,7 @@ class crossConfTerm : public femTerm<double> {
...
@@ -54,7 +54,7 @@ class crossConfTerm : public femTerm<double> {
SVector3
Grads
[
256
];
SVector3
Grads
[
256
];
double
grads
[
256
][
3
];
double
grads
[
256
][
3
];
e
->
getIntegrationPoints
(
integrationOrder
,
&
npts
,
&
GP
);
e
->
getIntegrationPoints
(
integrationOrder
,
&
npts
,
&
GP
);
m
.
setAll
(
0.
);
m
.
setAll
(
0.
);
for
(
int
i
=
0
;
i
<
npts
;
i
++
){
for
(
int
i
=
0
;
i
<
npts
;
i
++
){
...
...
This diff is collapsed.
Click to expand it.
Solver/helmholtzTerm.h
+
1
−
1
View file @
453efcfa
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
#include
"fullMatrix.h"
#include
"fullMatrix.h"
#include
"Numeric.h"
#include
"Numeric.h"
// \nabla \cdot k \nabla U - a U
= 0
// \nabla \cdot k \nabla U - a U
template
<
class
scalar
>
template
<
class
scalar
>
class
helmholtzTerm
:
public
femTerm
<
scalar
>
{
class
helmholtzTerm
:
public
femTerm
<
scalar
>
{
protected:
protected:
...
...
This diff is collapsed.
Click to expand it.
Solver/orthogonalTerm.h
0 → 100644
+
75
−
0
View file @
453efcfa
// Gmsh - Copyright (C) 1997-2010 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to <gmsh@geuz.org>.
#ifndef _ORTHOGONAL_TERM_H_
#define _ORTHOGONAL_TERM_H_
#include
"helmholtzTerm.h"
class
orthogonalTerm
:
public
helmholtzTerm
<
double
>
{
protected:
fullVector
<
double
>
*
_value
;
public:
orthogonalTerm
(
GModel
*
gm
,
int
iField
,
fullVector
<
double
>
&
value
)
:
helmholtzTerm
<
double
>
(
gm
,
iField
,
iField
,
1.0
,
0
),
_value
(
value
)
{}
void
elementVector
(
SElement
*
se
,
fullVector
<
double
>
&
m
)
const
{
MElement
*
e
=
se
->
getMeshElement
();
//fill elementary matrix mat(i,j)
int
nbNodes
=
e
->
getNumVertices
();
int
integrationOrder
=
2
*
(
e
->
getPolynomialOrder
()
-
1
);
int
npts
;
IntPt
*
GP
;
double
jac
[
3
][
3
];
double
invjac
[
3
][
3
];
SVector3
Grads
[
256
];
double
grads
[
256
][
3
];
e
->
getIntegrationPoints
(
integrationOrder
,
&
npts
,
&
GP
);
fullMatrix
<
double
>
mat
;
mat
.
setAll
(
0.
);
for
(
int
i
=
0
;
i
<
npts
;
i
++
){
const
double
u
=
GP
[
i
].
pt
[
0
];
const
double
v
=
GP
[
i
].
pt
[
1
];
const
double
w
=
GP
[
i
].
pt
[
2
];
const
double
weight
=
GP
[
i
].
weight
;
const
double
detJ
=
e
->
getJacobian
(
u
,
v
,
w
,
jac
);
SPoint3
p
;
e
->
pnt
(
u
,
v
,
w
,
p
);
const
double
_diff
=
(
*
_diffusivity
)(
p
.
x
(),
p
.
y
(),
p
.
z
());
inv3x3
(
jac
,
invjac
);
e
->
getGradShapeFunctions
(
u
,
v
,
w
,
grads
);
for
(
int
j
=
0
;
j
<
nbNodes
;
j
++
){
Grads
[
j
]
=
SVector3
(
invjac
[
0
][
0
]
*
grads
[
j
][
0
]
+
invjac
[
0
][
1
]
*
grads
[
j
][
1
]
+
invjac
[
0
][
2
]
*
grads
[
j
][
2
],
invjac
[
1
][
0
]
*
grads
[
j
][
0
]
+
invjac
[
1
][
1
]
*
grads
[
j
][
1
]
+
invjac
[
1
][
2
]
*
grads
[
j
][
2
],
invjac
[
2
][
0
]
*
grads
[
j
][
0
]
+
invjac
[
2
][
1
]
*
grads
[
j
][
1
]
+
invjac
[
2
][
2
]
*
grads
[
j
][
2
]);
}
SVector3
N
(
jac
[
2
][
0
],
jac
[
2
][
1
],
jac
[
2
][
2
]);
for
(
int
j
=
0
;
j
<
nbNodes
;
j
++
){
for
(
int
k
=
0
;
k
<=
j
;
k
++
){
mat
(
j
,
k
)
+=
dot
(
crossprod
(
Grads
[
j
],
Grads
[
k
]),
N
)
*
weight
*
detJ
*
_diff
;
}
}
}
for
(
int
j
=
0
;
j
<
nbNodes
;
j
++
)
for
(
int
k
=
0
;
k
<
j
;
k
++
)
mat
(
k
,
j
)
=
-
1.
*
m
(
j
,
k
);
//2) compute vector m(i) = mat(i,j)*val(j)
fullVector
<
double
>
val
(
nbNodes
);
m
.
scale
(
0.
);
for
(
int
i
=
0
;
i
<
nbNodes
;
i
++
)
for
(
int
j
=
0
;
j
<
nbNodes
;
j
++
)
m
(
i
)
+=
mat
(
i
,
j
)
*
val
(
j
);
}
};
#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