Liebe Gitlab-Nutzer, lieber Gitlab-Nutzer, es ist nun möglich sich mittels des ZIH-Logins/LDAP an unserem Dienst anzumelden. Ein Anmelden über dieses erzeugt ein neues Konto. Das alte Konto ist über den Reiter "Standard" erreichbar. Die Administratoren

Dear Gitlab user, it is now possible to log in to our service using the ZIH login/LDAP. Logging in via this will create a new account. The old account can be accessed via the "Standard" tab. The administrators

Commit ac78bde9 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

Parallel problem with with adopted DofMap

parent effe9dbc
......@@ -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}
......
......@@ -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 = 0X200L;
const Flag INIT_UH_OLD = 0X400L;
const Flag INIT_INITIAL_PROBLEM = 0x200L;
const Flag INIT_UH_OLD = 0x400L;
// 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 = 0X00L;
const Flag INIT_NOTHING = 0x00L;
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;
......
......@@ -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
......@@ -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());
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment