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
d27ffdee
Commit
d27ffdee
authored
15 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
TimeObject added.
parent
b5effb66
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
AMDiS/src/AMDiS.h
+1
-0
1 addition, 0 deletions
AMDiS/src/AMDiS.h
AMDiS/src/DOFMatrix.h
+22
-5
22 additions, 5 deletions
AMDiS/src/DOFMatrix.h
AMDiS/src/PeriodicBC.cc
+11
-6
11 additions, 6 deletions
AMDiS/src/PeriodicBC.cc
AMDiS/src/TimedObject.h
+63
-0
63 additions, 0 deletions
AMDiS/src/TimedObject.h
with
97 additions
and
11 deletions
AMDiS/src/AMDiS.h
+
1
−
0
View file @
d27ffdee
...
...
@@ -84,6 +84,7 @@
#include
"SystemVector.h"
#include
"TecPlotWriter.h"
#include
"Tetrahedron.h"
#include
"TimedObject.h"
#include
"Traverse.h"
#include
"Triangle.h"
#include
"ValueWriter.h"
...
...
This diff is collapsed.
Click to expand it.
AMDiS/src/DOFMatrix.h
+
22
−
5
View file @
d27ffdee
...
...
@@ -32,7 +32,6 @@
#include
"Flag.h"
#include
"RCNeighbourList.h"
#include
"DOFAdmin.h"
#include
"DOFIterator.h"
#include
"DOFIndexed.h"
#include
"Boundary.h"
#include
"Serializable.h"
...
...
@@ -99,12 +98,30 @@ namespace AMDiS {
}
// Only to get rid of the abstract functions, I hope they are not used
std
::
vector
<
bool
>::
iterator
begin
()
{
ERROR_EXIT
(
"Shouldn't be used, only fake."
);
std
::
vector
<
bool
>
v
;
return
v
.
begin
();}
std
::
vector
<
bool
>::
iterator
end
()
{
ERROR_EXIT
(
"Shouldn't be used, only fake."
);
std
::
vector
<
bool
>
v
;
return
v
.
end
();}
std
::
vector
<
bool
>::
iterator
begin
()
{
ERROR_EXIT
(
"Shouldn't be used, only fake."
);
std
::
vector
<
bool
>
v
;
return
v
.
begin
();
}
std
::
vector
<
bool
>::
iterator
end
()
{
ERROR_EXIT
(
"Shouldn't be used, only fake."
);
std
::
vector
<
bool
>
v
;
return
v
.
end
();
}
bool
dummy
;
// Must be deleted later
bool
&
operator
[](
int
i
)
{
ERROR_EXIT
(
"Shouldn't be used, only fake."
);
return
dummy
;}
const
bool
&
operator
[](
int
i
)
const
{
ERROR_EXIT
(
"Shouldn't be used, only fake."
);
return
dummy
;}
bool
&
operator
[](
int
i
)
{
ERROR_EXIT
(
"Shouldn't be used, only fake."
);
return
dummy
;
}
const
bool
&
operator
[](
int
i
)
const
{
ERROR_EXIT
(
"Shouldn't be used, only fake."
);
return
dummy
;
}
/// DOFMatrix does not need to be compressed before assembling, when using MTL4.
void
compressDOFIndexed
(
int
first
,
int
last
,
std
::
vector
<
DegreeOfFreedom
>
&
newDOF
)
{}
...
...
This diff is collapsed.
Click to expand it.
AMDiS/src/PeriodicBC.cc
+
11
−
6
View file @
d27ffdee
...
...
@@ -205,15 +205,20 @@ namespace AMDiS {
masterMatrix_
=
NULL
;
}
matrix
->
print
();
using
namespace
mtl
;
std
::
cout
<<
"ASSOC = "
<<
std
::
endl
;
for
(
int
i
=
0
;
i
<
10
;
i
++
)
std
::
cout
<<
i
<<
" = "
<<
(
*
associated
)[
i
]
<<
std
::
endl
;
DOFAdmin
*
admin
=
rowFESpace
->
getAdmin
();
std
::
vector
<
int
>
dofMap
(
admin
->
getUsedSize
());
for
(
int
i
=
0
;
i
<
admin
->
getUsedSize
();
i
++
)
{
dofMap
[
i
]
=
(
*
associated
)[
i
];
std
::
cout
<<
"map "
<<
i
<<
" to "
<<
dofMap
[
i
]
<<
std
::
endl
;
}
// Compute reorder matrix (newRow and newCol yields transposed!!!)
matrix
::
traits
::
reorder
<>::
type
R
=
matrix
::
reorder
(
*
associated
);
DOFMatrix
::
base_matrix_type
&
A
=
matrix
->
getBaseMatrix
(),
B
,
D
,
E
,
TR
;
matrix
::
traits
::
reorder
<>::
type
R
=
matrix
::
reorder
(
dofMap
);
DOFMatrix
::
base_matrix_type
&
A
=
matrix
->
getBaseMatrix
(),
B
,
D
,
E
,
TR
;
A
*=
0.5
;
// Half of entries with decreased row index + half of the strict lower origing
...
...
@@ -225,7 +230,7 @@ namespace AMDiS {
D
=
bands
(
TR
,
0
,
1
);
E
=
A
*
strict_lower
(
R
)
+
lower
(
A
);
B
+=
D
*
E
;
swap
(
A
,
B
);
swap
(
A
,
B
);
}
void
PeriodicBC
::
exitVector
(
DOFVectorBase
<
double
>*
vector
)
...
...
This diff is collapsed.
Click to expand it.
AMDiS/src/TimedObject.h
0 → 100644
+
63
−
0
View file @
d27ffdee
// ============================================================================
// == ==
// == AMDiS - Adaptive multidimensional simulations ==
// == ==
// ============================================================================
// == ==
// == crystal growth group ==
// == ==
// == Stiftung caesar ==
// == Ludwig-Erhard-Allee 2 ==
// == 53175 Bonn ==
// == germany ==
// == ==
// ============================================================================
// == ==
// == http://www.caesar.de/cg/AMDiS ==
// == ==
// ============================================================================
/** \file TimedObject.h */
#ifndef AMDIS_TIMEDOBJECT_H
#define AMDIS_TIMEDOBJECT_H
namespace
AMDiS
{
// ===========================================================================
// ===== class TimedObject ===================================================
// ===========================================================================
/** \brief
* This class can be used as base class for time dependent objects where
* different objects refer to the same time. Herefore a pointer to
* a double value is stored, pointing to a time value, which can be
* managed in one central object, maybe the problem class.
*/
class
TimedObject
{
public:
/** \brief
* Constructor.
*/
TimedObject
()
:
timePtr
(
NULL
)
{};
/** \brief
* Sets the time pointer.
*/
inline
void
setTimePtr
(
double
*
timePtr_
)
{
timePtr
=
timePtr_
;
};
/** \brief
* Returns the time pointer.
*/
inline
double
*
getTimePtr
()
{
return
timePtr
;
};
protected
:
/** \brief
* Pointer to the externally managed time value.
*/
double
*
timePtr
;
};
}
#endif // AMDIS_TIMEDOBJECT_H
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