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
7f4828f3
Commit
7f4828f3
authored
14 years ago
by
Jonathan Lambrechts
Browse files
Options
Downloads
Patches
Plain Diff
move value of shape function at qp of faces to polynomialBasis
parent
17f6e571
No related branches found
No related tags found
No related merge requests found
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Numeric/Gauss.cpp
+12
-0
12 additions, 0 deletions
Numeric/Gauss.cpp
Numeric/Gauss.h
+1
-0
1 addition, 0 deletions
Numeric/Gauss.h
Numeric/polynomialBasis.cpp
+184
-29
184 additions, 29 deletions
Numeric/polynomialBasis.cpp
Numeric/polynomialBasis.h
+8
-2
8 additions, 2 deletions
Numeric/polynomialBasis.h
with
205 additions
and
31 deletions
Numeric/Gauss.cpp
+
12
−
0
View file @
7f4828f3
#include
"Gauss.h"
#include
"Gauss.h"
#include
"GmshDefines.h"
#include
"Bindings.h"
#include
"Bindings.h"
static
void
pts2fullMatrix
(
int
npts
,
IntPt
*
pts
,
fullMatrix
<
double
>
&
pMatrix
,
fullMatrix
<
double
>
&
wMatrix
)
{
static
void
pts2fullMatrix
(
int
npts
,
IntPt
*
pts
,
fullMatrix
<
double
>
&
pMatrix
,
fullMatrix
<
double
>
&
wMatrix
)
{
pMatrix
.
resize
(
npts
,
3
);
pMatrix
.
resize
(
npts
,
3
);
...
@@ -52,3 +53,14 @@ void gaussIntegration::getHexahedron(int order, fullMatrix<double> &pts, fullMat
...
@@ -52,3 +53,14 @@ void gaussIntegration::getHexahedron(int order, fullMatrix<double> &pts, fullMat
void
gaussIntegration
::
getPrism
(
int
order
,
fullMatrix
<
double
>
&
pts
,
fullMatrix
<
double
>
&
weights
)
{
void
gaussIntegration
::
getPrism
(
int
order
,
fullMatrix
<
double
>
&
pts
,
fullMatrix
<
double
>
&
weights
)
{
pts2fullMatrix
(
getNGQPriPts
(
order
),
getGQPriPts
(
order
),
pts
,
weights
);
pts2fullMatrix
(
getNGQPriPts
(
order
),
getGQPriPts
(
order
),
pts
,
weights
);
}
}
void
gaussIntegration
::
get
(
int
elementType
,
int
order
,
fullMatrix
<
double
>
&
pts
,
fullMatrix
<
double
>
&
weights
)
{
switch
(
elementType
)
{
case
TYPE_TRI
:
pts2fullMatrix
(
getNGQTPts
(
order
),
getGQTPts
(
order
),
pts
,
weights
);
break
;
case
TYPE_LIN
:
pts2fullMatrix
(
getNGQLPts
(
order
),
getGQLPts
(
order
),
pts
,
weights
);
break
;
case
TYPE_QUA
:
pts2fullMatrix
(
getNGQQPts
(
order
),
getGQQPts
(
order
),
pts
,
weights
);
break
;
case
TYPE_TET
:
pts2fullMatrix
(
getNGQTetPts
(
order
),
getGQTetPts
(
order
),
pts
,
weights
);
break
;
case
TYPE_HEX
:
pts2fullMatrix
(
getNGQHPts
(
order
),
getGQHPts
(
order
),
pts
,
weights
);
break
;
case
TYPE_PRI
:
pts2fullMatrix
(
getNGQPriPts
(
order
),
getGQPriPts
(
order
),
pts
,
weights
);
break
;
default
:
Msg
::
Error
(
"No integration rules defined for type %i"
,
elementType
);
}
}
This diff is collapsed.
Click to expand it.
Numeric/Gauss.h
+
1
−
0
View file @
7f4828f3
...
@@ -41,6 +41,7 @@ IntPt *getGQHPts(int order);
...
@@ -41,6 +41,7 @@ IntPt *getGQHPts(int order);
//interface
//interface
class
gaussIntegration
{
class
gaussIntegration
{
public:
public:
static
void
get
(
int
elementType
,
int
order
,
fullMatrix
<
double
>
&
pts
,
fullMatrix
<
double
>
&
weights
);
static
void
getTriangle
(
int
order
,
fullMatrix
<
double
>
&
pts
,
fullMatrix
<
double
>
&
weights
);
static
void
getTriangle
(
int
order
,
fullMatrix
<
double
>
&
pts
,
fullMatrix
<
double
>
&
weights
);
static
void
getLine
(
int
order
,
fullMatrix
<
double
>
&
pts
,
fullMatrix
<
double
>
&
weights
);
static
void
getLine
(
int
order
,
fullMatrix
<
double
>
&
pts
,
fullMatrix
<
double
>
&
weights
);
static
void
getQuad
(
int
order
,
fullMatrix
<
double
>
&
pts
,
fullMatrix
<
double
>
&
weights
);
static
void
getQuad
(
int
order
,
fullMatrix
<
double
>
&
pts
,
fullMatrix
<
double
>
&
weights
);
...
...
This diff is collapsed.
Click to expand it.
Numeric/polynomialBasis.cpp
+
184
−
29
View file @
7f4828f3
This diff is collapsed.
Click to expand it.
Numeric/polynomialBasis.h
+
8
−
2
View file @
7f4828f3
...
@@ -71,10 +71,15 @@ class binding;
...
@@ -71,10 +71,15 @@ class binding;
// should be extended to other elements like hexes
// should be extended to other elements like hexes
class
polynomialBasis
class
polynomialBasis
{
{
mutable
std
::
map
<
int
,
std
::
vector
<
fullMatrix
<
double
>
>
>
_dfAtFace
;
//integrationOrder, closureId => df/dXi
public:
public:
//for now the only implemented polynomial basis are nodal poly basis, we use the type of the corresponding gmsh element as type
//for now the only implemented polynomial basis are nodal poly basis, we use the type of the corresponding gmsh element as type
int
type
,
parentType
;
class
closure
:
public
std
::
vector
<
int
>
{
public:
int
type
;
int
type
;
typedef
std
::
vector
<
std
::
vector
<
int
>
>
clCont
;
};
typedef
std
::
vector
<
closure
>
clCont
;
clCont
closures
;
clCont
closures
;
fullMatrix
<
double
>
points
;
fullMatrix
<
double
>
points
;
fullMatrix
<
double
>
monomials
;
fullMatrix
<
double
>
monomials
;
...
@@ -262,6 +267,7 @@ class polynomialBasis
...
@@ -262,6 +267,7 @@ class polynomialBasis
break
;
break
;
}
}
}
}
const
fullMatrix
<
double
>
&
getGradientAtFaceIntegrationPoints
(
int
integrationOrder
,
int
closureId
)
const
;
static
void
registerBindings
(
binding
*
b
);
static
void
registerBindings
(
binding
*
b
);
};
};
...
...
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