Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iwr
amdis
Commits
535ca95d
Commit
535ca95d
authored
Oct 15, 2008
by
Thomas Witkowski
Browse files
* VtkWriter::writeFiles readded :)
parent
1859605c
Changes
8
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/BasisFunction.h
View file @
535ca95d
...
...
@@ -64,9 +64,9 @@ namespace AMDiS {
class
BasFctType
{
public:
BasFctType
()
{}
;
BasFctType
()
{}
virtual
~
BasFctType
()
{}
;
virtual
~
BasFctType
()
{}
virtual
double
operator
()(
const
DimVec
<
double
>&
)
const
=
0
;
};
...
...
@@ -78,9 +78,9 @@ namespace AMDiS {
class
GrdBasFctType
{
public:
GrdBasFctType
()
{}
;
GrdBasFctType
()
{}
virtual
~
GrdBasFctType
()
{}
;
virtual
~
GrdBasFctType
()
{}
virtual
void
operator
()(
const
DimVec
<
double
>&
,
DimVec
<
double
>&
)
const
=
0
;
...
...
@@ -93,9 +93,9 @@ namespace AMDiS {
class
D2BasFctType
{
public:
D2BasFctType
()
{}
;
D2BasFctType
()
{}
virtual
~
D2BasFctType
()
{}
;
virtual
~
D2BasFctType
()
{}
virtual
void
operator
()(
const
DimVec
<
double
>&
,
DimMat
<
double
>&
)
const
=
0
;
...
...
@@ -131,7 +131,7 @@ namespace AMDiS {
/** \brief
* Creates a BasisFunction object of given dim and degree
*/
BasisFunction
(
const
std
::
string
&
name
_
,
int
dim
_
,
int
degree
_
);
BasisFunction
(
const
std
::
string
&
name
,
int
dim
,
int
degree
);
/** \brief
* destructor
...
...
@@ -144,14 +144,14 @@ namespace AMDiS {
*/
virtual
bool
operator
==
(
const
BasisFunction
&
a
)
const
{
return
a
.
getName
()
==
name
;
}
;
}
/** \brief
* Returns !(*this == b)
*/
inline
bool
operator
!=
(
const
BasisFunction
&
b
)
const
{
return
!
(
operator
==
(
b
));
}
;
}
/** \brief
* Used by \ref getDOFIndices and \ref getVec
...
...
@@ -194,28 +194,28 @@ namespace AMDiS {
*/
inline
const
int
getDegree
()
const
{
return
degree
;
}
;
}
/** \brief
* Returns \ref dim of BasisFunction
*/
inline
const
int
getDim
()
const
{
return
dim
;
}
;
}
/** \brief
* Returns \ref nBasFcts which is the number of local basis functions
*/
inline
const
int
getNumber
()
const
{
return
nBasFcts
;
}
;
}
/** \brief
* Returns \ref name of BasisFunction
*/
inline
const
std
::
string
&
getName
()
const
{
return
name
;
}
;
}
/** \brief
* Returns \ref nDOF[i]
...
...
@@ -227,7 +227,7 @@ namespace AMDiS {
*/
inline
DimVec
<
int
>*
getNumberOfDOFs
()
const
{
return
nDOF
;
}
;
}
/** \brief
* Initialisation of the \ref nDOF vector. Must be implemented by sub classes
...
...
AMDiS/src/DOFAdmin.cc
View file @
535ca95d
...
...
@@ -53,9 +53,10 @@ namespace AMDiS {
usedCount
=
src
.
usedCount
;
holeCount
=
src
.
holeCount
;
sizeUsed
=
src
.
sizeUsed
;
for
(
int
i
=
0
;
i
<
4
;
nrDOF
[
i
]
=
src
.
nrDOF
[
i
++
])
{
for
(
int
i
=
0
;
i
<
mesh
->
getDim
();
i
++
)
{
nrDOF
[
i
]
=
src
.
nrDOF
[
i
];
nr0DOF
[
i
]
=
src
.
nr0DOF
[
i
];
}
;
}
dofIndexedList
=
src
.
dofIndexedList
;
dofContainerList
=
src
.
dofContainerList
;
}
...
...
AMDiS/src/FiniteElemSpace.cc
View file @
535ca95d
...
...
@@ -55,12 +55,12 @@ namespace AMDiS {
if
(
&
feSpace
==
this
)
return
*
this
;
if
(
feSpace
.
admin
==
&
(
feSpace
.
mesh
->
getD
OFAdmin
(
0
)))
{
std
::
cout
<<
"JA, SIND GLEICH
\n
"
;
}
else
{
std
::
cout
<<
"NO, NICHT WIRKLICH
\n
"
;
}
ERROR_EXIT
(
"
\n
"
);
mesh
=
NEW
Mesh
(
feSpace
.
mesh
->
getName
(),
feSpace
.
mesh
->
getD
im
());
*
mesh
=
*
(
feSpace
.
mesh
)
;
admin
=
&
(
const_cast
<
DOFAdmin
&>
(
mesh
->
getDOFAdmin
(
0
)));
TEST_EXIT
(
feSpace
.
admin
==
&
(
feSpace
.
mesh
->
getDOFAdmin
(
0
)))
(
"Gut, dass muss ich mir noch mal ueberlegen!
\n
"
);
return
*
this
;
}
...
...
AMDiS/src/Mesh.cc
View file @
535ca95d
...
...
@@ -153,7 +153,7 @@ namespace AMDiS {
admin
.
resize
(
m
.
admin
.
size
());
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
admin
.
size
());
i
++
)
{
admin
[
i
]
=
NEW
DOFAdmin
(
this
);
*
admin
[
i
]
=
*
(
m
.
admin
[
i
]);
*
(
admin
[
i
]
)
=
*
(
m
.
admin
[
i
]);
admin
[
i
]
->
setMesh
(
this
);
}
...
...
AMDiS/src/SolutionDataStorage.h
View file @
535ca95d
...
...
@@ -59,9 +59,13 @@ namespace AMDiS {
bool
pop
(
T
**
solution
,
double
*
timestep
);
/** \brief
*
*/
bool
pop
(
T
**
solution
,
double
*
timestep
,
typename
SolutionHelper
<
T
>::
type
feSpace
);
typename
SolutionHelper
<
T
>::
type
feSpace
,
double
*
timestep
);
/** \brief
* Returns for a given solution number the corresponding fe Space. If the
...
...
AMDiS/src/SolutionDataStorage.hh
View file @
535ca95d
...
...
@@ -92,8 +92,9 @@ namespace AMDiS {
template
<
typename
T
>
bool
SolutionDataStorage
<
T
>::
pop
(
T
**
solution
,
double
*
timestep
,
typename
SolutionHelper
<
T
>::
type
feSpace
)
typename
SolutionHelper
<
T
>::
type
feSpace
,
double
*
timestep
)
{
if
(
!
pop
(
solution
,
timestep
))
return
false
;
...
...
AMDiS/src/VtkWriter.cc
View file @
535ca95d
...
...
@@ -75,5 +75,18 @@ namespace AMDiS {
return
0
;
}
void
VtkWriter
::
writeFile
(
DOFVector
<
double
>
*
values
,
const
char
*
filename
)
{
DataCollector
*
dc
=
NEW
DataCollector
(
values
->
getFESpace
(),
values
);
std
::
vector
<
DataCollector
*>
dcList
(
0
);
dcList
.
push_back
(
dc
);
VtkWriter
*
writer
=
NEW
VtkWriter
(
&
dcList
);
writer
->
writeFile
(
filename
);
DELETE
writer
;
DELETE
dc
;
}
}
AMDiS/src/VtkWriter.h
View file @
535ca95d
...
...
@@ -45,7 +45,7 @@ namespace AMDiS {
{
degree
=
(
*
dataCollector
)[
0
]
->
getFeSpace
()
->
getBasisFcts
()
->
getDegree
();
dim
=
(
*
dataCollector
)[
0
]
->
getMesh
()
->
getDim
();
}
;
}
/** \brief
...
...
@@ -53,6 +53,11 @@ namespace AMDiS {
*/
int
writeFile
(
const
char
*
name
);
/** \brief
* May be used to simply write ParaView files.
*/
static
void
writeFile
(
DOFVector
<
double
>
*
values
,
const
char
*
filename
);
/** \brief
* Set a compressing method for file output.
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment