Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
iwr
amdis
Commits
8a79f686
Commit
8a79f686
authored
Nov 30, 2010
by
Naumann, Andreas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added test data creation programs
parent
a56db0a5
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
1448 additions
and
7 deletions
+1448
-7
AMDiS/CMakeLists.txt
AMDiS/CMakeLists.txt
+5
-7
AMDiS/test/CMakeLists.txt
AMDiS/test/CMakeLists.txt
+2
-0
AMDiS/test/datacreation/CMakeLists.txt
AMDiS/test/datacreation/CMakeLists.txt
+13
-0
AMDiS/test/datacreation/src/BallProject.cpp
AMDiS/test/datacreation/src/BallProject.cpp
+111
-0
AMDiS/test/datacreation/src/BallProject.h
AMDiS/test/datacreation/src/BallProject.h
+24
-0
AMDiS/test/datacreation/src/BunnyProject.cpp
AMDiS/test/datacreation/src/BunnyProject.cpp
+91
-0
AMDiS/test/datacreation/src/BunnyProject.h
AMDiS/test/datacreation/src/BunnyProject.h
+23
-0
AMDiS/test/datacreation/src/ElliptProject.cpp
AMDiS/test/datacreation/src/ElliptProject.cpp
+94
-0
AMDiS/test/datacreation/src/ElliptProject.h
AMDiS/test/datacreation/src/ElliptProject.h
+21
-0
AMDiS/test/datacreation/src/HeatProject.cpp
AMDiS/test/datacreation/src/HeatProject.cpp
+132
-0
AMDiS/test/datacreation/src/HeatProject.h
AMDiS/test/datacreation/src/HeatProject.h
+28
-0
AMDiS/test/datacreation/src/HeatProject.hh
AMDiS/test/datacreation/src/HeatProject.hh
+118
-0
AMDiS/test/datacreation/src/NeumannProject.cpp
AMDiS/test/datacreation/src/NeumannProject.cpp
+99
-0
AMDiS/test/datacreation/src/NeumannProject.h
AMDiS/test/datacreation/src/NeumannProject.h
+20
-0
AMDiS/test/datacreation/src/ParametricProject.cpp
AMDiS/test/datacreation/src/ParametricProject.cpp
+72
-0
AMDiS/test/datacreation/src/ParametricProject.h
AMDiS/test/datacreation/src/ParametricProject.h
+23
-0
AMDiS/test/datacreation/src/ParametricProject.hh
AMDiS/test/datacreation/src/ParametricProject.hh
+94
-0
AMDiS/test/datacreation/src/PeriodicProject.cpp
AMDiS/test/datacreation/src/PeriodicProject.cpp
+90
-0
AMDiS/test/datacreation/src/PeriodicProject.h
AMDiS/test/datacreation/src/PeriodicProject.h
+20
-0
AMDiS/test/datacreation/src/Project.h
AMDiS/test/datacreation/src/Project.h
+63
-0
AMDiS/test/datacreation/src/ProjectList.cpp
AMDiS/test/datacreation/src/ProjectList.cpp
+38
-0
AMDiS/test/datacreation/src/SphereProject.cpp
AMDiS/test/datacreation/src/SphereProject.cpp
+81
-0
AMDiS/test/datacreation/src/SphereProject.h
AMDiS/test/datacreation/src/SphereProject.h
+23
-0
AMDiS/test/datacreation/src/TorusProject.h
AMDiS/test/datacreation/src/TorusProject.h
+21
-0
AMDiS/test/datacreation/src/VecelliptProject.cpp
AMDiS/test/datacreation/src/VecelliptProject.cpp
+105
-0
AMDiS/test/datacreation/src/VecelliptProject.h
AMDiS/test/datacreation/src/VecelliptProject.h
+24
-0
AMDiS/test/datacreation/src/creator_base.cpp
AMDiS/test/datacreation/src/creator_base.cpp
+13
-0
No files found.
AMDiS/CMakeLists.txt
View file @
8a79f686
...
...
@@ -28,8 +28,7 @@ set(ENABLE_PARMETIS off)
option
(
ENABLE_UMFPACK
"use umfpack solver"
false
)
option
(
ENABLE_MKL
"use the mkl"
false
)
SET
(
MKL_DIR
""
CACHE PATH
"MKL directory"
)
#option(ENABLE_TESTS "compile the tests" false)
SET
(
ENABLE_TESTS false
)
option
(
ENABLE_TESTS
"compile the tests"
false
)
if
(
ENABLE_INTEL
)
Message
(
"please set the icc manually"
)
...
...
@@ -233,6 +232,7 @@ if(ENABLE_UMFPACK)
INSTALL
(
FILES
${
LIB_DIR
}
/AMD/Lib/libamd.a
DESTINATION lib/amdis/amd/
)
SET
(
RPM_DEPEND_STR
"blas"
)
LIST
(
APPEND AMDiS_LIBS amdis blas amd umfpack
)
endif
(
ENABLE_UMFPACK
)
if
(
ENABLE_MKL
)
...
...
@@ -254,7 +254,7 @@ include_directories(${SOURCE_DIR})
add_library
(
amdis SHARED
${
AMDIS_SRC
}
${
PARALLEL_DOMAIN_AMDIS_SRC
}
)
add_library
(
compositeFEM SHARED
${
COMPOSITE_FEM_SRC
}
)
target_link_libraries
(
compositeFEM amdis
)
LIST
(
APPEND AMDiS_LIBS amdis boost_system boost_iostreams
)
if
(
WIN32
)
SET
(
COMPILEFLAGS
"
${
COMPILEFLAGS
}
-D_SCL_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS"
)
endif
(
WIN32
)
...
...
@@ -329,8 +329,6 @@ set(CPACK_RPM_PACKAGE_REQUIRES "boost-devel >= 1.42, ${RPM_DEPEND_STR}")
set
(
CPACK_DEBIAN_PACKAGE_DEPENDS
"libboost-dev (>= 1.42)"
)
include
(
CPack
)
if
(
ENABLE_TESTS
)
#ENABLE_TESTING()
#add_test(demo_test run_test.sh)
#add_test(demo_test ${CMAKE_CTEST_COMMAND} --build-and-test "${CMAKE_SOURCE_DIR}/test/demo_test" "${CMAKE_BINARY_DIR}/test/demo_test" --build-generator "${CMAKE_GENERATOR}" --build-makeprogram "${CMAKE_MAKE_PROGRAM}" "${CMAKE_BINARY_DIR}/test/demo_test")
ENABLE_TESTING
()
add_subdirectory
(
test
)
endif
(
ENABLE_TESTS
)
AMDiS/test/CMakeLists.txt
0 → 100644
View file @
8a79f686
project
(
tests
)
add_subdirectory
(
datacreation
)
AMDiS/test/datacreation/CMakeLists.txt
0 → 100644
View file @
8a79f686
project
(
testdatacreation
)
message
(
"source-dir:
${
AMDiS_SOURCE_DIR
}
"
)
include_directories
(
${
AMDiS_SOURCE_DIR
}
)
file
(
GLOB PROJECTFILES src/*Project.cpp
)
foreach
(
projectfile
${
PROJECTFILES
}
)
#create creatorname
get_filename_component
(
CppName
${
projectfile
}
, NAME_WE
)
string
(
REPLACE
"Project"
""
creatorsuffix
${
CppName
}
)
set
(
PROJECTINCLUDE
"
${
CppName
}
.h"
)
configure_file
(
src/creator_base.cpp src/creator
${
creatorsuffix
}
.cpp @ONLY
)
add_executable
(
creator
${
creatorsuffix
}
src/creator
${
creatorsuffix
}
.cpp src/ProjectList.cpp
${
projectfile
}
)
target_link_libraries
(
creator
${
creatorsuffix
}
${
AMDiS_LIBS
}
)
endforeach
(
projectfile
)
AMDiS/test/datacreation/src/BallProject.cpp
0 → 100644
View file @
8a79f686
#include "BallProject.h"
#include "AdaptStationary.h"
/// Dirichlet boundary function
class
G
:
public
AbstractFunction
<
double
,
WorldVector
<
double
>
>
{
public:
/// Implementation of AbstractFunction::operator().
double
operator
()(
const
WorldVector
<
double
>&
x
)
const
{
return
exp
(
-
10.0
*
(
x
*
x
));
}
};
/// RHS function
class
F
:
public
AbstractFunction
<
double
,
WorldVector
<
double
>
>
{
public:
F
(
int
degree
)
:
AbstractFunction
<
double
,
WorldVector
<
double
>
>
(
degree
)
{}
/// Implementation of AbstractFunction::operator().
double
operator
()(
const
WorldVector
<
double
>&
x
)
const
{
int
dim
=
x
.
getSize
();
double
r2
=
x
*
x
;
double
ux
=
exp
(
-
10.0
*
r2
);
return
-
(
400.0
*
r2
-
20.0
*
dim
)
*
ux
;
}
};
BallDemo
::
BallDemo
()
:
ball
(
"ball"
),
ballCenter
(
NULL
),
adaptInfo
(
NULL
),
adapt
(
NULL
),
matrixOperator
(
NULL
),
rhsOperator
(
NULL
)
{
}
BallDemo
::~
BallDemo
()
{
if
(
matrixOperator
!=
NULL
)
delete
matrixOperator
;
if
(
rhsOperator
!=
NULL
)
delete
rhsOperator
;
if
(
ballCenter
!=
NULL
)
delete
ballCenter
;
if
(
adapt
!=
NULL
)
delete
adapt
;
if
(
adaptInfo
!=
NULL
)
delete
adaptInfo
;
}
void
BallDemo
::
create
(
std
::
string
&
filename
)
{
// ===== init parameters =====
Parameters
::
init
(
false
,
filename
);
ballCenter
=
new
WorldVector
<
double
>
();
ballCenter
->
set
(
0.0
);
// ===== create projection =====
new
AMDiS
::
BallProject
(
1
,
BOUNDARY_PROJECTION
,
*
ballCenter
,
1.0
);
// ===== create and init the scalar problem =====
ball
.
initialize
(
INIT_ALL
);
// === create adapt info ===
adaptInfo
=
new
AdaptInfo
(
"ball->adapt"
);
// === create adapt ===
adapt
=
new
AdaptStationary
(
"ball->adapt"
,
&
ball
,
adaptInfo
);
// ===== create matrix operator =====
matrixOperator
=
new
Operator
(
ball
.
getFeSpace
());
matrixOperator
->
addSecondOrderTerm
(
new
Laplace_SOT
);
ball
.
addMatrixOperator
(
matrixOperator
);
// ===== create rhs operator =====
int
degree
=
ball
.
getFeSpace
()
->
getBasisFcts
()
->
getDegree
();
rhsOperator
=
new
Operator
(
ball
.
getFeSpace
());
rhsOperator
->
addZeroOrderTerm
(
new
CoordsAtQP_ZOT
(
new
F
(
degree
)));
ball
.
addVectorOperator
(
rhsOperator
);
// ===== add boundary conditions =====
ball
.
addDirichletBC
(
1
,
new
G
);
}
int
BallDemo
::
solve
(
SolutionInformation
&
solinfo
)
{
assert
(
adaptInfo
!=
NULL
);
assert
(
adapt
!=
NULL
);
assert
(
matrixOperator
!=
NULL
);
assert
(
rhsOperator
!=
NULL
);
int
retCode
=
adapt
->
adapt
();
solinfo
.
dofVec
=
ball
.
getSolution
();
return
retCode
;
}
void
createProjectList
(
ProjectList
&
list
)
{
list
.
clear
();
Project
*
demo
=
new
BallDemo
();
ProjectInfo
ballInfo
(
demo
,
"init/ball.dat.2d"
,
"../testdata/balldata_2d"
);
list
.
push_back
(
ballInfo
);
ballInfo
=
ProjectInfo
(
demo
,
"init/ball.dat.3d"
,
"../testdata/balldata_3d"
);
list
.
push_back
(
ballInfo
);
}
AMDiS/test/datacreation/src/BallProject.h
0 → 100644
View file @
8a79f686
#ifndef BALLPROJECT_H
#define BALLPROJECT_H
#include "Project.h"
#include "FixVec.h"
#include "ProblemScal.h"
using
namespace
AMDiS
;
class
BallDemo
:
public
Project
{
ProblemScal
ball
;
WorldVector
<
double
>*
ballCenter
;
AdaptInfo
*
adaptInfo
;
AdaptStationary
*
adapt
;
Operator
*
matrixOperator
;
Operator
*
rhsOperator
;
public:
BallDemo
()
;
~
BallDemo
()
;
void
create
(
std
::
string
&
)
;
int
solve
(
SolutionInformation
&
);
};
#endif
AMDiS/test/datacreation/src/BunnyProject.cpp
0 → 100644
View file @
8a79f686
#include "BunnyProject.h"
#include "AdaptStationary.h"
/// RHS function
class
F
:
public
AbstractFunction
<
double
,
WorldVector
<
double
>
>
{
public:
F
(
int
degree
)
:
AbstractFunction
<
double
,
WorldVector
<
double
>
>
(
degree
)
{}
/// Implementation of AbstractFunction::operator().
double
operator
()(
const
WorldVector
<
double
>&
x
)
const
{
return
-
2
*
x
[
0
];
}
};
/// boundary
class
G
:
public
AbstractFunction
<
double
,
WorldVector
<
double
>
>
{
public:
/// Implementation of AbstractFunction::operator().
double
operator
()(
const
WorldVector
<
double
>&
x
)
const
{
return
10000.0
;
}
};
Bunnydemo
::
Bunnydemo
()
:
bunny
(
"bunny"
),
ballCenter
(
NULL
),
adaptInfo
(
NULL
),
adapt
(
NULL
),
matrixOperator
(
NULL
),
rhsOperator
(
NULL
)
{}
Bunnydemo
::~
Bunnydemo
()
{
if
(
ballCenter
!=
NULL
)
delete
ballCenter
;
if
(
adaptInfo
!=
NULL
)
delete
adaptInfo
;
if
(
adapt
!=
NULL
)
delete
adapt
;
if
(
matrixOperator
!=
NULL
)
delete
matrixOperator
;
if
(
rhsOperator
!=
NULL
)
delete
rhsOperator
;
}
void
Bunnydemo
::
create
(
string
filename
)
{
// ===== init parameters =====
Parameters
::
init
(
false
,
filename
);
// ===== create projection =====
ballCenter
=
new
WorldVector
<
double
>
();
ballCenter
->
set
(
0.0
);
new
BallProject
(
1
,
VOLUME_PROJECTION
,
*
ballCenter
,
1.0
);
// ===== create and init the scalar problem =====
bunny
.
initialize
(
INIT_ALL
);
// === create adapt info ===
adaptInfo
=
new
AdaptInfo
(
"bunny->adapt"
);
// === create adapt ===
adapt
=
new
AdaptStationary
(
"bunny->adapt"
,
&
bunny
,
adaptInfo
);
// ===== create matrix operator =====
matrixOperator
=
new
Operator
(
bunny
.
getFeSpace
());
matrixOperator
->
addSecondOrderTerm
(
new
Laplace_SOT
);
bunny
.
addMatrixOperator
(
matrixOperator
);
// ===== create rhs operator =====
rhsOperator
=
new
Operator
(
bunny
.
getFeSpace
());
int
degree
=
bunny
.
getFeSpace
()
->
getBasisFcts
()
->
getDegree
();
rhsOperator
->
addZeroOrderTerm
(
new
CoordsAtQP_ZOT
(
new
F
(
degree
)));
bunny
.
addVectorOperator
(
rhsOperator
);
}
int
Bunnydemo
::
solve
(
SolutionInformation
&
info
)
{
int
retCode
=
adapt
->
adapt
();
info
.
dofVec
=
bunny
.
getSolution
();
return
retCode
;
}
void
createProjectList
(
ProjectList
&
list
)
{
}
AMDiS/test/datacreation/src/BunnyProject.h
0 → 100644
View file @
8a79f686
#ifndef BUNNYPROJECT_H
#define BUNNYPROJECT_H
#include "Project.h"
#include "FixVec.h"
#include "ProblemScal.h"
class
Bunnydemo
:
public
Project
{
ProblemScal
bunny
;
WorldVector
<
double
>*
ballCenter
;
AdaptInfo
*
adaptInfo
;
AdaptStationary
*
adapt
;
Operator
*
matrixOperator
;
Operator
*
rhsOperator
;
public:
Bunnydemo
();
~
Bunnydemo
();
void
create
(
string
filename
);
int
solve
(
SolutionInformation
&
);
};
#endif
AMDiS/test/datacreation/src/ElliptProject.cpp
0 → 100644
View file @
8a79f686
#include "ElliptProject.h"
#include "AdaptStationary.h"
/// Dirichlet boundary function
class
G
:
public
AbstractFunction
<
double
,
WorldVector
<
double
>
>
{
public:
/// Implementation of AbstractFunction::operator().
double
operator
()(
const
WorldVector
<
double
>&
x
)
const
{
return
exp
(
-
10.0
*
(
x
*
x
));
}
};
/// RHS function
class
F
:
public
AbstractFunction
<
double
,
WorldVector
<
double
>
>
{
public:
F
(
int
degree
)
:
AbstractFunction
<
double
,
WorldVector
<
double
>
>
(
degree
)
{}
/// Implementation of AbstractFunction::operator().
double
operator
()(
const
WorldVector
<
double
>&
x
)
const
{
int
dow
=
x
.
getSize
();
double
r2
=
(
x
*
x
);
double
ux
=
exp
(
-
10.0
*
r2
);
return
-
(
400.0
*
r2
-
20.0
*
dow
)
*
ux
;
}
};
Elliptdemo
::
Elliptdemo
()
:
ellipt
(
"ellipt"
),
adaptInfo
(
NULL
),
adapt
(
NULL
),
matrixOperator
(
NULL
),
rhsOperator
(
NULL
)
{}
Elliptdemo
::~
Elliptdemo
()
{
if
(
matrixOperator
!=
NULL
)
delete
matrixOperator
;
if
(
rhsOperator
!=
NULL
)
delete
rhsOperator
;
if
(
adapt
!=
NULL
)
delete
adapt
;
if
(
adaptInfo
!=
NULL
)
delete
adaptInfo
;
}
void
Elliptdemo
::
create
(
std
::
string
filename
)
{
// ===== init parameters =====
Parameters
::
init
(
true
,
filename
);
// ===== create and init the scalar problem =====
ellipt
.
initialize
(
INIT_ALL
);
// === create adapt info ===
adaptInfo
=
new
AdaptInfo
(
"ellipt->adapt"
);
// === create adapt ===
adapt
=
new
AdaptStationary
(
"ellipt->adapt"
,
&
ellipt
,
adaptInfo
);
// ===== create matrix operator =====
matrixOperator
=
new
Operator
(
ellipt
.
getFeSpace
());
matrixOperator
->
addSecondOrderTerm
(
new
Laplace_SOT
);
ellipt
.
addMatrixOperator
(
matrixOperator
);
// ===== create rhs operator =====
int
degree
=
ellipt
.
getFeSpace
()
->
getBasisFcts
()
->
getDegree
();
rhsOperator
=
new
Operator
(
ellipt
.
getFeSpace
());
rhsOperator
->
addZeroOrderTerm
(
new
CoordsAtQP_ZOT
(
new
F
(
degree
)));
ellipt
.
addVectorOperator
(
rhsOperator
);
// ===== add boundary conditions =====
ellipt
.
addDirichletBC
(
1
,
new
G
);
}
int
Elliptdemo
::
solve
(
SolutionInformation
&
info
)
{
int
retCode
=
adapt
->
adapt
();
info
.
dofVec
=
ellipt
.
getSolution
();
return
retCode
;
}
void
createProjectList
(
ProjectList
&
list
)
{
}
AMDiS/test/datacreation/src/ElliptProject.h
0 → 100644
View file @
8a79f686
#ifndef ELLIPTPROJECT_H
#define ELLIPTPROJECT_H
#include "Project.h"
#include "ProblemScal.h"
class
Elliptdemo
:
public
Project
{
ProblemScal
ellipt
;
AdaptInfo
*
adaptInfo
;
AdaptStationary
*
adapt
;
Operator
*
matrixOperator
;
Operator
*
rhsOperator
;
public:
Elliptdemo
();
~
Elliptdemo
();
void
create
(
std
::
string
filename
);
int
solve
(
SolutionInformation
&
info
);
};
#endif
AMDiS/test/datacreation/src/HeatProject.cpp
0 → 100644
View file @
8a79f686
#include "HeatProject.h"
#include "TimedObject.h"
/// Dirichlet boundary function
class
G
:
public
AbstractFunction
<
double
,
WorldVector
<
double
>
>
,
public
TimedObject
{
public:
/// Implementation of AbstractFunction::operator().
double
operator
()(
const
WorldVector
<
double
>&
x
)
const
{
return
sin
(
M_PI
*
(
*
timePtr
))
*
exp
(
-
10.0
*
(
x
*
x
));
}
};
/// RHS function
class
F
:
public
AbstractFunction
<
double
,
WorldVector
<
double
>
>
,
public
TimedObject
{
public:
F
(
int
degree
)
:
AbstractFunction
<
double
,
WorldVector
<
double
>
>
(
degree
)
{}
/// Implementation of AbstractFunction::operator().
double
operator
()(
const
WorldVector
<
double
>&
x
)
const
{
int
dim
=
x
.
getSize
();
double
r2
=
x
*
x
;
double
ux
=
sin
(
M_PI
*
(
*
timePtr
))
*
exp
(
-
10.0
*
r2
);
double
ut
=
M_PI
*
cos
(
M_PI
*
(
*
timePtr
))
*
exp
(
-
10.0
*
r2
);
return
ut
-
(
400.0
*
r2
-
20.0
*
dim
)
*
ux
;
}
};
Heatdemo
::
Heatdemo
()
:
heatSpace
(
"heat->space"
),
heat
(
heatSpace
),
adaptInfo
(
NULL
),
adaptInfoInitial
(
NULL
),
A
(
NULL
),
C
(
NULL
),
Fop
(
NULL
)
{}
Heatdemo
::~
Heatdemo
()
{
if
(
adaptInfo
!=
NULL
)
delete
adaptInfo
;
if
(
adaptInfoInitial
!=
NULL
)
delete
adaptInfoInitial
;
if
(
A
!=
NULL
)
delete
A
;
if
(
C
!=
NULL
)
delete
C
;
if
(
Fop
!=
NULL
)
delete
Fop
;
}
void
Heatdemo
::
create
(
string
filename
)
{
// ===== init parameters =====
Parameters
::
init
(
false
,
filename
);
// Parameters::readArgv(argc, argv);
// ===== create and init stationary problem =====
heatSpace
.
initialize
(
INIT_ALL
);
// ===== create instationary problem =====
heat
.
initialize
(
INIT_ALL
);
// create adapt info
adaptInfo
=
new
AdaptInfo
(
"heat->adapt"
);
// create initial adapt info
adaptInfoInitial
=
new
AdaptInfo
(
"heat->initial->adapt"
);
// create instationary adapt
adaptInstat
=
new
AdaptInstationary
(
"heat->adapt"
,
&
heatSpace
,
adaptInfo
,
&
heat
,
adaptInfoInitial
);
// ===== create rhs functions =====
int
degree
=
heatSpace
.
getFeSpace
()
->
getBasisFcts
()
->
getDegree
();
F
*
rhsFct
=
new
F
(
degree
);
rhsFct
->
setTimePtr
(
heat
.
getRHSTimePtr
());
// ===== create operators =====
double
one
=
1.0
;
double
zero
=
0.0
;
// create laplace
A
=
new
Operator
(
heatSpace
.
getFeSpace
());
A
->
addSecondOrderTerm
(
new
Laplace_SOT
);
A
->
setUhOld
(
heat
.
getOldSolution
());
if
(
*
(
heat
.
getThetaPtr
())
!=
0.0
)
heatSpace
.
addMatrixOperator
(
A
,
heat
.
getThetaPtr
(),
&
one
);
if
(
*
(
heat
.
getTheta1Ptr
())
!=
0.0
)
heatSpace
.
addVectorOperator
(
A
,
heat
.
getTheta1Ptr
(),
&
zero
);
// create zero order operator
C
=
new
Operator
(
heatSpace
.
getFeSpace
());
C
->
addZeroOrderTerm
(
new
Simple_ZOT
);
C
->
setUhOld
(
heat
.
getOldSolution
());
heatSpace
.
addMatrixOperator
(
C
,
heat
.
getTau1Ptr
(),
heat
.
getTau1Ptr
());
heatSpace
.
addVectorOperator
(
C
,
heat
.
getTau1Ptr
(),
heat
.
getTau1Ptr
());
// create RHS operator
Fop
=
new
Operator
(
heatSpace
.
getFeSpace
());
Fop
->
addZeroOrderTerm
(
new
CoordsAtQP_ZOT
(
rhsFct
));
heatSpace
.
addVectorOperator
(
Fop
);
// ===== create boundary functions =====
G
*
boundaryFct
=
new
G
;
boundaryFct
->
setTimePtr
(
heat
.
getBoundaryTimePtr
());
heat
.
setExactSolution
(
boundaryFct
);
}
int
Heatdemo
::
solve
(
SolutionInformation
&
info
)
{
int
retCode
=
adaptInstat
->
adapt
();
info
.
dofVec
=
heatSpace
.
getSolution
();
return
retCode
;
}
void
createProjectList
(
ProjectList
&
list
)
{
}
AMDiS/test/datacreation/src/HeatProject.h
0 → 100644
View file @
8a79f686
#ifndef HEATPROJECT_H
#define HEATPROJECT_H
#include "Project.h"
#include "ProblemScal.h"
#include "ProblemInstat.h"
#include "HeatProject.hh"
class
Heatdemo
:
public
Project
{
ProblemScal
heatSpace
;
Heat
heat
;
AdaptInfo
*
adaptInfo
;
AdaptInfo
*
adaptInfoInitial
;
AdaptInstationary
*
adaptInstat
;
Operator
*
A
;
Operator
*
C
;
Operator
*
Fop
;
public:
Heatdemo
();
~
Heatdemo
();
void
create
(
string
filename
);
int
solve
(
SolutionInformation
&
info
);
};
#endif
AMDiS/test/datacreation/src/HeatProject.hh
0 → 100644
View file @
8a79f686
// ===========================================================================
// ===== instationary problem ================================================
// ===========================================================================
/// Instationary problem
class
Heat
:
public
ProblemInstatScal
{
public:
Heat
(
ProblemScal
&
heatSpace
)
:
ProblemInstatScal
(
"heat"
,
heatSpace
)
{