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
cdf68971
Commit
cdf68971
authored
May 27, 2009
by
Thomas Witkowski
Browse files
Removed *_MEMORY macros in cFEM
parent
030e4563
Changes
1
Hide whitespace changes
Inline
Side-by-side
AMDiS/compositeFEM/src/CompositeFEMMethods.cc
View file @
cdf68971
...
...
@@ -11,10 +11,9 @@
#include "CompositeFEMMethods.h"
void
CompositeFEMMethods
::
setPosLsToVal
(
DOFVector
<
double
>
*
dof
,
const
double
&
val
,
const
DOFVector
<
double
>
*
lsFct_dof
)
void
CompositeFEMMethods
::
setPosLsToVal
(
DOFVector
<
double
>
*
dof
,
const
double
&
val
,
const
DOFVector
<
double
>
*
lsFct_dof
)
{
DOFVector
<
double
>::
Iterator
it_dof
(
dof
,
USED_DOFS
);
DOFVector
<
double
>::
Iterator
it_lsFct_dof
(
...
...
@@ -25,17 +24,14 @@ CompositeFEMMethods::setPosLsToVal(DOFVector<double> *dof,
++
it_dof
,
++
it_lsFct_dof
)
{
// Is vertex in domain with positive level set function values ?
if
(
*
it_lsFct_dof
>
0
)
{
if
(
*
it_lsFct_dof
>
0
)
*
it_dof
=
val
;
}
}
}
void
CompositeFEMMethods
::
setPosLsToFct
(
DOFVector
<
double
>
*
dof
,
const
AbstractFunction
<
double
,
WorldVector
<
double
>
>
*
fct
,
const
DOFVector
<
double
>
*
lsFct_dof
)
void
CompositeFEMMethods
::
setPosLsToFct
(
DOFVector
<
double
>
*
dof
,
const
AbstractFunction
<
double
,
WorldVector
<
double
>
>
*
fct
,
const
DOFVector
<
double
>
*
lsFct_dof
)
{
const
BasisFunction
*
basisFcts
=
dof
->
getFESpace
()
->
getBasisFcts
();
const
DOFAdmin
*
admin
=
dof
->
getFESpace
()
->
getAdmin
();
...
...
@@ -61,19 +57,17 @@ CompositeFEMMethods::setPosLsToFct(
for
(
int
i
=
0
;
i
<=
dim
;
++
i
)
{
// Is vertex in domain with positive level set function values ?
if
(
locVec
[
i
]
>
0
)
{
if
(
locVec
[
i
]
>
0
)
(
*
dof
)[
locInd
[
i
]]
=
(
*
fct
)(
elInfo
->
getCoord
(
i
));
}
}
elInfo
=
stack
.
traverseNext
(
elInfo
);
}
}
void
CompositeFEMMethods
::
printBoundaryElements
(
const
std
::
string
fn_str
,
ElementLevelSet
*
elLS
,
FiniteElemSpace
*
feSpace
)
void
CompositeFEMMethods
::
printBoundaryElements
(
const
std
::
string
fn_str
,
ElementLevelSet
*
elLS
,
FiniteElemSpace
*
feSpace
)
{
FUNCNAME
(
"CompositeFEMMethods::printBoundaryElements()"
);
...
...
@@ -92,14 +86,14 @@ CompositeFEMMethods::printBoundaryElements(const std::string fn_str,
WorldVector
<
double
>
coord
;
const
int
nBasFcts
=
feSpace
->
getBasisFcts
()
->
getNumber
();
DegreeOfFreedom
*
locInd
=
GET_MEMORY
(
DegreeOfFreedom
,
nBasFcts
)
;
DegreeOfFreedom
*
locInd
=
new
DegreeOfFreedom
[
nBasFcts
]
;
ElInfo
*
loc_elInfo
=
stack
.
traverseFirst
(
feSpace
->
getMesh
(),
-
1
,
Mesh
::
CALL_LEAF_EL
|
Mesh
::
FILL_BOUND
|
Mesh
::
FILL_COORDS
);
while
(
loc_elInfo
)
{
while
(
loc_elInfo
)
{
// Get local indices of vertices.
feSpace
->
getBasisFcts
()
->
getLocalIndices
(
...
...
@@ -137,7 +131,7 @@ CompositeFEMMethods::printBoundaryElements(const std::string fn_str,
}
// end of: mesh traverse
FREE_MEMORY
(
locInd
,
DegreeOfFreedom
,
nBasFcts
)
;
delete
[]
locInd
;
boundaryOut
<<
"
\n
Number of boundary elements:
\t
"
<<
boundEl_cntr
<<
"
\n
"
;
...
...
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