Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-fufem
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
lisa_julia.nebel_at_tu-dresden.de
dune-fufem
Commits
c265ceb0
Commit
c265ceb0
authored
12 years ago
by
akbib
Committed by
akbib
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
boundary segment classes for a 3D tube/tube-segment prism grid that is aligned along the x-axis
[[Imported from SVN: r6859]]
parent
0dead82a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/fufem/arcofcircle.hh
+121
-0
121 additions, 0 deletions
dune/fufem/arcofcircle.hh
with
121 additions
and
0 deletions
dune/fufem/arcofcircle.hh
+
121
−
0
View file @
c265ceb0
...
@@ -33,5 +33,126 @@ class ArcOfCircle : public Dune::BoundarySegment<2>
...
@@ -33,5 +33,126 @@ class ArcOfCircle : public Dune::BoundarySegment<2>
double
toAngle_
;
double
toAngle_
;
};
};
/** \brief Boundary segments for a 3D-tube/tube-segment prism grid that is aligned with the x-axis.
*
* \param center - The center of the circle that the characterizes the position of tube.
* \param radius - The radius of the circle.
* \param length - Length of the boundary segment in x-direction.
* \param fromAngle - Segment fromAngle. (0 <= fromAngle <= toAngle <= 2*PI)
* \param toAngle - Segment toAngle. (0 <= fromAngle <= toAngle <= 2*PI)
*
*/
template
<
class
ctype
>
class
TubeLowerSegment
:
public
Dune
::
BoundarySegment
<
3
>
{
public:
TubeLowerSegment
(
const
Dune
::
FieldVector
<
ctype
,
3
>&
center
,
ctype
radius
,
ctype
length
,
ctype
fromAngle
,
ctype
toAngle
)
:
center_
(
center
),
radius_
(
radius
),
length_
(
length
),
fromAngle_
(
fromAngle
),
toAngle_
(
toAngle
)
{}
Dune
::
FieldVector
<
ctype
,
3
>
operator
()(
const
Dune
::
FieldVector
<
ctype
,
2
>&
local
)
const
{
ctype
angle
=
fromAngle_
+
(
local
[
0
]
+
local
[
1
])
*
(
toAngle_
-
fromAngle_
);
Dune
::
FieldVector
<
ctype
,
3
>
result
=
center_
;
result
[
0
]
+=
local
[
1
]
*
length_
;
result
[
1
]
+=
radius_
*
std
::
cos
(
angle
);
result
[
2
]
+=
radius_
*
std
::
sin
(
angle
);
return
result
;
}
Dune
::
FieldVector
<
ctype
,
3
>
center_
;
ctype
radius_
;
ctype
length_
;
ctype
fromAngle_
;
ctype
toAngle_
;
};
/** \brief Boundary segments for a 3D-tube/tube-segment prism grid that is aligned with the x-axis.
*
* \param center - The center of the circle that the characterizes the position of tube.
* \param radius - The radius of the circle.
* \param length - Length of the boundary segment in x-direction.
* \param fromAngle - Segment fromAngle. (0 <= fromAngle <= toAngle <= 2*PI)
* \param toAngle - Segment toAngle. (0 <= fromAngle <= toAngle <= 2*PI)
*
*/
template
<
class
ctype
>
class
TubeUpperSegment
:
public
Dune
::
BoundarySegment
<
3
>
{
public:
TubeUpperSegment
(
const
Dune
::
FieldVector
<
ctype
,
3
>&
center
,
ctype
radius
,
ctype
length
,
ctype
fromAngle
,
ctype
toAngle
)
:
center_
(
center
),
radius_
(
radius
),
length_
(
length
),
fromAngle_
(
fromAngle
),
toAngle_
(
toAngle
)
{}
Dune
::
FieldVector
<
ctype
,
3
>
operator
()(
const
Dune
::
FieldVector
<
ctype
,
2
>&
local
)
const
{
ctype
angle
=
fromAngle_
+
local
[
0
]
*
(
toAngle_
-
fromAngle_
);
Dune
::
FieldVector
<
ctype
,
3
>
result
=
center_
;
result
[
0
]
+=
local
[
1
]
*
length_
;
result
[
1
]
+=
radius_
*
std
::
cos
(
angle
);
result
[
2
]
+=
radius_
*
std
::
sin
(
angle
);
return
result
;
}
Dune
::
FieldVector
<
ctype
,
3
>
center_
;
ctype
radius_
;
ctype
length_
;
ctype
fromAngle_
;
ctype
toAngle_
;
};
/** \brief Lateral boundary segments for a 3D-tube/tube-segment prism grid that is aligned with the x-axis.
*
* \param center - The center of the circle that the characterizes the position of tube.
* \param radius - The radius of the circle.
* \param length - Thickness of the tube(-segment).
* \param fromAngle - Segment fromAngle. (0 <= fromAngle <= toAngle <= 2*PI)
* \param toAngle - Segment toAngle. (0 <= fromAngle <= toAngle <= 2*PI)
*
*/
template
<
class
ctype
>
class
TubeLateralSegment
:
public
Dune
::
BoundarySegment
<
3
>
{
public:
TubeLateralSegment
(
const
Dune
::
FieldVector
<
ctype
,
3
>&
center
,
ctype
radius
,
ctype
thickness
,
ctype
fromAngle
,
ctype
toAngle
)
:
center_
(
center
),
radius_
(
radius
),
thickness_
(
thickness
),
fromAngle_
(
fromAngle
),
toAngle_
(
toAngle
)
{}
Dune
::
FieldVector
<
ctype
,
3
>
operator
()(
const
Dune
::
FieldVector
<
ctype
,
2
>&
local
)
const
{
ctype
angle
=
fromAngle_
+
local
[
0
]
*
(
toAngle_
-
fromAngle_
);
Dune
::
FieldVector
<
ctype
,
3
>
result
=
center_
;
result
[
1
]
+=
(
radius_
+
local
[
1
]
*
thickness_
)
*
std
::
cos
(
angle
);
result
[
2
]
+=
(
radius_
+
local
[
1
]
*
thickness_
)
*
std
::
sin
(
angle
);
return
result
;
}
Dune
::
FieldVector
<
ctype
,
3
>
center_
;
ctype
radius_
;
ctype
thickness_
;
ctype
fromAngle_
;
ctype
toAngle_
;
};
#endif
#endif
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