Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ddm
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gmsh
ddm
Commits
313ef3f1
Commit
313ef3f1
authored
2 years ago
by
Boris Martin
Browse files
Options
Downloads
Patches
Plain Diff
Made assembly separate
parent
0c83f960
Branches
Branches containing commit
No related tags found
2 merge requests
!43
Multi source configuration
,
!42
Made assembly separate
Pipeline
#10815
failed
2 years ago
Stage: gmshfem
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/problem/Formulation.cpp
+49
-4
49 additions, 4 deletions
src/problem/Formulation.cpp
src/problem/Formulation.h
+2
-1
2 additions, 1 deletion
src/problem/Formulation.h
with
51 additions
and
5 deletions
src/problem/Formulation.cpp
+
49
−
4
View file @
313ef3f1
...
@@ -344,7 +344,7 @@ namespace gmshddm
...
@@ -344,7 +344,7 @@ namespace gmshddm
}
}
template
<
class
T_Scalar
>
template
<
class
T_Scalar
>
gmshfem
::
common
::
Timer
Formulation
<
T_Scalar
>::
pre
()
gmshfem
::
common
::
Timer
Formulation
<
T_Scalar
>::
pre
(
bool
mustAssemble
)
{
{
const
int
outerVerbosity
=
gmshfem
::
common
::
Options
::
instance
()
->
verbose
;
const
int
outerVerbosity
=
gmshfem
::
common
::
Options
::
instance
()
->
verbose
;
const
int
innerVerbosity
=
(
outerVerbosity
!=
0
?
outerVerbosity
-
1
:
0
);
const
int
innerVerbosity
=
(
outerVerbosity
!=
0
?
outerVerbosity
-
1
:
0
);
...
@@ -798,8 +798,52 @@ namespace gmshddm
...
@@ -798,8 +798,52 @@ namespace gmshddm
_infoNumberOfDofs
();
_infoNumberOfDofs
();
if
(
mustAssemble
)
{
s_printResources
(
"DDM pre-processing before volume assembly"
);
s_printResources
(
"DDM pre-processing before volume assembly"
);
assemble
();
}
time
.
tock
();
if
(
MPI_Rank
==
0
)
{
gmshfem
::
msg
::
info
<<
"Done pre-processing in "
<<
time
<<
"s"
<<
gmshfem
::
msg
::
endl
;
}
return
time
;
}
template
<
class
T_Scalar
>
gmshfem
::
common
::
Timer
Formulation
<
T_Scalar
>::
assemble
()
{
gmshfem
::
common
::
Timer
time
;
time
.
tick
();
const
int
outerVerbosity
=
gmshfem
::
common
::
Options
::
instance
()
->
verbose
;
const
int
innerVerbosity
=
(
outerVerbosity
!=
0
?
outerVerbosity
-
1
:
0
);
_physicalCommutator
=
true
;
_artificialCommutator
=
false
;
togglePhysicalAndArtificialSourceTerms
();
// Clear volume
for
(
auto
idom
=
0ULL
;
idom
<
_volume
.
size
();
++
idom
)
{
if
(
mpi
::
isItMySubdomain
(
idom
))
{
// Clear formulation
_volume
[
idom
]
->
setSystemToZero
();
}
}
for
(
auto
idom
=
0ULL
;
idom
<
_surface
.
size
();
++
idom
)
{
if
(
mpi
::
isItMySubdomain
(
idom
))
{
for
(
auto
it
=
_surface
[
idom
].
begin
();
it
!=
_surface
[
idom
].
end
();
++
it
)
{
gmshfem
::
msg
::
info
<<
" - Clearing "
<<
it
->
second
->
name
()
<<
gmshfem
::
msg
::
endl
;
it
->
second
->
setSystemToZero
();
}
}
}
// Assemble locally on each processor
// Assemble locally on each processor
_assembleAllVolume
();
_assembleAllVolume
();
...
@@ -823,9 +867,10 @@ namespace gmshddm
...
@@ -823,9 +867,10 @@ namespace gmshddm
s_printResources
(
"DDM pre-processing end"
);
s_printResources
(
"DDM pre-processing end"
);
time
.
tock
();
time
.
tock
();
if
(
MPI_Rank
==
0
)
{
if
(
MPI_Rank
==
0
)
{
gmshfem
::
msg
::
info
<<
"Done
pre-process
ing in "
<<
time
<<
"s"
<<
gmshfem
::
msg
::
endl
;
gmshfem
::
msg
::
info
<<
"Done
assembl
ing in "
<<
time
<<
"s"
<<
gmshfem
::
msg
::
endl
;
}
}
return
time
;
return
time
;
...
...
This diff is collapsed.
Click to expand it.
src/problem/Formulation.h
+
2
−
1
View file @
313ef3f1
...
@@ -90,7 +90,8 @@ namespace gmshddm
...
@@ -90,7 +90,8 @@ namespace gmshddm
gmshfem
::
problem
::
Formulation
<
T_Scalar
>
&
operator
()(
unsigned
int
i
);
gmshfem
::
problem
::
Formulation
<
T_Scalar
>
&
operator
()(
unsigned
int
i
);
gmshfem
::
problem
::
Formulation
<
T_Scalar
>
&
operator
()(
unsigned
int
i
,
unsigned
int
j
);
gmshfem
::
problem
::
Formulation
<
T_Scalar
>
&
operator
()(
unsigned
int
i
,
unsigned
int
j
);
gmshfem
::
common
::
Timer
pre
();
gmshfem
::
common
::
Timer
pre
(
bool
mustAssemble
=
true
);
gmshfem
::
common
::
Timer
assemble
();
gmshfem
::
common
::
Timer
solve
(
const
std
::
string
&
solver
,
const
double
tolerance
=
1e-6
,
const
int
iterMax
=
1000
,
const
bool
sameMatrixWithArtificialAndPhysicalSources
=
false
,
const
bool
skipFinalSolutionComputation
=
false
);
gmshfem
::
common
::
Timer
solve
(
const
std
::
string
&
solver
,
const
double
tolerance
=
1e-6
,
const
int
iterMax
=
1000
,
const
bool
sameMatrixWithArtificialAndPhysicalSources
=
false
,
const
bool
skipFinalSolutionComputation
=
false
);
gmshfem
::
common
::
Timer
solve
(
AbstractIterativeSolver
<
T_Scalar
>
&
solver
,
const
double
tolerance
=
1e-6
,
const
int
iterMax
=
1000
,
const
bool
sameMatrixWithArtificialAndPhysicalSources
=
false
,
const
bool
skipFinalSolutionComputation
=
false
);
gmshfem
::
common
::
Timer
solve
(
AbstractIterativeSolver
<
T_Scalar
>
&
solver
,
const
double
tolerance
=
1e-6
,
const
int
iterMax
=
1000
,
const
bool
sameMatrixWithArtificialAndPhysicalSources
=
false
,
const
bool
skipFinalSolutionComputation
=
false
);
...
...
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