Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Aland, Sebastian
amdis
Commits
9c44b131
Commit
9c44b131
authored
Aug 06, 2014
by
Praetorius, Simon
Browse files
merge of branches/expr to trunk
parent
a091668f
Changes
326
Expand all
Hide whitespace changes
Inline
Side-by-side
AMDiS/AMDISConfig.cmake.in
View file @
9c44b131
...
@@ -59,12 +59,12 @@ unset(_AMDIS_LIB CACHE)
...
@@ -59,12 +59,12 @@ unset(_AMDIS_LIB CACHE)
# Boost libraries
# Boost libraries
# ---------------
# ---------------
set(AMDIS_HAS_PARALLEL_DOMAIN @ENABLE_PARALLEL_DOMAIN@)
set(AMDIS_HAS_PARALLEL_DOMAIN @ENABLE_PARALLEL_DOMAIN@)
set(AMDIS_NEED_COMPRESSION @ENABLE_COMPRESSIN@)
set(AMDIS_NEED_COMPRESSION @ENABLE_COMPRESSI
O
N@)
set(BOOST_LIBS_REQUIRED system iostreams filesystem program_options date_time)
set(BOOST_LIBS_REQUIRED system iostreams filesystem program_options date_time)
if(AMDIS_NEED_COMPRESSION)
if(
WIN32 AND
AMDIS_NEED_COMPRESSION)
list(APPEND BOOST_LIBS_REQUIRED zlib bzip2)
list(APPEND BOOST_LIBS_REQUIRED zlib bzip2)
endif(AMDIS_NEED_COMPRESSION)
endif(
WIN32 AND
AMDIS_NEED_COMPRESSION)
set(BOOST_VERSION "1.42")
set(BOOST_VERSION "1.42")
if(AMDIS_HAS_PARALLEL_DOMAIN)
if(AMDIS_HAS_PARALLEL_DOMAIN)
...
...
AMDiS/CMakeLists.txt
View file @
9c44b131
...
@@ -56,6 +56,8 @@ option(ENABLE_OUTPUT "AMDiS output printing, disable only for debugging!" true)
...
@@ -56,6 +56,8 @@ option(ENABLE_OUTPUT "AMDiS output printing, disable only for debugging!" true)
mark_as_advanced
(
ENABLE_OUTPUT
)
mark_as_advanced
(
ENABLE_OUTPUT
)
mark_as_advanced
(
ENABLE_BDDCML
)
mark_as_advanced
(
USE_PETSC_DEV
)
find_package
(
Boost 1.44 REQUIRED
)
find_package
(
Boost 1.44 REQUIRED
)
...
@@ -81,6 +83,7 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc
...
@@ -81,6 +83,7 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc
${
SOURCE_DIR
}
/Boundary.cc
${
SOURCE_DIR
}
/Boundary.cc
${
SOURCE_DIR
}
/BoundaryManager.cc
${
SOURCE_DIR
}
/BoundaryManager.cc
${
SOURCE_DIR
}
/BoundaryObject.cc
${
SOURCE_DIR
}
/BoundaryObject.cc
${
SOURCE_DIR
}
/Bubble.cc
${
SOURCE_DIR
}
/Cholesky.cc
${
SOURCE_DIR
}
/Cholesky.cc
${
SOURCE_DIR
}
/CoarseningManager.cc
${
SOURCE_DIR
}
/CoarseningManager.cc
${
SOURCE_DIR
}
/CoarseningManager1d.cc
${
SOURCE_DIR
}
/CoarseningManager1d.cc
...
@@ -125,7 +128,7 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc
...
@@ -125,7 +128,7 @@ SET(AMDIS_SRC ${SOURCE_DIR}/AdaptBase.cc
${
SOURCE_DIR
}
/OperatorTerm.cc
${
SOURCE_DIR
}
/OperatorTerm.cc
${
SOURCE_DIR
}
/Parametric.cc
${
SOURCE_DIR
}
/Parametric.cc
${
SOURCE_DIR
}
/PeriodicBC.cc
${
SOURCE_DIR
}
/PeriodicBC.cc
${
SOURCE_DIR
}
/ProblemImplicit.cc
#
${SOURCE_DIR}/ProblemImplicit.cc
${
SOURCE_DIR
}
/ProblemInstat.cc
${
SOURCE_DIR
}
/ProblemInstat.cc
${
SOURCE_DIR
}
/ProblemInterpol.cc
${
SOURCE_DIR
}
/ProblemInterpol.cc
${
SOURCE_DIR
}
/ProblemStat.cc
${
SOURCE_DIR
}
/ProblemStat.cc
...
@@ -342,7 +345,7 @@ endif(ENABLE_UMFPACK)
...
@@ -342,7 +345,7 @@ endif(ENABLE_UMFPACK)
if
(
ENABLE_HYPRE
)
if
(
ENABLE_HYPRE
)
include
(
Find
HYPRE.cmake
)
include
(
HYPRE
Config
.cmake
)
message
(
"have hypre:
${
HAVE_HYPRE
}
"
)
message
(
"have hypre:
${
HAVE_HYPRE
}
"
)
if
(
HAVE_HYPRE
)
if
(
HAVE_HYPRE
)
if
(
NOT MPI_FOUND
)
if
(
NOT MPI_FOUND
)
...
@@ -437,13 +440,15 @@ if(ENABLE_EXTENSIONS)
...
@@ -437,13 +440,15 @@ if(ENABLE_EXTENSIONS)
if
(
ENABLE_SEQ_PETSC
)
if
(
ENABLE_SEQ_PETSC
)
list
(
APPEND EXTENSIONS_SRC
list
(
APPEND EXTENSIONS_SRC
${
EXTENSIONS_DIR
}
/preconditioner/PetscPreconPfc.cc
${
EXTENSIONS_DIR
}
/preconditioner/PetscPreconPfc.cc
${
EXTENSIONS_DIR
}
/preconditioner/PetscPreconPfcDiag.cc
${
EXTENSIONS_DIR
}
/preconditioner/PetscPreconCahnHilliard.cc
)
${
EXTENSIONS_DIR
}
/preconditioner/PetscPreconCahnHilliard.cc
)
endif
(
ENABLE_SEQ_PETSC
)
endif
(
ENABLE_SEQ_PETSC
)
if
(
ENABLE_PARALLEL_DOMAIN
)
if
(
ENABLE_PARALLEL_DOMAIN
)
list
(
APPEND EXTENSIONS_SRC
list
(
APPEND EXTENSIONS_SRC
# ${EXTENSIONS_DIR}/preconditioner/PetscSolverNavierStokes2.cc
# ${EXTENSIONS_DIR}/preconditioner/PetscSolverNavierStokes2.cc
${
EXTENSIONS_DIR
}
/preconditioner/PetscSolverPfc.cc
)
${
EXTENSIONS_DIR
}
/preconditioner/PetscSolverPfc.cc
${
EXTENSIONS_DIR
}
/preconditioner/PetscSolverPfc_diag.cc
)
endif
(
ENABLE_PARALLEL_DOMAIN
)
endif
(
ENABLE_PARALLEL_DOMAIN
)
list
(
APPEND COMPILEFLAGS
"-DHAVE_EXTENSIONS=1"
)
list
(
APPEND COMPILEFLAGS
"-DHAVE_EXTENSIONS=1"
)
...
@@ -502,7 +507,7 @@ if(ENABLE_EXTENSIONS)
...
@@ -502,7 +507,7 @@ if(ENABLE_EXTENSIONS)
if
(
ENABLE_BASE_PROBLEMS
)
if
(
ENABLE_BASE_PROBLEMS
)
SET
(
BASE_PROBLEMS_SRC
SET
(
BASE_PROBLEMS_SRC
#
${EXTENSIONS_DIR}/base_problems/CahnHilliard.cc
${
EXTENSIONS_DIR
}
/base_problems/CahnHilliard.cc
${
EXTENSIONS_DIR
}
/base_problems/CahnHilliard_RB.cc
${
EXTENSIONS_DIR
}
/base_problems/CahnHilliard_RB.cc
${
EXTENSIONS_DIR
}
/base_problems/CahnHilliardNavierStokes.cc
${
EXTENSIONS_DIR
}
/base_problems/CahnHilliardNavierStokes.cc
# ${EXTENSIONS_DIR}/base_problems/DiffuseDomainFsi.cc
# ${EXTENSIONS_DIR}/base_problems/DiffuseDomainFsi.cc
...
@@ -511,13 +516,15 @@ if(ENABLE_EXTENSIONS)
...
@@ -511,13 +516,15 @@ if(ENABLE_EXTENSIONS)
# ${EXTENSIONS_DIR}/base_problems/NavierStokes_Chorin.cc
# ${EXTENSIONS_DIR}/base_problems/NavierStokes_Chorin.cc
${
EXTENSIONS_DIR
}
/base_problems/NavierStokesCahnHilliard.cc
${
EXTENSIONS_DIR
}
/base_problems/NavierStokesCahnHilliard.cc
${
EXTENSIONS_DIR
}
/base_problems/NavierStokesPhase_TaylorHood.cc
${
EXTENSIONS_DIR
}
/base_problems/NavierStokesPhase_TaylorHood.cc
#
${EXTENSIONS_DIR}/base_problems/NavierStokes_TaylorHood.cc
${
EXTENSIONS_DIR
}
/base_problems/NavierStokes_TaylorHood.cc
${
EXTENSIONS_DIR
}
/base_problems/NavierStokes_TaylorHood_RB.cc
${
EXTENSIONS_DIR
}
/base_problems/NavierStokes_TaylorHood_RB.cc
#
${EXTENSIONS_DIR}/base_problems/NavierStokes_TH_MultiPhase.cc
${
EXTENSIONS_DIR
}
/base_problems/NavierStokes_TH_MultiPhase.cc
${
EXTENSIONS_DIR
}
/base_problems/NavierStokes_TH_MultiPhase_RB.cc
${
EXTENSIONS_DIR
}
/base_problems/NavierStokes_TH_MultiPhase_RB.cc
${
EXTENSIONS_DIR
}
/base_problems/PhaseFieldCrystal.cc
${
EXTENSIONS_DIR
}
/base_problems/PhaseFieldCrystal.cc
${
EXTENSIONS_DIR
}
/base_problems/PhaseFieldCrystal_Phase.cc
${
EXTENSIONS_DIR
}
/base_problems/PhaseFieldCrystal_Phase.cc
${
EXTENSIONS_DIR
}
/base_problems/PhaseFieldCrystal_RB.cc
)
${
EXTENSIONS_DIR
}
/base_problems/PhaseFieldCrystal_RB.cc
${
EXTENSIONS_DIR
}
/base_problems/PolarizationField.cc
${
EXTENSIONS_DIR
}
/base_problems/QuasiCrystal.cc
)
list
(
APPEND COMPILEFLAGS
"-DHAVE_BASE_PROBLEMS=1"
)
list
(
APPEND COMPILEFLAGS
"-DHAVE_BASE_PROBLEMS=1"
)
list
(
APPEND AMDIS_INCLUDE_DIRS
${
EXTENSIONS_DIR
}
/base_problems
)
list
(
APPEND AMDIS_INCLUDE_DIRS
${
EXTENSIONS_DIR
}
/base_problems
)
if
(
WIN32
)
if
(
WIN32
)
...
@@ -647,11 +654,21 @@ INSTALL(FILES ${HEADERS}
...
@@ -647,11 +654,21 @@ INSTALL(FILES ${HEADERS}
DESTINATION include/amdis/est/
)
DESTINATION include/amdis/est/
)
list
(
APPEND deb_add_dirs
"include/amdis/est"
)
list
(
APPEND deb_add_dirs
"include/amdis/est"
)
FILE
(
GLOB HEADERS
"
${
SOURCE_DIR
}
/expressions/*.h"
)
FILE
(
GLOB HEADERS
"
${
SOURCE_DIR
}
/expressions/*.h
*
"
)
INSTALL
(
FILES
${
HEADERS
}
INSTALL
(
FILES
${
HEADERS
}
DESTINATION include/amdis/expressions/
)
DESTINATION include/amdis/expressions/
)
list
(
APPEND deb_add_dirs
"include/amdis/expressions"
)
list
(
APPEND deb_add_dirs
"include/amdis/expressions"
)
FILE
(
GLOB HEADERS
"
${
SOURCE_DIR
}
/operations/*.h*"
)
INSTALL
(
FILES
${
HEADERS
}
DESTINATION include/amdis/operations/
)
list
(
APPEND deb_add_dirs
"include/amdis/operations"
)
FILE
(
GLOB HEADERS
"
${
SOURCE_DIR
}
/traits/*.h*"
)
INSTALL
(
FILES
${
HEADERS
}
DESTINATION include/amdis/traits/
)
list
(
APPEND deb_add_dirs
"include/amdis/traits"
)
FILE
(
GLOB HEADERS
"
${
SOURCE_DIR
}
/time/*.h"
)
FILE
(
GLOB HEADERS
"
${
SOURCE_DIR
}
/time/*.h"
)
INSTALL
(
FILES
${
HEADERS
}
INSTALL
(
FILES
${
HEADERS
}
DESTINATION include/amdis/time/
)
DESTINATION include/amdis/time/
)
...
...
AMDiS/
Find
HYPRE.cmake
→
AMDiS/HYPRE
Config
.cmake
View file @
9c44b131
File moved
AMDiS/src/AMDiS.h
View file @
9c44b131
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include
"Boundary.h"
#include
"Boundary.h"
#include
"BoundaryCondition.h"
#include
"BoundaryCondition.h"
#include
"BoundaryManager.h"
#include
"BoundaryManager.h"
#include
"Bubble.h"
#include
"CoarseningManager.h"
#include
"CoarseningManager.h"
#include
"CoarseningManager1d.h"
#include
"CoarseningManager1d.h"
#include
"CoarseningManager2d.h"
#include
"CoarseningManager2d.h"
...
@@ -73,7 +74,7 @@
...
@@ -73,7 +74,7 @@
#include
"Line.h"
#include
"Line.h"
#include
"MacroElement.h"
#include
"MacroElement.h"
#include
"Marker.h"
#include
"Marker.h"
#include
"MathFunctions.h"
//
#include "MathFunctions.h"
#include
"MatrixVector.h"
#include
"MatrixVector.h"
#include
"Mesh.h"
#include
"Mesh.h"
#include
"MeshStructure.h"
#include
"MeshStructure.h"
...
@@ -85,7 +86,7 @@
...
@@ -85,7 +86,7 @@
#include
"ProblemStat.h"
#include
"ProblemStat.h"
#include
"ProblemInstat.h"
#include
"ProblemInstat.h"
#include
"ProblemTimeInterface.h"
#include
"ProblemTimeInterface.h"
#include
"ProblemImplicit.h"
//
#include "ProblemImplicit.h"
#include
"ProblemInterpol.h"
#include
"ProblemInterpol.h"
#include
"ProblemStatBase.h"
#include
"ProblemStatBase.h"
#include
"SecondOrderTerm.h"
#include
"SecondOrderTerm.h"
...
@@ -106,6 +107,7 @@
...
@@ -106,6 +107,7 @@
#include
"TimedObject.h"
#include
"TimedObject.h"
#include
"TransformDOF.h"
#include
"TransformDOF.h"
#include
"Traverse.h"
#include
"Traverse.h"
#include
"Traits.h"
#include
"Triangle.h"
#include
"Triangle.h"
#include
"VertexVector.h"
#include
"VertexVector.h"
#include
"ZeroOrderTerm.h"
#include
"ZeroOrderTerm.h"
...
@@ -153,7 +155,7 @@
...
@@ -153,7 +155,7 @@
#include
"parallel/ParallelProblemStat.h"
#include
"parallel/ParallelProblemStat.h"
#if HAVE_PARALLEL_MTL4
#if HAVE_PARALLEL_MTL4
#include
"parallel/PMTL4Solver.h"
//
#include "parallel/PMTL4Solver.h"
#else
#else
#include
"parallel/PetscSolver.h"
#include
"parallel/PetscSolver.h"
#include
"parallel/PetscSolverNavierStokes.h"
#include
"parallel/PetscSolverNavierStokes.h"
...
...
AMDiS/src/AMDiS_fwd.h
View file @
9c44b131
...
@@ -104,7 +104,7 @@ namespace AMDiS {
...
@@ -104,7 +104,7 @@ namespace AMDiS {
class
ElementFileWriter
;
class
ElementFileWriter
;
class
GNUPlotWriter
;
class
GNUPlotWriter
;
class
MacroReader
;
class
MacroReader
;
class
MacroWriter
;
struct
MacroWriter
;
class
PngWriter
;
class
PngWriter
;
class
PovrayWriter
;
class
PovrayWriter
;
class
Spreadsheet
;
class
Spreadsheet
;
...
...
AMDiS/src/AdaptInfo.h
View file @
9c44b131
...
@@ -57,6 +57,7 @@ namespace AMDiS {
...
@@ -57,6 +57,7 @@ namespace AMDiS {
fac_sum
(
1.0
),
fac_sum
(
1.0
),
spaceTolerance
(
0.0
),
spaceTolerance
(
0.0
),
timeTolerance
(
0.0
),
timeTolerance
(
0.0
),
timeRelativeTolerance
(
0.0
),
timeErrLow
(
0.0
),
timeErrLow
(
0.0
),
coarsenAllowed
(
0
),
coarsenAllowed
(
0
),
refinementAllowed
(
1
),
refinementAllowed
(
1
),
...
@@ -65,6 +66,7 @@ namespace AMDiS {
...
@@ -65,6 +66,7 @@ namespace AMDiS {
{
{
Parameters
::
get
(
prefix
+
"->tolerance"
,
spaceTolerance
);
Parameters
::
get
(
prefix
+
"->tolerance"
,
spaceTolerance
);
Parameters
::
get
(
prefix
+
"->time tolerance"
,
timeTolerance
);
Parameters
::
get
(
prefix
+
"->time tolerance"
,
timeTolerance
);
Parameters
::
get
(
prefix
+
"->time relative tolerance"
,
timeRelativeTolerance
);
Parameters
::
get
(
prefix
+
"->coarsen allowed"
,
coarsenAllowed
);
Parameters
::
get
(
prefix
+
"->coarsen allowed"
,
coarsenAllowed
);
Parameters
::
get
(
prefix
+
"->refinement allowed"
,
refinementAllowed
);
Parameters
::
get
(
prefix
+
"->refinement allowed"
,
refinementAllowed
);
Parameters
::
get
(
prefix
+
"->refine bisections"
,
refineBisections
);
Parameters
::
get
(
prefix
+
"->refine bisections"
,
refineBisections
);
...
@@ -72,6 +74,8 @@ namespace AMDiS {
...
@@ -72,6 +74,8 @@ namespace AMDiS {
Parameters
::
get
(
prefix
+
"->sum factor"
,
fac_sum
);
Parameters
::
get
(
prefix
+
"->sum factor"
,
fac_sum
);
Parameters
::
get
(
prefix
+
"->max factor"
,
fac_max
);
Parameters
::
get
(
prefix
+
"->max factor"
,
fac_max
);
if
(
timeTolerance
==
0.0
&&
timeRelativeTolerance
==
0.0
)
timeTolerance
=
1.0
;
timeErrLow
=
timeTolerance
*
0.3
;
timeErrLow
=
timeTolerance
*
0.3
;
}
}
...
@@ -95,6 +99,9 @@ namespace AMDiS {
...
@@ -95,6 +99,9 @@ namespace AMDiS {
/// Time tolerance.
/// Time tolerance.
double
timeTolerance
;
double
timeTolerance
;
/// Relative time tolerance
double
timeRelativeTolerance
;
/// Lower bound for the time error.
/// Lower bound for the time error.
double
timeErrLow
;
double
timeErrLow
;
...
@@ -143,6 +150,7 @@ namespace AMDiS {
...
@@ -143,6 +150,7 @@ namespace AMDiS {
maxSolverIterations
(
0
),
maxSolverIterations
(
0
),
solverTolerance
(
1e-8
),
solverTolerance
(
1e-8
),
solverResidual
(
0.0
),
solverResidual
(
0.0
),
globalTimeTolerance
(
1.0
),
scalContents
(
size
),
scalContents
(
size
),
deserialized
(
false
),
deserialized
(
false
),
rosenbrockMode
(
false
)
rosenbrockMode
(
false
)
...
@@ -175,6 +183,7 @@ namespace AMDiS {
...
@@ -175,6 +183,7 @@ namespace AMDiS {
Parameters
::
get
(
name
+
"->min timestep"
,
minTimestep
);
Parameters
::
get
(
name
+
"->min timestep"
,
minTimestep
);
Parameters
::
get
(
name
+
"->max timestep"
,
maxTimestep
);
Parameters
::
get
(
name
+
"->max timestep"
,
maxTimestep
);
Parameters
::
get
(
name
+
"->number of timesteps"
,
nTimesteps
);
Parameters
::
get
(
name
+
"->number of timesteps"
,
nTimesteps
);
Parameters
::
get
(
name
+
"->time tolerance"
,
globalTimeTolerance
);
}
}
/// Resets all variables to zero (or something equivalent)
/// Resets all variables to zero (or something equivalent)
...
@@ -481,6 +490,12 @@ namespace AMDiS {
...
@@ -481,6 +490,12 @@ namespace AMDiS {
return
scalContents
[
index
]
->
timeTolerance
;
return
scalContents
[
index
]
->
timeTolerance
;
}
}
/// Returns \ref timeRelativeTolerance.
inline
double
getTimeRelativeTolerance
(
int
index
)
{
return
scalContents
[
index
]
->
timeRelativeTolerance
;
}
/// Sets \ref time
/// Sets \ref time
inline
double
setTime
(
double
t
)
inline
double
setTime
(
double
t
)
{
{
...
@@ -690,6 +705,18 @@ namespace AMDiS {
...
@@ -690,6 +705,18 @@ namespace AMDiS {
{
{
return
solverResidual
;
return
solverResidual
;
}
}
inline
void
setGlobalTimeTolerance
(
double
tol
)
{
globalTimeTolerance
=
tol
;
}
inline
double
getGlobalTimeTolerance
()
{
return
globalTimeTolerance
;
}
/// Returns true, if the adaptive procedure was deserialized from a file.
/// Returns true, if the adaptive procedure was deserialized from a file.
bool
isDeserialized
()
const
bool
isDeserialized
()
const
...
@@ -796,6 +823,9 @@ namespace AMDiS {
...
@@ -796,6 +823,9 @@ namespace AMDiS {
///
///
double
solverResidual
;
double
solverResidual
;
/// tolerance for the overall time error
double
globalTimeTolerance
;
/// Scalar adapt infos.
/// Scalar adapt infos.
std
::
vector
<
ScalContent
*>
scalContents
;
std
::
vector
<
ScalContent
*>
scalContents
;
...
...
AMDiS/src/AdaptInstationary.cc
View file @
9c44b131
...
@@ -162,12 +162,6 @@ namespace AMDiS {
...
@@ -162,12 +162,6 @@ namespace AMDiS {
problemIteration
->
oneIteration
(
adaptInfo
,
FULL_ITERATION
);
problemIteration
->
oneIteration
(
adaptInfo
,
FULL_ITERATION
);
problemIteration
->
endIteration
(
adaptInfo
);
problemIteration
->
endIteration
(
adaptInfo
);
adaptInfo
->
setLastProcessedTimestep
(
adaptInfo
->
getTimestep
());
adaptInfo
->
setLastProcessedTimestep
(
adaptInfo
->
getTimestep
());
if
(
dbgMode
)
{
std
::
cout
<<
"=== ADAPT INFO DEBUG MODE ===
\n
"
;
std
::
cout
<<
"=== explicitTimeStrategy() ===
\n
"
;
adaptInfo
->
printTimeErrorLowInfo
();
}
}
}
...
@@ -207,15 +201,24 @@ namespace AMDiS {
...
@@ -207,15 +201,24 @@ namespace AMDiS {
// === Space iterations. ===
// === Space iterations. ===
do
{
do
{
problemIteration
->
beginIteration
(
adaptInfo
);
problemIteration
->
beginIteration
(
adaptInfo
);
if
(
dbgMode
)
{
std
::
cout
<<
"=== ADAPT INFO DEBUG MODE ===
\n
"
;
if
(
dbgMode
)
{
std
::
cout
<<
"=== in implicitTimeStrategy() ===
\n
"
;
std
::
cout
<<
"=== ADAPT INFO DEBUG MODE ===
\n
"
;
std
::
cout
<<
"=== space/time iteration "
<<
adaptInfo
->
getSpaceIteration
()
std
::
cout
<<
"=== in implicitTimeStrategy() ===
\n
"
;
<<
" : "
<<
adaptInfo
->
getTimestepIteration
()
<<
" ===
\n
"
;
std
::
cout
<<
"=== space/time iteration "
<<
adaptInfo
->
getSpaceIteration
()
adaptInfo
->
printTimeErrorLowInfo
();
<<
" : "
<<
adaptInfo
->
getTimestepIteration
()
<<
" ===
\n
"
;
}
adaptInfo
->
printTimeErrorLowInfo
();
}
if
(
problemIteration
->
oneIteration
(
adaptInfo
,
FULL_ITERATION
))
{
Flag
adapted
=
problemIteration
->
oneIteration
(
adaptInfo
,
FULL_ITERATION
);
#if HAVE_PARALLEL_DOMAIN_AMDIS
int
recvAllValues
=
0
;
int
isAdapted
=
static_cast
<
bool
>
(
adapted
);
MPI
::
COMM_WORLD
.
Allreduce
(
&
isAdapted
,
&
recvAllValues
,
1
,
MPI_INT
,
MPI_SUM
);
if
(
recvAllValues
)
{
#else
if
(
adapted
)
{
#endif
if
(
!
fixedTimestep
&&
if
(
!
fixedTimestep
&&
!
adaptInfo
->
timeToleranceReached
()
&&
!
adaptInfo
->
timeToleranceReached
()
&&
!
(
adaptInfo
->
getTimestep
()
<=
adaptInfo
->
getMinTimestep
()))
{
!
(
adaptInfo
->
getTimestep
()
<=
adaptInfo
->
getMinTimestep
()))
{
...
@@ -244,7 +247,6 @@ namespace AMDiS {
...
@@ -244,7 +247,6 @@ namespace AMDiS {
adaptInfo
->
setLastProcessedTimestep
(
adaptInfo
->
getTimestep
());
adaptInfo
->
setLastProcessedTimestep
(
adaptInfo
->
getTimestep
());
// After successful iteration/timestep the timestep will be changed according
// After successful iteration/timestep the timestep will be changed according
// adaption rules for next timestep.
// adaption rules for next timestep.
// First, check for increase of timestep
// First, check for increase of timestep
...
...
AMDiS/src/AdaptStationary.cc
View file @
9c44b131
...
@@ -99,7 +99,7 @@ namespace AMDiS {
...
@@ -99,7 +99,7 @@ namespace AMDiS {
void
AdaptStationary
::
initialize
()
void
AdaptStationary
::
initialize
()
{
{
Parameters
::
get
(
name
+
"->info"
,
info
);
Parameters
::
get
(
name
+
"->info"
,
info
);
}
}
...
...
AMDiS/src/BasisFunction.cc
View file @
9c44b131
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
#include
"DOFVector.h"
#include
"DOFVector.h"
#include
"BasisFunction.h"
#include
"BasisFunction.h"
#include
"Lagrange.h"
#include
"Lagrange.h"
#include
"Bubble.h"
namespace
AMDiS
{
namespace
AMDiS
{
...
...
AMDiS/src/BasisFunction.h
View file @
9c44b131
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
#include
<string>
#include
<string>
#include
"AMDiS_fwd.h"
#include
"AMDiS_fwd.h"
#include
"CreatorInterface.h"
#include
"Global.h"
#include
"Global.h"
#include
"Boundary.h"
#include
"Boundary.h"
#include
"MatrixVector.h"
#include
"MatrixVector.h"
...
@@ -311,6 +312,12 @@ namespace AMDiS {
...
@@ -311,6 +312,12 @@ namespace AMDiS {
const
ElementVector
&
uh
,
const
ElementVector
&
uh
,
WorldMatrix
<
double
>*
val
)
const
;
WorldMatrix
<
double
>*
val
)
const
;
/**
* override this method, if the base of your finite element space is not
* nodal
*/
virtual
bool
isNodal
()
const
=
0
;
protected:
protected:
/// Textual description
/// Textual description
std
::
string
name
;
std
::
string
name
;
...
@@ -339,6 +346,26 @@ namespace AMDiS {
...
@@ -339,6 +346,26 @@ namespace AMDiS {
/// Vector of second derivatives
/// Vector of second derivatives
std
::
vector
<
D2BasFctType
*>
*
d2Phi
;
std
::
vector
<
D2BasFctType
*>
*
d2Phi
;
};
};
/**
* \brief
* Interface for creators of concrete BasisFunctions.
*/
class
BasisFunctionCreator
:
public
CreatorInterface
<
BasisFunction
>
{
public:
virtual
~
BasisFunctionCreator
()
{}
/// Sets \ref problem
void
setDim
(
int
dim_
)
{
dim
=
dim_
;
}
protected:
/// dimension of the mesh
int
dim
;
};
}
}
#include
"BasisFunction.hh"
#include
"BasisFunction.hh"
...
...
AMDiS/src/Bubble.cc
0 → 100644
View file @
9c44b131
This diff is collapsed.
Click to expand it.
AMDiS/src/Bubble.h
0 → 100644
View file @
9c44b131
/******************************************************************************
*
* AMDiS - Adaptive multidimensional simulations
*
* Copyright (C) 2013 Dresden University of Technology. All Rights Reserved.
* Web: https://fusionforge.zih.tu-dresden.de/projects/amdis
*
* Authors:
* Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al.
*
* This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
* WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
*
* This file is part of AMDiS
*
* See also license.opensource.txt in the distribution.
*
******************************************************************************/
// Created by Roman Weissflog & Philipp Schulz
/** \file Bubble.h */
#ifndef AMDIS_BUBBLE_H
#define AMDIS_BUBBLE_H
#include
<list>
#include
<boost/numeric/mtl/mtl.hpp>
#include
"AbstractFunction.h"
#include
"BasisFunction.h"
#include
"FixVec.h"
namespace
AMDiS
{
/** \ingroup FEMSpace
* \brief
* Lagrange basis functions plus Bubble function. Sub class of BasisFunction
*/
class
Bubble
:
public
BasisFunction
{
public:
/// Creator class used in the BasisFunctionCreatorMap.
class
Creator
:
public
BasisFunctionCreator
{
public:
virtual
~
Creator
()
{}
/// Returns a new Lagrange object.
BasisFunction
*
create
()
{
return
getBubble
(
this
->
dim
,
this
->
dim
+
1
);
// has to be generalized in later versions of bubble functions
}
};
protected:
/// Constructs lagrange/bubble basis functions with the given dim and degree.
/// Constructor is protected to avoid multiple instantiation of identical
/// basis functions. Use \ref getBubble instead.
Bubble
(
int
dim_
,
int
degree_
);
/** \brief
* destructor
*/
virtual
~
Bubble
();
public:
/// Returns a pointer to lagrange and bubble basis functions with the given dim and
/// degree. Multiple instantiation of identical basis functions is avoided
/// by rembering once created basis functions in \ref allBasFcts.
static
Bubble
*
getBubble
(
int
dim
,
int
degree
);
/// Implements BasisFunction::interpol
void
interpol
(
const
ElInfo
*
,
int
,
const
int
*
,
AbstractFunction
<
double
,
WorldVector
<
double
>
>*
,
mtl
::
dense_vector
<
double
>&
)
const
override
;
/// Implements BasisFunction::interpol
void
interpol
(
const
ElInfo
*
,
int
,
const
int
*
b_no
,
AbstractFunction
<
WorldVector
<
double
>
,
WorldVector
<
double
>
>*
,
mtl
::
dense_vector
<
WorldVector
<
double
>
>&
)
const
override
;