Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Aland, Sebastian
amdis
Commits
ac78bde9
Commit
ac78bde9
authored
May 12, 2016
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Parallel problem with with adopted DofMap
parent
effe9dbc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
23 deletions
+47
-23
AMDiS/cmake3/test_compile_features.cmake
AMDiS/cmake3/test_compile_features.cmake
+7
-1
AMDiS/src/ProblemStatBase.h
AMDiS/src/ProblemStatBase.h
+20
-16
AMDiS/src/config/Config_msc.h
AMDiS/src/config/Config_msc.h
+5
-5
AMDiS/src/parallel/ParallelProblemStat.cc
AMDiS/src/parallel/ParallelProblemStat.cc
+15
-1
No files found.
AMDiS/cmake3/test_compile_features.cmake
View file @
ac78bde9
...
...
@@ -9,12 +9,18 @@ macro(test_compile_features RESULT_VAR TARGET SCOPE) # feature1 feature2 feature
# test only of variable RESULT_VAR not yet set manually or by a
# previous call to this macro
if
(
NOT DEFINED
${
RESULT_VAR
}
)
if
(
EXISTS
"
${
BASE_DIR
}
/cmake3/dummy.cc"
)
set
(
DUMMY_FILE
${
BASE_DIR
}
/cmake3/dummy.cc
)
else
()
set
(
DUMMY_FILE
${
AMDIS_DIR
}
/dummy.cc
)
endif
()
message
(
STATUS
"Test for cxx11 features for target
${
TARGET
}
"
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E make_directory
${
_DIR
}
)
file
(
WRITE
${
_DIR
}
/CMakeLists.txt
"
cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
project(TestCxx LANGUAGES CXX)
add_library(test_cxx
${
BASE_DIR
}
/cmake3/dummy.cc
)
add_library(test_cxx
${
DUMMY_FILE
}
)
target_compile_features(test_cxx PRIVATE
${
_FEATURES
}
)"
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
${
_DIR
}
...
...
AMDiS/src/ProblemStatBase.h
View file @
ac78bde9
...
...
@@ -37,31 +37,35 @@ namespace AMDiS {
// Flags for controling which part of the problem should be initialized
// For all problems
const
Flag
INIT_FE_SPACE
=
0X01L
;
const
Flag
INIT_MESH
=
0X02L
;
const
Flag
CREATE_MESH
=
0X04L
;
const
Flag
INIT_SYSTEM
=
0X08L
;
const
Flag
INIT_SOLVER
=
0X10L
;
const
Flag
INIT_ESTIMATOR
=
0X20L
;
const
Flag
INIT_MARKER
=
0X40L
;
const
Flag
INIT_ADAPT
=
0X80L
;
const
Flag
INIT_FILEWRITER
=
0X100L
;
const
Flag
INIT_GLOBAL_REFINES
=
0X1000L
;
const
Flag
INIT_FE_SPACE
=
0x01L
;
const
Flag
INIT_MESH
=
0x02L
;
const
Flag
CREATE_MESH
=
0x04L
;
const
Flag
INIT_SYSTEM
=
0x08L
;
const
Flag
INIT_SOLVER
=
0x10L
;
const
Flag
INIT_ESTIMATOR
=
0x20L
;
const
Flag
INIT_MARKER
=
0x40L
;
const
Flag
INIT_ADAPT
=
0x80L
;
const
Flag
INIT_FILEWRITER
=
0x100L
;
// For time dependent problems
const
Flag
INIT_INITIAL_PROBLEM
=
0
X
200L
;
const
Flag
INIT_UH_OLD
=
0
X
400L
;
const
Flag
INIT_INITIAL_PROBLEM
=
0
x
200L
;
const
Flag
INIT_UH_OLD
=
0
x
400L
;
// For non linear problems
const
Flag
INIT_UPDATER
=
0x800L
;
const
Flag
INIT_NONLIN_SOLVER
=
0x1000L
;
const
Flag
INIT_GLOBAL_REFINES
=
0x2000L
;
// for parallel problem stat
const
Flag
INIT_DOFMAP
=
0x4000L
;
// Combined Flags
const
Flag
INIT_NOTHING
=
0
X
00L
;
const
Flag
INIT_NOTHING
=
0
x
00L
;
const
Flag
INIT_ALL
=
INIT_FE_SPACE
|
INIT_MESH
|
CREATE_MESH
|
INIT_SYSTEM
|
INIT_SOLVER
|
INIT_ESTIMATOR
|
INIT_MARKER
|
INIT_ADAPT
|
INIT_FILEWRITER
|
INIT_INITIAL_PROBLEM
|
INIT_UH_OLD
|
INIT_UPDATER
|
INIT_NONLIN_SOLVER
;
INIT_UH_OLD
|
INIT_UPDATER
|
INIT_NONLIN_SOLVER
|
INIT_DOFMAP
;
const
Flag
MESH_REFINED
=
1
;
const
Flag
MESH_COARSENED
=
2
;
...
...
AMDiS/src/config/Config_msc.h
View file @
ac78bde9
...
...
@@ -54,10 +54,10 @@ typedef __declspec(align(CACHE_LINE)) size_t aligned_size_t;
// C++11 features
// --------------
#if __cplusplus > 199711L
#ifndef HAS_CXX11
#define HAS_CXX11 1
#endif
//
#if __cplusplus > 199711L
//
#ifndef HAS_CXX11
//
#define HAS_CXX11 1
//
#endif
#if MSC_VERSION >= 1800 && !defined(HAS_VARIADIC_TEMPLATES)
#define HAS_VARIADIC_TEMPLATES 1
...
...
@@ -100,4 +100,4 @@ typedef __declspec(align(CACHE_LINE)) size_t aligned_size_t;
#define HAS_RVALUE_REFERENCES 1
#endif
#endif
//
#endif
AMDiS/src/parallel/ParallelProblemStat.cc
View file @
ac78bde9
...
...
@@ -96,8 +96,22 @@ namespace AMDiS { namespace Parallel {
for
(
size_t
i
=
0
;
i
<
tmpComponentSpaces
.
size
();
i
++
)
if
(
std
::
find
(
tmpFeSpaces
.
begin
(),
tmpFeSpaces
.
end
(),
tmpComponentSpaces
[
i
])
==
tmpFeSpaces
.
end
())
tmpFeSpaces
.
push_back
(
tmpComponentSpaces
[
i
]);
parallelSolver
->
init
(
tmpComponentSpaces
,
tmpFeSpaces
);
if
(
meshDistributor
->
isInitialized
()
&&
!
adoptFlag
.
isSet
(
INIT_DOFMAP
))
{
WARNING
(
"Meshdistributor already initialized. Initialization of ParallelSolver will "
"clear the internal dofmap. Use the adoptFlag INIT_DOFMAP to adopt the dofmap "
"from the adoptProblem!"
);
}
if
(
initFlag
.
isSet
(
INIT_DOFMAP
)
&&
(
!
adoptProblem
||
!
adoptFlag
.
isSet
(
INIT_DOFMAP
)))
{
parallelSolver
->
init
(
tmpComponentSpaces
,
tmpFeSpaces
);
}
else
{
parallelSolver
->
init
(
tmpComponentSpaces
,
tmpFeSpaces
,
false
);
if
(
adoptProblem
&&
adoptFlag
.
isSet
(
INIT_DOFMAP
))
parallelSolver
->
setDofMapping
(
dynamic_cast
<
ParallelSolver
*>
(
adoptProblem
->
getSolver
())
->
getDofMapping
());
}
}
...
...
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