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
Snippets
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
iwr
amdis
Commits
dbb50889
Commit
dbb50889
authored
12 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
signed dist functors and some other things
parent
880c8d64
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
extensions/SignedDistFunctors.h
+1
-0
1 addition, 0 deletions
extensions/SignedDistFunctors.h
extensions/VtuReader.h
+1
-28
1 addition, 28 deletions
extensions/VtuReader.h
extensions/kdtree_nanoflann_mesh.h
+19
-7
19 additions, 7 deletions
extensions/kdtree_nanoflann_mesh.h
with
21 additions
and
35 deletions
extensions/SignedDistFunctors.h
+
1
−
0
View file @
dbb50889
...
...
@@ -5,6 +5,7 @@
#include
"VectorOperations.h"
#include
"GeometryTools.h"
#include
"Views.h"
using
namespace
std
;
using
namespace
AMDiS
;
...
...
This diff is collapsed.
Click to expand it.
extensions/VtuReader.h
+
1
−
28
View file @
dbb50889
...
...
@@ -29,6 +29,7 @@
#include
"boost/filesystem.hpp"
#include
"pugixml.hpp"
#include
"kdtree_nanoflann.h"
#include
"VectorOperations.h"
namespace
AMDiS
{
...
...
@@ -51,34 +52,6 @@ namespace AMDiS {
namespace
details
{
// num_rows for scalar types
template
<
typename
T
>
size_t
num_rows
(
T
&
v
)
{
return
1
;
};
// for WorldVectors print 3 components
template
<
typename
T
>
size_t
num_rows
(
WorldVector
<
T
>
&
v
)
{
return
static_cast
<
size_t
>
(
v
.
getSize
());
}
// num_rows for vector types
template
<
typename
T
>
size_t
num_rows
(
std
::
vector
<
T
>
&
v
)
{
return
v
.
size
();
};
template
<
typename
T
>
size_t
num_rows
(
const
std
::
vector
<
T
>
&
v
)
{
return
v
.
size
();
};
template
<
typename
T
>
size_t
num_rows
(
mtl
::
dense_vector
<
T
>
&
v
)
{
return
mtl
::
num_rows
(
v
);
};
template
<
typename
T
>
size_t
num_rows
(
const
mtl
::
dense_vector
<
T
>
&
v
)
{
return
mtl
::
num_rows
(
v
);
};
template
<
typename
T
>
struct
LessPairEps
{
...
...
This diff is collapsed.
Click to expand it.
extensions/kdtree_nanoflann_mesh.h
+
19
−
7
View file @
dbb50889
...
...
@@ -219,13 +219,25 @@ typedef std::vector<DataType> VectorOfDataType;
int
dim
=
vec
.
getFeSpace
()
->
getMesh
()
->
getDim
();
DimVec
<
double
>
lambda
(
dim
,
NO_INIT
);
double
area
=
meshconv
::
triangle_area_3d
(
elInfo
->
getCoord
(
0
).
begin
(),
elInfo
->
getCoord
(
1
).
begin
(),
elInfo
->
getCoord
(
2
).
begin
())
for
(
int
i
=
0
;
i
<
dim
+
1
;
i
++
)
lambda
[
i
]
=
meshconv
::
triangle_area_3d
(
p
.
begin
(),
elInfo
->
getCoord
((
i
+
1
)
%
3
).
begin
(),
elInfo
->
getCoord
((
i
+
2
)
%
3
).
begin
())
/
area
;
if
(
dim
==
1
)
{
double
lendth
=
abs
(
elInfo
->
getCoord
(
1
)
-
elInfo
->
getCoord
(
0
));
for
(
int
i
=
0
;
i
<
dim
+
1
;
i
++
)
lambda
[
i
]
=
abs
(
p
-
elInfo
->
getCoord
((
i
+
1
)
%
2
))
/
length
;
}
else
if
(
dim
==
2
)
{
double
area
=
meshconv
::
triangle_area_3d
(
elInfo
->
getCoord
(
0
).
begin
(),
elInfo
->
getCoord
(
1
).
begin
(),
elInfo
->
getCoord
(
2
).
begin
())
for
(
int
i
=
0
;
i
<
dim
+
1
;
i
++
)
lambda
[
i
]
=
meshconv
::
triangle_area_3d
(
p
.
begin
(),
elInfo
->
getCoord
((
i
+
1
)
%
3
).
begin
(),
elInfo
->
getCoord
((
i
+
2
)
%
3
).
begin
())
/
area
;
}
else
if
(
dim
==
3
)
{
double
volume
=
meshconv
::
volume_tetrahedron
(
elInfo
->
getCoord
(
0
).
begin
(),
elInfo
->
getCoord
(
1
).
begin
(),
elInfo
->
getCoord
(
2
).
begin
(),
elInfo
->
getCoord
(
3
).
begin
())
for
(
int
i
=
0
;
i
<
dim
+
1
;
i
++
)
lambda
[
i
]
=
meshconv
::
volume_tetrahedron
(
p
.
begin
(),
elInfo
->
getCoord
((
i
+
1
)
%
3
).
begin
(),
elInfo
->
getCoord
((
i
+
2
)
%
3
).
begin
(),
elInfo
->
getCoord
((
i
+
3
)
%
3
).
begin
())
/
volume
;
}
ElementFunctionDOFVec
<
T
>
elFct
(
&
vec
);
elFct
.
setElInfo
(
elInfo
);
...
...
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