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
iwr
amdis
Commits
9ec7f607
Commit
9ec7f607
authored
Apr 29, 2009
by
Thomas Witkowski
Browse files
This and that.
parent
fbe10859
Changes
5
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/BoundaryManager.cc
View file @
9ec7f607
...
...
@@ -14,9 +14,8 @@ namespace AMDiS {
localBounds
.
resize
(
omp_get_overall_max_threads
());
dofIndices
.
resize
(
omp_get_overall_max_threads
());
allocatedMemoryLocalBounds
=
feSpace
->
getBasisFcts
()
->
getNumber
();
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
localBounds
.
size
());
i
++
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
localBounds
.
size
());
i
++
)
localBounds
[
i
]
=
GET_MEMORY
(
BoundaryType
,
allocatedMemoryLocalBounds
);
}
}
BoundaryManager
::
BoundaryManager
(
BoundaryManager
&
bm
)
...
...
@@ -25,16 +24,14 @@ namespace AMDiS {
allocatedMemoryLocalBounds
=
bm
.
allocatedMemoryLocalBounds
;
localBounds
.
resize
(
bm
.
localBounds
.
size
());
dofIndices
.
resize
(
bm
.
localBounds
.
size
());
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
localBounds
.
size
());
i
++
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
localBounds
.
size
());
i
++
)
localBounds
[
i
]
=
GET_MEMORY
(
BoundaryType
,
allocatedMemoryLocalBounds
);
}
}
BoundaryManager
::~
BoundaryManager
()
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
localBounds
.
size
());
i
++
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
localBounds
.
size
());
i
++
)
FREE_MEMORY
(
localBounds
[
i
],
BoundaryType
,
allocatedMemoryLocalBounds
);
}
}
double
BoundaryManager
::
boundResidual
(
ElInfo
*
elInfo
,
...
...
AMDiS/src/Lagrange.cc
View file @
9ec7f607
...
...
@@ -919,12 +919,11 @@ namespace AMDiS {
static
int
localVecSize
=
0
;
const
DegreeOfFreedom
**
dof
=
el
->
getDOF
();
const
int
*
indi
;
int
nrDOFs
,
n0
,
node0
,
num
=
0
;
GeoIndex
posIndex
;
DegreeOfFreedom
*
result
;
if
(
indices
)
{
result
=
indices
;
}
else
{
...
...
@@ -934,7 +933,7 @@ namespace AMDiS {
localVecSize
=
nBasFcts
;
result
=
localVec
;
}
for
(
int
pos
=
0
,
j
=
0
;
pos
<=
dim
;
pos
++
)
{
posIndex
=
INDEX_OF_DIM
(
pos
,
dim
);
nrDOFs
=
admin
->
getNumberOfDOFs
(
posIndex
);
...
...
@@ -945,7 +944,7 @@ namespace AMDiS {
num
=
Global
::
getGeo
(
posIndex
,
dim
);
for
(
int
i
=
0
;
i
<
num
;
node0
++
,
i
++
)
{
indi
=
orderOfPositionIndices
(
el
,
posIndex
,
i
);
const
int
*
indi
=
orderOfPositionIndices
(
el
,
posIndex
,
i
);
for
(
int
k
=
0
;
k
<
nrDOFs
;
k
++
)
{
result
[
j
++
]
=
dof
[
node0
][
n0
+
indi
[
k
]];
...
...
AMDiS/src/PeriodicBC.cc
View file @
9ec7f607
...
...
@@ -131,10 +131,10 @@ namespace AMDiS {
const
BoundaryType
*
localBound
,
int
nBasFcts
)
{
if
(
matrix
==
masterMatrix_
)
{
if
(
matrix
==
masterMatrix_
)
{
int
dim
=
rowFESpace
->
getMesh
()
->
getDim
();
if
(
dim
>
1
)
{
if
(
dim
>
1
)
{
int
i
,
j
;
DOFAdmin
*
admin
=
rowFESpace
->
getAdmin
();
...
...
@@ -153,11 +153,11 @@ namespace AMDiS {
GeoIndex
sideGeoIndex
=
INDEX_OF_DIM
(
dim
-
1
,
dim
);
for
(
side
=
0
;
side
<
dim
+
1
;
side
++
)
{
for
(
side
=
0
;
side
<
dim
+
1
;
side
++
)
{
if
(
elInfo
->
getBoundary
(
sideGeoIndex
,
side
)
==
boundaryType
)
{
if
(
elInfo
->
getBoundary
(
sideGeoIndex
,
side
)
==
boundaryType
)
{
for
(
vertex
=
0
;
vertex
<
dim
;
vertex
++
)
{
for
(
vertex
=
0
;
vertex
<
dim
;
vertex
++
)
{
index
=
element
->
getVertexOfPosition
(
sideGeoIndex
,
side
,
vertex
);
...
...
@@ -165,7 +165,6 @@ namespace AMDiS {
}
Element
*
neigh
=
elInfo
->
getNeighbour
(
side
);
basFcts
->
getLocalIndices
(
neigh
,
admin
,
neighIndices_
);
int
oppVertex
=
0
;
...
...
AMDiS/src/ProblemScal.cc
View file @
9ec7f607
...
...
@@ -545,15 +545,6 @@ namespace AMDiS {
MSG
(
"%d DOFs for %s
\n
"
,
feSpace
->
getAdmin
()
->
getUsedDOFs
(),
feSpace
->
getName
().
c_str
());
Flag
assembleFlag
=
flag
|
systemMatrix
->
getAssembleFlag
()
|
rhs
->
getAssembleFlag
();
if
(
useGetBound
)
assembleFlag
|=
Mesh
::
FILL_BOUND
;
// systemMatrix->clear();
rhs
->
set
(
0.0
);
DOFMatrix
::
base_matrix_type
&
base_matrix
=
systemMatrix
->
getBaseMatrix
();
...
...
@@ -581,7 +572,12 @@ namespace AMDiS {
BoundaryType
*
bound
;
TraverseStack
stack
;
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
assembleFlag
);
ElInfo
*
elInfo
=
stack
.
traverseFirst
(
mesh
,
-
1
,
Mesh
::
CALL_LEAF_EL
|
Mesh
::
FILL_BOUND
|
Mesh
::
FILL_COORDS
|
Mesh
::
FILL_DET
|
Mesh
::
FILL_GRD_LAMBDA
|
Mesh
::
FILL_NEIGH
);
while
(
elInfo
)
{
if
(
useGetBound
)
{
...
...
AMDiS/src/StandardProblemIteration.cc
View file @
9ec7f607
...
...
@@ -56,31 +56,25 @@ namespace AMDiS {
markFlag
=
3
;
}
if
(
toDo
.
isSet
(
BUILD
))
{
if
(
toDo
.
isSet
(
BUILD
))
problem_
->
buildBeforeRefine
(
adaptInfo
,
markFlag
);
}
// refine
if
(
toDo
.
isSet
(
ADAPT
)
&&
markFlag
.
isSet
(
MESH_REFINED
))
{
if
(
toDo
.
isSet
(
ADAPT
)
&&
markFlag
.
isSet
(
MESH_REFINED
))
flag
=
problem_
->
refineMesh
(
adaptInfo
);
}
if
(
toDo
.
isSet
(
BUILD
))
{
if
(
toDo
.
isSet
(
BUILD
))
problem_
->
buildBeforeCoarsen
(
adaptInfo
,
markFlag
);
}
// coarsen
if
(
toDo
.
isSet
(
ADAPT
)
&&
markFlag
.
isSet
(
MESH_COARSENED
))
{
if
(
toDo
.
isSet
(
ADAPT
)
&&
markFlag
.
isSet
(
MESH_COARSENED
))
flag
|=
problem_
->
coarsenMesh
(
adaptInfo
);
}
if
(
toDo
.
isSet
(
BUILD
))
{
if
(
toDo
.
isSet
(
BUILD
))
problem_
->
buildAfterCoarsen
(
adaptInfo
,
markFlag
,
true
,
true
);
}
if
(
toDo
.
isSet
(
BUILD_RHS
))
{
if
(
toDo
.
isSet
(
BUILD_RHS
))
problem_
->
buildAfterCoarsen
(
adaptInfo
,
markFlag
,
false
,
true
);
}
return
flag
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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