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
7c35d72d
Commit
7c35d72d
authored
15 years ago
by
Thomas Witkowski
Browse files
Options
Downloads
Patches
Plain Diff
Some optimizations.
parent
03a3f621
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AMDiS/Reinit/src/ElementLevelSet.h
+83
-96
83 additions, 96 deletions
AMDiS/Reinit/src/ElementLevelSet.h
AMDiS/src/Operator.cc
+93
-111
93 additions, 111 deletions
AMDiS/src/Operator.cc
AMDiS/src/Operator.h
+96
-90
96 additions, 90 deletions
AMDiS/src/Operator.h
with
272 additions
and
297 deletions
AMDiS/Reinit/src/ElementLevelSet.h
+
83
−
96
View file @
7c35d72d
...
...
@@ -77,12 +77,11 @@ class ElementLevelSet
mesh
=
mesh_
;
dim
=
mesh
->
getDim
();
elIntersecPoints
=
NEW
VectorOfFixVecs
<
DimVec
<
double
>
>
(
dim
,
MAX_INTERSECTION_POINTS
,
NO_INIT
);
elVertexStatusVec
=
new
int
[
dim
+
1
];
elVertexLevelSetVec
=
new
double
[
dim
+
1
];
elIntersecPoints
=
new
VectorOfFixVecs
<
DimVec
<
double
>
>
(
dim
,
MAX_INTERSECTION_POINTS
,
NO_INIT
);
elVertexStatusVec
=
new
int
[
dim
+
1
];
elVertexLevelSetVec
=
new
double
[
dim
+
1
];
int
setElementLevelSetTol
=
0
;
GET_PARAMETER
(
0
,
name
+
"->set ElementLevelSet tolerances"
,
"%d"
,
...
...
@@ -106,7 +105,7 @@ class ElementLevelSet
if
(
elVertexLevelSetVec
)
delete
[]
elVertexLevelSetVec
;
if
(
elIntersecPoints
)
DELETE
elIntersecPoints
;
delete
elIntersecPoints
;
}
/**
...
...
@@ -138,18 +137,15 @@ class ElementLevelSet
int
createElementLevelSet
(
const
ElInfo
*
elInfo_
,
const
bool
doCalcIntersecPts_
=
true
);
/**
* Gets value of level set function at point given in
* barycentric coordinates.
*/
inline
double
calcLevelSetFct
(
const
DimVec
<
double
>&
bary
)
{
/// Gets value of level set function at point given in barycentric coordinates.
inline
double
calcLevelSetFct
(
const
DimVec
<
double
>&
bary
)
{
return
(
*
lSFct
)(
bary
);
}
;
}
/**
* Resets level set information on element.
*/
inline
void
resetElement
()
{
/// Resets level set information on element.
inline
void
resetElement
()
{
FUNCNAME
(
"ElementLevelSet::resetElement"
);
numElVertexInterior
=
0
;
...
...
@@ -157,116 +153,109 @@ class ElementLevelSet
numElVertexExterior
=
0
;
numIntersecPoints
=
0
;
elStatus
=
LEVEL_SET_UNDEFINED
;
}
;
}
/**
* Defines current element (elInfo).
*/
inline
void
setElement
(
const
ElInfo
*
elInfo_
)
{
/// Defines current element (elInfo).
inline
void
setElement
(
const
ElInfo
*
elInfo_
)
{
elInfo
=
elInfo_
;
resetElement
();
};
/**
* Set level_set_domain.
*/
inline
void
setLevelSetDomain
(
int
status_
)
{
}
/// Set level_set_domain.
inline
void
setLevelSetDomain
(
int
status_
)
{
TEST_EXIT
(
status_
==
LEVEL_SET_INTERIOR
||
status_
==
LEVEL_SET_EXTERIOR
||
status_
==
LEVEL_SET_BOUNDARY
)(
"illegal level set status !
\n
"
);
level_set_domain
=
status_
;
}
;
}
/**
* Functions to set tolerances for intersection point calculation.
*/
inline
void
setLsValTol
(
double
tol
)
{
LS_VAL_TOL
=
tol
;};
inline
void
setLsValMin
(
double
min
)
{
LS_VAL_MIN
=
min
;};
inline
void
setSpBaryTol
(
double
tol
)
{
SP_BARY_TOL
=
tol
;};
/// Functions to set tolerances for intersection point calculation.
inline
void
setLsValTol
(
double
tol
)
{
LS_VAL_TOL
=
tol
;
}
/**
* Get level_set_domain.
*/
inline
const
int
&
getLevelSetDomain
()
const
{
inline
void
setLsValMin
(
double
min
)
{
LS_VAL_MIN
=
min
;
}
inline
void
setSpBaryTol
(
double
tol
)
{
SP_BARY_TOL
=
tol
;
}
/// Get level_set_domain.
inline
const
int
&
getLevelSetDomain
()
const
{
return
level_set_domain
;
}
;
}
/**
* Get LevelSet-Status of element.
*/
inline
const
int
&
getElementLevelSetStatus
()
const
{
/// Get LevelSet-Status of element.
inline
const
int
&
getElementLevelSetStatus
()
const
{
return
elStatus
;
}
;
}
/**
* Get number of vertices which are intersection points.
*/
inline
const
int
&
getNumVertIntPoints
()
const
{
/// Get number of vertices which are intersection points.
inline
const
int
&
getNumVertIntPoints
()
const
{
FUNCNAME
(
"ElementLevelSet::getNumVertIntPoints"
);
TEST_EXIT
(
numElVertexBoundary
==
0
)(
"numElVertexBoundary should be zero!
\n
"
);
return
numElVertexBoundary
;
};
};
/**
* Get vector elVertexStatusVec.
*/
inline
const
int
*
getElVertStatusVec
()
const
{
/// Get vector elVertexStatusVec.
inline
const
int
*
getElVertStatusVec
()
const
{
return
elVertexStatusVec
;
}
;
}
/**
* Get i-th component of vector elVertexLevelSetVec.
*/
inline
const
double
getElVertLevelSetVec
(
const
int
i
)
const
{
/// Get i-th component of vector elVertexLevelSetVec.
inline
const
double
getElVertLevelSetVec
(
const
int
i
)
const
{
return
elVertexLevelSetVec
[
i
];
}
;
}
/**
* Get vector elVertexLevelSetVec.
*/
inline
const
double
*
getElVertLevelSetVec
()
const
{
/// Get vector elVertexLevelSetVec.
inline
const
double
*
getElVertLevelSetVec
()
const
{
return
elVertexLevelSetVec
;
}
;
}
/**
* Get levelSetFct.
*/
inline
ElementFunction
<
double
>
*
getLevelSetFct
()
const
{
/// Get levelSetFct.
inline
ElementFunction
<
double
>
*
getLevelSetFct
()
const
{
return
lSFct
;
}
;
}
/**
* Get mesh.
*/
inline
Mesh
*
getMesh
()
const
{
/// Get mesh.
inline
Mesh
*
getMesh
()
const
{
return
mesh
;
}
;
}
/**
* Get dim.
*/
inline
int
getDim
()
const
{
/// Get dim.
inline
int
getDim
()
const
{
return
dim
;
}
;
}
/**
* Get the intersection points.
*/
inline
VectorOfFixVecs
<
DimVec
<
double
>
>
*
getElIntersecPoints
()
const
{
/// Get the intersection points.
inline
VectorOfFixVecs
<
DimVec
<
double
>
>
*
getElIntersecPoints
()
const
{
return
elIntersecPoints
;
}
;
}
/**
* Get number of intersection points.
*/
inline
int
getNumElIntersecPoints
()
const
{
/// Get number of intersection points.
inline
int
getNumElIntersecPoints
()
const
{
return
numIntersecPoints
;
}
;
}
/**
* Calculate exterior normal to intersection plane.
*/
/// Calculate exterior normal to intersection plane.
void
calcIntersecNormal
(
WorldVector
<
double
>
&
normal
);
/**
...
...
@@ -287,9 +276,7 @@ class ElementLevelSet
int
getVertexPos
(
const
DimVec
<
double
>
barCoords
);
protected
:
/**
* Calculates level set value of each vertex of element.
*/
/// Calculates level set value of each vertex of element.
void
calculateElementLevelSetVal
();
/**
...
...
This diff is collapsed.
Click to expand it.
AMDiS/src/Operator.cc
+
93
−
111
View file @
7c35d72d
This diff is collapsed.
Click to expand it.
AMDiS/src/Operator.h
+
96
−
90
View file @
7c35d72d
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