Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Backofen, Rainer
amdis
Commits
68fe64e3
Commit
68fe64e3
authored
14 years ago
by
Naumann, Andreas
Browse files
Options
Downloads
Patches
Plain Diff
tried extending the meshtest
parent
3e8be011
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
AMDiS/test/Meshtest/src/Meshtest.cpp
+41
-5
41 additions, 5 deletions
AMDiS/test/Meshtest/src/Meshtest.cpp
AMDiS/test/demoimpl/src/ParametricProject.hh
+1
-1
1 addition, 1 deletion
AMDiS/test/demoimpl/src/ParametricProject.hh
with
42 additions
and
6 deletions
AMDiS/test/Meshtest/src/Meshtest.cpp
+
41
−
5
View file @
68fe64e3
...
...
@@ -3,9 +3,33 @@
#include
"ProblemScal.h"
#include
<sstream>
#include
<string>
#include
<stdexcept>
typedef
std
::
vector
<
std
::
string
>
StringVector
;
template
<
typename
Test
>
void
require
(
Test
l
,
Test
r
,
int
line
,
std
::
string
message
)
{
if
(
l
!=
r
)
{
std
::
stringstream
ss
;
ss
<<
"Condition for "
<<
message
<<
" is wrong
\n
"
;
ss
<<
"l: "
<<
l
<<
"
\n
"
<<
"r: "
<<
r
<<
"
\n
"
;
throw
std
::
runtime_error
(
ss
.
str
());
}
}
template
<
typename
Test
>
void
require
(
Test
l
,
Test
r
,
std
::
string
message
,
StringVector
&
res
)
{
if
(
l
!=
r
)
{
std
::
stringstream
ss
;
ss
<<
"Condition for "
<<
message
<<
" is wrong
\n
"
;
ss
<<
"l: "
<<
l
<<
"
\n
"
<<
"r: "
<<
r
<<
"
\n
"
;
res
.
push_back
(
ss
.
str
());
}
}
using
namespace
AMDiS
;
void
testMesh
(
int
dim
)
{
void
testMesh
(
int
dim
,
int
nrEls
,
int
nrVert
,
StringVector
&
res
)
{
std
::
stringstream
ss
;
ss
<<
dim
;
Parameters
::
addGlobalParameter
(
0
,
"dimension of world"
,
ss
.
str
());
...
...
@@ -15,6 +39,11 @@ void testMesh(int dim) {
ln_dof
[
VERTEX
]
=
1
;
mesh
.
createDOFAdmin
(
"vertex_dofs"
,
ln_dof
);
mesh
.
initialize
();
require
(
mesh
.
getDim
(),
dim
,
__LINE__
,
"mesh dimension"
);
std
::
stringstream
ss2
;
ss2
<<
"
\n
current dimension: "
<<
dim
<<
"
\n
"
;
require
(
mesh
.
getNumberOfElements
()
,
nrEls
,
ss2
.
str
()
+
"number of elements"
,
res
);
require
(
mesh
.
getNumberOfVertices
(),
nrVert
,
ss2
.
str
()
+
"number of vertices"
,
res
);
}
int
main
(
int
argc
,
char
**
argv
)
{
...
...
@@ -23,10 +52,17 @@ int main(int argc, char** argv) {
Parameters
::
addGlobalParameter
(
0
,
"testMesh2->macro file name"
,
"macro/macro.stand.2d"
);
Parameters
::
addGlobalParameter
(
0
,
"testMesh3->macro file name"
,
"macro/macro.stand.3d"
);
testMesh
(
1
);
testMesh
(
2
);
testMesh
(
3
);
StringVector
errorMessages
;
testMesh
(
1
,
1
,
2
,
errorMessages
);
testMesh
(
2
,
4
,
5
,
errorMessages
);
testMesh
(
3
,
6
,
8
,
errorMessages
);
return
0
;
if
(
errorMessages
.
size
()
>
0
)
std
::
cout
<<
" got errors:
\n
"
;
for
(
StringVector
::
size_type
i
=
0
;
i
<
errorMessages
.
size
();
++
i
)
std
::
cout
<<
errorMessages
[
i
]
<<
"
\n
"
;
if
(
errorMessages
.
size
()
!=
0
)
return
1
;
return
0
;
}
This diff is collapsed.
Click to expand it.
AMDiS/test/demoimpl/src/ParametricProject.hh
+
1
−
1
View file @
68fe64e3
...
...
@@ -54,7 +54,7 @@ public:
void
buildBeforeCoarsen
(
AdaptInfo
*
adaptInfo
,
Flag
flag
)
{
FUNCNAME
(
"ParametricSphere::buildAfterCoarsen()"
);
MSG
(
"calculation of parametric coordinates
\n
"
);
int
preDOFs
=
this
->
getFeSpace
()
->
getAdmin
()
->
getNumberOfPreD
OF
s
(
VERTEX
);
int
preDOFs
=
this
->
getFeSpace
()
->
getAdmin
()
->
getNumberOfPreD
of
s
(
VERTEX
);
int
dim
=
this
->
getMesh
()
->
getDim
();
int
dow
=
Global
::
getGeo
(
WORLD
);
WorldVector
<
double
>
vertexCoords
;
...
...
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