Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amdis
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aland, Sebastian
amdis
Commits
c14d2129
Commit
c14d2129
authored
Nov 02, 2012
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed eps issue in final timestep calculation.
parent
2620c115
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
56 deletions
+26
-56
AMDiS/src/AdaptInfo.h
AMDiS/src/AdaptInfo.h
+8
-8
AMDiS/src/ElementDofIterator.h
AMDiS/src/ElementDofIterator.h
+4
-6
AMDiS/src/Lagrange.h
AMDiS/src/Lagrange.h
+2
-1
AMDiS/src/parallel/PetscSolverFeti.cc
AMDiS/src/parallel/PetscSolverFeti.cc
+0
-4
AMDiS/src/parallel/PetscSolverFetiOperators.cc
AMDiS/src/parallel/PetscSolverFetiOperators.cc
+3
-33
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
+9
-4
No files found.
AMDiS/src/AdaptInfo.h
View file @
c14d2129
...
...
@@ -511,24 +511,24 @@ namespace AMDiS {
return
timestep
;
}
inline
void
setLastProcessedTimestep
(
double
t
){
lastProcessedTimestep
=
t
;
inline
void
setLastProcessedTimestep
(
double
t
)
{
lastProcessedTimestep
=
t
;
}
inline
double
getLastProcessedTimestep
(){
inline
double
getLastProcessedTimestep
()
{
return
lastProcessedTimestep
;
}
/** \brief
* Returns true, if the end time is reached and no more timestep
* computations must be done.
*/
/// Returns true, if the end time is reached and no more timestep
/// computations must be done.
inline
bool
reachedEndTime
()
{
if
(
nTimesteps
>
0
)
return
!
(
timestepNumber
<
nTimesteps
);
return
!
(
time
<
endTime
-
DBL_TOL
);
return
!
(
fabs
(
time
-
endTime
)
>
DBL_TOL
);
}
...
...
AMDiS/src/ElementDofIterator.h
View file @
c14d2129
...
...
@@ -140,12 +140,10 @@ namespace AMDiS {
/// Dimension dependent geo index of the current position in traverse.
GeoIndex
posIndex
;
/** \brief
* Number of DOFs at the current traverse position. Examples: independent of
* dimension and degree of basis functions there is only one DOF per vertex.
* But in 2D and with 3rd degree lagrange basis functions there are two
* DOFs per edge.
*/
/// Number of DOFs at the current traverse position. Examples: independent of
/// dimension and degree of basis functions there is only one DOF per vertex.
/// But in 2D and with 3rd degree lagrange basis functions there are two
/// DOFs per edge.
int
nDofs
;
/// Displacement of DOF indices. Used if more than one DOF admin is defined
...
...
AMDiS/src/Lagrange.h
View file @
c14d2129
...
...
@@ -154,7 +154,8 @@ namespace AMDiS {
GeoIndex
position
,
int
positionIndex
)
const
;
/// Calculates the number of DOFs needed for Lagrange of the given dim and degree.
/// Calculates the number of DOFs needed for Lagrange of the given dim
/// and degree.
static
int
getNumberOfDofs
(
int
dim
,
int
degree
);
private:
...
...
AMDiS/src/parallel/PetscSolverFeti.cc
View file @
c14d2129
...
...
@@ -1007,12 +1007,9 @@ namespace AMDiS {
Mat
qT
,
jTqT
;
MatTranspose
(
mat_augmented_lagrange
,
MAT_INITIAL_MATRIX
,
&
qT
);
// Mat jT;
MSG
(
"START COMPUTING MAT TRANS
\n
"
);
// MatTranspose(mat_lagrange, MAT_INITIAL_MATRIX, &jT);
MSG
(
"DONE
\n
"
);
MatTransposeMatMult
(
mat_lagrange
,
qT
,
MAT_INITIAL_MATRIX
,
PETSC_DEFAULT
,
&
jTqT
);
MSG
(
"DONE WITH THIS!
\n
"
);
petsc_helper
::
blockMatMatSolve
(
subdomain
->
getSolver
(),
jTqT
,
matTmp
);
MatDestroy
(
&
qT
);
MatDestroy
(
&
jTqT
);
...
...
@@ -1041,7 +1038,6 @@ namespace AMDiS {
MatDestroy
(
&
mat10
);
MatDestroy
(
&
mat11
);
MatDestroy
(
&
matTmp
);
MSG
(
"FINISHED!
\n
"
);
}
else
{
Mat
tmp
;
...
...
AMDiS/src/parallel/PetscSolverFetiOperators.cc
View file @
c14d2129
...
...
@@ -252,33 +252,12 @@ namespace AMDiS {
double
wtime
=
MPI
::
Wtime
();
{
MatNullSpace
nullSpace
;
MatGetNullSpace
(
mat
,
&
nullSpace
);
PetscBool
hasConst
;
PetscInt
nVec
;
const
Vec
*
vecs
;
// MatNullSpaceGetVecs(nullSpace, &hasConst, &nVec, &vecs);
MatNullSpaceRemove
(
nullSpace
,
x
,
PETSC_NULL
);
}
Vec
x_interface
,
x_lagrange
,
y_interface
,
y_lagrange
;
VecNestGetSubVec
(
x
,
0
,
&
x_interface
);
VecNestGetSubVec
(
x
,
1
,
&
x_lagrange
);
VecNestGetSubVec
(
y
,
0
,
&
y_interface
);
VecNestGetSubVec
(
y
,
1
,
&
y_lagrange
);
{
int
n
;
VecGetSize
(
x_interface
,
&
n
);
double
sum
;
VecSum
(
x_interface
,
&
sum
);
sum
=
-
sum
/
static_cast
<
int
>
(
n
);
MSG
(
"xbegin = %e
\n
"
,
sum
);
}
void
*
ctx
;
MatShellGetContext
(
mat
,
&
ctx
);
FetiData
*
data
=
static_cast
<
FetiData
*>
(
ctx
);
...
...
@@ -337,16 +316,6 @@ namespace AMDiS {
// y_interface = A_{\Gamma B} tmp_vec_b0
MatMult
(
data
->
subSolver
->
getMatCoarseInterior
(
1
),
data
->
tmp_vec_b0
,
y_interface
);
{
int
n
;
VecGetSize
(
y_interface
,
&
n
);
double
sum
;
VecSum
(
y_interface
,
&
sum
);
sum
=
-
sum
/
static_cast
<
int
>
(
n
);
MSG
(
"yend = %e
\n
"
,
sum
);
}
// tmp_vec_primal0 = S_{\Pi\Pi}^{-1} (v_{\Pi} - A_{\Pi B} A_{BB}^{-1} v_{B})
// tmp_vec_interface = A_{\Gamma \Pi} tmp_vec_primal0
MatMult
(
data
->
subSolver
->
getMatCoarse
(
1
,
0
),
data
->
tmp_vec_primal0
,
data
->
tmp_vec_interface
);
...
...
@@ -358,6 +327,7 @@ namespace AMDiS {
FetiTimings
::
fetiSolve
+=
(
MPI
::
Wtime
()
-
wtime
);
return
0
;
}
...
...
@@ -497,8 +467,8 @@ namespace AMDiS {
VecNestGetSubVec
(
yvec
,
0
,
&
y_interface
);
VecNestGetSubVec
(
yvec
,
1
,
&
y_lagrange
);
VecCopy
(
x_interface
,
y_interface
);
//
KSPSolve(data->ksp_mass, x_interface, y_interface);
//
VecCopy(x_interface, y_interface);
KSPSolve
(
data
->
ksp_mass
,
x_interface
,
y_interface
);
MatMultTranspose
(
*
(
data
->
mat_lagrange_scaled
),
x_lagrange
,
data
->
tmp_vec_b0
);
...
...
AMDiS/src/parallel/PetscSolverGlobalMatrix.cc
View file @
c14d2129
...
...
@@ -157,7 +157,7 @@ namespace AMDiS {
if
(
dirichletRows
.
count
(
*
cursor
))
{
if
((
!
isRowCoarse
&&
!
(
*
interiorMap
)[
rowComponent
].
isRankDof
(
*
cursor
))
||
(
isRowCoarse
&&
!
(
*
rowCoarseSpace
)[
rowComponent
].
isRankDof
(
*
cursor
)))
continue
;
continue
;
}
cols
.
clear
();
...
...
@@ -763,11 +763,16 @@ namespace AMDiS {
if
(
rankOnly
&&
!
(
*
interiorMap
)[
rowComp
].
isRankDof
(
dof
))
continue
;
bool
isCoarseDof
=
isCoarseSpace
(
rowComp
,
dof
);
// Dirichlet rows can be set only be the owner ranks.
if
(
dirichletValues
.
count
(
dof
)
&&
!
((
*
interiorMap
)[
rowComp
].
isRankDof
(
dof
)))
continue
;
if
(
dirichletValues
.
count
(
dof
))
{
if
((
!
isCoarseDof
&&
!
((
*
interiorMap
)[
rowComp
].
isRankDof
(
dof
)))
||
(
isCoarseDof
&&
!
((
*
rowCoarseSpace
)[
rowComp
].
isRankDof
(
dof
))))
continue
;
}
if
(
isCoarse
Space
(
rowComp
,
dof
)
)
{
if
(
isCoarse
Dof
)
{
TEST_EXIT_DBG
(
vecCoarse
!=
PETSC_NULL
)(
"Should not happen!
\n
"
);
int
index
=
rowCoarseSpace
->
getMatIndex
(
rowComp
,
dof
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment