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
fee0b8bc
Commit
fee0b8bc
authored
15 years ago
by
Jonathan Lambrechts
Browse files
Options
Downloads
Patches
Plain Diff
dgGroupOfElements compilation ok
parent
e0c8a2fe
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Solver/CMakeLists.txt
+1
-0
1 addition, 0 deletions
Solver/CMakeLists.txt
Solver/dgGroupOfElements.cpp
+4
-4
4 additions, 4 deletions
Solver/dgGroupOfElements.cpp
Solver/dgGroupOfElements.h
+8
-7
8 additions, 7 deletions
Solver/dgGroupOfElements.h
with
13 additions
and
11 deletions
Solver/CMakeLists.txt
+
1
−
0
View file @
fee0b8bc
...
@@ -10,6 +10,7 @@ set(SRC
...
@@ -10,6 +10,7 @@ set(SRC
elasticitySolver.cpp
elasticitySolver.cpp
SElement.cpp
SElement.cpp
eigenSolver.cpp
eigenSolver.cpp
dgGroupOfElements.cpp
)
)
file
(
GLOB HDR RELATIVE
${
CMAKE_SOURCE_DIR
}
/Solver *.h
)
file
(
GLOB HDR RELATIVE
${
CMAKE_SOURCE_DIR
}
/Solver *.h
)
...
...
This diff is collapsed.
Click to expand it.
Solver/dgGroupOfElements.cpp
+
4
−
4
View file @
fee0b8bc
...
@@ -199,7 +199,7 @@ void dgGroupOfFaces::createEdgeElements (const std::vector<MEdge> &topo_edges){
...
@@ -199,7 +199,7 @@ void dgGroupOfFaces::createEdgeElements (const std::vector<MEdge> &topo_edges){
}
}
}
}
}
}
void
dgGroupOfFace
::
init
()
{
void
dgGroupOfFace
s
::
init
(
int
pOrder
)
{
_fsFace
=
_faces
[
0
]
->
getFunctionSpace
(
pOrder
);
_fsFace
=
_faces
[
0
]
->
getFunctionSpace
(
pOrder
);
_integration
=
dgGetIntegrationRule
(
_faces
[
0
],
pOrder
);
_integration
=
dgGetIntegrationRule
(
_faces
[
0
],
pOrder
);
_redistribution
=
new
fullMatrix
<
double
>
(
_fsFace
->
coefficients
.
size1
(),
_integration
->
size1
());
_redistribution
=
new
fullMatrix
<
double
>
(
_fsFace
->
coefficients
.
size1
(),
_integration
->
size1
());
...
@@ -208,7 +208,7 @@ void dgGroupOfFace::init() {
...
@@ -208,7 +208,7 @@ void dgGroupOfFace::init() {
for
(
int
j
=
0
;
j
<
_integration
->
size1
();
j
++
)
{
for
(
int
j
=
0
;
j
<
_integration
->
size1
();
j
++
)
{
_fsFace
->
f
((
*
_integration
)(
j
,
0
),
(
*
_integration
)(
j
,
1
),
(
*
_integration
)(
j
,
2
),
f
);
_fsFace
->
f
((
*
_integration
)(
j
,
0
),
(
*
_integration
)(
j
,
1
),
(
*
_integration
)(
j
,
2
),
f
);
const
double
weight
=
(
*
_integration
)(
j
,
3
);
const
double
weight
=
(
*
_integration
)(
j
,
3
);
for
(
int
k
=
0
;
k
<
_fs
.
coefficients
.
size1
();
k
++
){
for
(
int
k
=
0
;
k
<
_fs
Face
->
coefficients
.
size1
();
k
++
){
(
*
_redistribution
)(
k
,
j
)
=
f
[
j
]
*
weight
;
(
*
_redistribution
)(
k
,
j
)
=
f
[
j
]
*
weight
;
(
*
_collocation
)(
k
,
j
)
=
f
[
k
];
(
*
_collocation
)(
k
,
j
)
=
f
[
k
];
}
}
...
@@ -222,7 +222,7 @@ dgGroupOfFaces::dgGroupOfFaces (const std::vector<MFace> &topo_faces,
...
@@ -222,7 +222,7 @@ dgGroupOfFaces::dgGroupOfFaces (const std::vector<MFace> &topo_faces,
_fsLeft
(
_left
[
0
]
->
getFunctionSpace
(
pOrder
)),
_fsRight
(
_right
[
0
]
->
getFunctionSpace
(
pOrder
))
_fsLeft
(
_left
[
0
]
->
getFunctionSpace
(
pOrder
)),
_fsRight
(
_right
[
0
]
->
getFunctionSpace
(
pOrder
))
{
{
createFaceElements
(
topo_faces
);
createFaceElements
(
topo_faces
);
init
();
init
(
pOrder
);
}
}
dgGroupOfFaces
::
dgGroupOfFaces
(
const
std
::
vector
<
MEdge
>
&
topo_edges
,
dgGroupOfFaces
::
dgGroupOfFaces
(
const
std
::
vector
<
MEdge
>
&
topo_edges
,
...
@@ -232,5 +232,5 @@ dgGroupOfFaces::dgGroupOfFaces (const std::vector<MEdge> &topo_edges,
...
@@ -232,5 +232,5 @@ dgGroupOfFaces::dgGroupOfFaces (const std::vector<MEdge> &topo_edges,
_fsLeft
(
_left
[
0
]
->
getFunctionSpace
(
pOrder
)),
_fsRight
(
_right
[
0
]
->
getFunctionSpace
(
pOrder
))
_fsLeft
(
_left
[
0
]
->
getFunctionSpace
(
pOrder
)),
_fsRight
(
_right
[
0
]
->
getFunctionSpace
(
pOrder
))
{
{
createEdgeElements
(
topo_edges
);
createEdgeElements
(
topo_edges
);
init
();
init
(
pOrder
);
}
}
This diff is collapsed.
Click to expand it.
Solver/dgGroupOfElements.h
+
8
−
7
View file @
fee0b8bc
...
@@ -27,7 +27,7 @@ public:
...
@@ -27,7 +27,7 @@ public:
:
_element
(
e
),
_solution
(
sol
),
_integration
(
integ
),
_gradients
(
sol
)
:
_element
(
e
),
_solution
(
sol
),
_integration
(
integ
),
_gradients
(
sol
)
{}
{}
dgElement
(
MElement
*
e
,
const
fullMatrix
<
double
>
&
sol
,
const
fullMatrix
<
double
>
&
grads
,
const
fullMatrix
<
double
>
&
integ
)
dgElement
(
MElement
*
e
,
const
fullMatrix
<
double
>
&
sol
,
const
fullMatrix
<
double
>
&
grads
,
const
fullMatrix
<
double
>
&
integ
)
:
_element
(
e
),
_solution
(
sol
),
_integration
(
integ
),
_gradients
(
grad
)
:
_element
(
e
),
_solution
(
sol
),
_integration
(
integ
),
_gradients
(
grad
s
)
{}
{}
};
};
...
@@ -67,21 +67,22 @@ public:
...
@@ -67,21 +67,22 @@ public:
virtual
~
dgGroupOfElements
();
virtual
~
dgGroupOfElements
();
inline
int
getNbElements
()
const
{
return
_elements
.
size
();}
inline
int
getNbElements
()
const
{
return
_elements
.
size
();}
inline
int
getNbFields
()
const
{
return
_nbFields
;}
inline
int
getNbFields
()
const
{
return
_nbFields
;}
inline
int
getNbNodes
()
const
{
return
_collocation
.
size1
();}
inline
int
getNbNodes
()
const
{
return
_collocation
->
size1
();}
inline
int
getNbIntegrationPoints
()
const
{
return
_collocation
.
size2
();}
inline
int
getNbIntegrationPoints
()
const
{
return
_collocation
->
size2
();}
inline
int
getDimUVW
()
const
{
return
_dimUVW
;}
inline
int
getDimUVW
()
const
{
return
_dimUVW
;}
inline
int
getDimXYZ
()
const
{
return
_dimXYZ
;}
inline
int
getDimXYZ
()
const
{
return
_dimXYZ
;}
inline
const
MElement
*
getElement
(
int
iElement
)
const
{
return
_elements
[
iElement
];}
inline
const
MElement
*
getElement
(
int
iElement
)
const
{
return
_elements
[
iElement
];}
inline
const
fullMatrix
<
double
>
&
getIntegrationPointsMatrix
()
const
{
return
*
_integration
;}
inline
const
fullMatrix
<
double
>
&
getIntegrationPointsMatrix
()
const
{
return
*
_integration
;}
inline
const
fullMatrix
<
double
>
&
getCollocationMatrix
()
const
{
return
*
_collocation
;}
inline
const
fullMatrix
<
double
>
&
getCollocationMatrix
()
const
{
return
*
_collocation
;}
inline
const
fullMatrix
<
double
>
&
getRedistributionMatrix
(
int
i
)
const
{
return
*
_redistribution
[
i
];}
inline
const
fullMatrix
<
double
>
&
getFluxRedistributionMatrix
(
int
i
)
const
{
return
*
_redistributionFluxes
[
i
];}
inline
const
fullMatrix
<
double
>
&
getSourceRedistributionMatrix
()
const
{
return
*
_redistributionSource
;}
inline
const
fullMatrix
<
double
>
&
getSolution
()
const
{
return
*
_solution
;}
inline
const
fullMatrix
<
double
>
&
getSolution
()
const
{
return
*
_solution
;}
inline
const
fullMatrix
<
double
>
&
getGradientOfSolution
()
const
{
return
*
_gradSolution
;}
inline
const
fullMatrix
<
double
>
&
getGradientOfSolution
()
const
{
return
*
_gradSolution
;}
// get a proxy on the solution for element iElement
// get a proxy on the solution for element iElement
inline
fullMatrix
<
double
>
&
getSolution
(
int
iElement
)
const
{
return
fullMatrix
<
double
>
(
*
_solution
,
iElement
*
_nbFields
,
_nbFields
);}
inline
fullMatrix
<
double
>
getSolution
(
int
iElement
)
const
{
return
fullMatrix
<
double
>
(
*
_solution
,
iElement
*
_nbFields
,
_nbFields
);}
inline
const
fullMatrix
<
double
>
&
getResidual
()
const
{
return
*
_solution
;}
inline
const
fullMatrix
<
double
>
&
getResidual
()
const
{
return
*
_solution
;}
// get a proxy on the residual for element iElement
// get a proxy on the residual for element iElement
inline
fullMatrix
<
double
>
&
getResidual
(
int
iElement
)
const
{
return
fullMatrix
<
double
>
(
*
_residual
,
iElement
*
_nbFields
,
_nbFields
);}
inline
fullMatrix
<
double
>
getResidual
(
int
iElement
)
const
{
return
fullMatrix
<
double
>
(
*
_residual
,
iElement
*
_nbFields
,
_nbFields
);}
inline
double
getDetJ
(
int
iElement
,
int
iGaussPoint
)
const
{
return
(
*
_mapping
)(
iElement
,
10
*
iGaussPoint
+
9
);}
inline
double
getDetJ
(
int
iElement
,
int
iGaussPoint
)
const
{
return
(
*
_mapping
)(
iElement
,
10
*
iGaussPoint
+
9
);}
inline
double
getInvJ
(
int
iElement
,
int
iGaussPoint
,
int
i
,
int
j
)
const
{
return
(
*
_mapping
)(
iElement
,
10
*
iGaussPoint
+
i
+
3
*
j
);}
inline
double
getInvJ
(
int
iElement
,
int
iGaussPoint
,
int
i
,
int
j
)
const
{
return
(
*
_mapping
)(
iElement
,
10
*
iGaussPoint
+
i
+
3
*
j
);}
inline
fullMatrix
<
double
>
getMapping
(
int
iElement
)
const
{
return
fullMatrix
<
double
>
(
*
_mapping
,
iElement
,
1
);}
inline
fullMatrix
<
double
>
getMapping
(
int
iElement
)
const
{
return
fullMatrix
<
double
>
(
*
_mapping
,
iElement
,
1
);}
...
@@ -126,7 +127,7 @@ class dgGroupOfFaces {
...
@@ -126,7 +127,7 @@ class dgGroupOfFaces {
// redistribution matrices \psi_i (GP_j) * weight_j
// redistribution matrices \psi_i (GP_j) * weight_j
fullMatrix
<
double
>
*
_redistribution
;
fullMatrix
<
double
>
*
_redistribution
;
//common part of the 3 constructors
//common part of the 3 constructors
void
init
();
void
init
(
int
pOrder
);
public:
public:
dgGroupOfFaces
(
const
std
::
vector
<
MFace
>
&
faces
,
dgGroupOfFaces
(
const
std
::
vector
<
MFace
>
&
faces
,
const
std
::
vector
<
MElement
*>
&
l
,
const
std
::
vector
<
MElement
*>
&
l
,
...
...
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