Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
f2142a3b
Commit
f2142a3b
authored
Nov 02, 2012
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
And updated extensions due to new function signature of Mesh::getDofIndexCoords()
parent
d9e38a34
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
16 deletions
+20
-16
extensions/BackgroundMesh.cc
extensions/BackgroundMesh.cc
+1
-1
extensions/Helpers.cc
extensions/Helpers.cc
+2
-2
extensions/SingularDirichletBC.h
extensions/SingularDirichletBC.h
+16
-12
extensions/VtuReader.hh
extensions/VtuReader.hh
+1
-1
No files found.
extensions/BackgroundMesh.cc
View file @
f2142a3b
...
...
@@ -30,7 +30,7 @@ namespace experimental {
{
DOFVector
<
WorldVector
<
double
>
>
coords
(
feSpace
,
"coords"
);
feSpace
->
getMesh
()
->
dofCompress
();
feSpace
->
getMesh
()
->
getDofIndexCoords
(
feSpace
,
coords
);
feSpace
->
getMesh
()
->
getDofIndexCoords
(
coords
);
for
(
DegreeOfFreedom
i
=
0
;
i
<
coords
.
getUsedSize
();
i
++
)
{
PointType
location
(
coords
[
i
]);
...
...
extensions/Helpers.cc
View file @
f2142a3b
...
...
@@ -280,7 +280,7 @@ void getNormals(FiniteElemSpace *feSpace, DOFVector<WorldVector<double> > *norma
}
DOFVector
<
WorldVector
<
double
>
>
coordsDOF
(
feSpace
,
"coords"
);
mesh
->
getDofIndexCoords
(
feSpace
,
coordsDOF
);
mesh
->
getDofIndexCoords
(
coordsDOF
);
Helpers
::
getNormalsWeighted
(
feSpace
,
normals
);
VtkWriter
::
writeFile
(
normals
,
"normals_weighted.vtu"
);
...
...
@@ -473,4 +473,4 @@ void plot(std::vector<double> &values, int numRows, int numCols, std::string sym
std
::
cout
<<
lines
[
i
]
<<
std
::
endl
;
}
}
// end namespace Helpers
\ No newline at end of file
}
// end namespace Helpers
extensions/SingularDirichletBC.h
View file @
f2142a3b
...
...
@@ -197,7 +197,7 @@ namespace details {
association
.
clear
();
DOFVector
<
WorldVector
<
double
>
>
coords
(
feSpace
,
"coords"
);
feSpace
->
getMesh
()
->
getDofIndexCoords
(
feSpace
,
coords
);
feSpace
->
getMesh
()
->
getDofIndexCoords
(
coords
);
for
(
size_t
i
=
0
;
i
<
indices
.
size
();
i
++
)
{
DegreeOfFreedom
idx2
;
...
...
@@ -216,9 +216,9 @@ namespace details {
* the 'periodicMap' associates a second DegreeOfFreedom.
**/
inline
void
getPeriodicAssociation
(
const
FiniteElemSpace
*
feSpace
,
AbstractFunction
<
bool
,
WorldVector
<
double
>
>*
meshIndicator
,
AbstractFunction
<
WorldVector
<
double
>
,
WorldVector
<
double
>
>*
periodicMap
,
std
::
vector
<
std
::
pair
<
DegreeOfFreedom
,
DegreeOfFreedom
>
>
&
association
)
AbstractFunction
<
bool
,
WorldVector
<
double
>
>*
meshIndicator
,
AbstractFunction
<
WorldVector
<
double
>
,
WorldVector
<
double
>
>*
periodicMap
,
std
::
vector
<
std
::
pair
<
DegreeOfFreedom
,
DegreeOfFreedom
>
>
&
association
)
{
std
::
vector
<
DegreeOfFreedom
>
indices
;
details
::
getBoundaryIndices
(
feSpace
,
meshIndicator
,
indices
);
...
...
@@ -226,7 +226,7 @@ namespace details {
association
.
clear
();
DOFVector
<
WorldVector
<
double
>
>
coords
(
feSpace
,
"coords"
);
feSpace
->
getMesh
()
->
getDofIndexCoords
(
feSpace
,
coords
);
feSpace
->
getMesh
()
->
getDofIndexCoords
(
coords
);
for
(
size_t
i
=
0
;
i
<
indices
.
size
();
i
++
)
{
DegreeOfFreedom
idx2
;
...
...
@@ -238,7 +238,10 @@ namespace details {
}
}
inline
void
getDOFValues
(
const
FiniteElemSpace
*
feSpace
,
AbstractFunction
<
double
,
WorldVector
<
double
>
>*
values
,
std
::
vector
<
DegreeOfFreedom
>
&
indices
,
std
::
vector
<
double
>
&
dofValues
)
inline
void
getDOFValues
(
const
FiniteElemSpace
*
feSpace
,
AbstractFunction
<
double
,
WorldVector
<
double
>
>*
values
,
std
::
vector
<
DegreeOfFreedom
>
&
indices
,
std
::
vector
<
double
>
&
dofValues
)
{
WorldVector
<
double
>
x
;
for
(
size_t
i
=
0
;
i
<
indices
.
size
();
i
++
)
{
...
...
@@ -247,11 +250,13 @@ namespace details {
}
}
inline
void
getDOFValues
(
const
FiniteElemSpace
*
feSpace
,
DOFVector
<
double
>*
values
,
std
::
vector
<
DegreeOfFreedom
>
&
indices
,
std
::
vector
<
double
>
&
dofValues
)
inline
void
getDOFValues
(
const
FiniteElemSpace
*
feSpace
,
DOFVector
<
double
>*
values
,
std
::
vector
<
DegreeOfFreedom
>
&
indices
,
std
::
vector
<
double
>
&
dofValues
)
{
for
(
size_t
i
=
0
;
i
<
indices
.
size
();
i
++
)
{
for
(
size_t
i
=
0
;
i
<
indices
.
size
();
i
++
)
dofValues
.
push_back
((
*
values
)[
indices
[
i
]]);
}
}
}
// end namespace
...
...
@@ -433,12 +438,11 @@ struct DirichletBcData {
}
DOFVector
<
WorldVector
<
double
>
>
coords
(
feSpace
,
"coords"
);
feSpace
->
getMesh
()
->
getDofIndexCoords
(
feSpace
,
coords
);
feSpace
->
getMesh
()
->
getDofIndexCoords
(
coords
);
for
(
size_t
i
=
0
;
i
<
indices_
.
size
();
i
++
)
{
for
(
size_t
i
=
0
;
i
<
indices_
.
size
();
i
++
)
list
.
push_back
(
SingularDirichletBC
(
row
,
col
,
indices_
[
i
],
values_
[
i
]));
}
MSG_DBG
(
"Dirichle BC at %d DOFs added.
\n
"
,
indices_
.
size
());
}
...
...
extensions/VtuReader.hh
View file @
f2142a3b
...
...
@@ -93,7 +93,7 @@ namespace AMDiS {
}
DOFVector
<
WorldVector
<
double
>
>
coords
(
dofVectors
[
0
]
->
getFeSpace
(),
"coords"
);
dofVectors
[
0
]
->
getFeSpace
()
->
getMesh
()
->
getDofIndexCoords
(
dofVectors
[
0
]
->
getFeSpace
(),
coords
);
dofVectors
[
0
]
->
getFeSpace
()
->
getMesh
()
->
getDofIndexCoords
(
coords
);
experimental
::
KD_Tree
tree
(
Global
::
getGeo
(
WORLD
),
pointList
,
10
);
tree
.
index
->
buildIndex
();
...
...
Write
Preview
Markdown
is supported
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