Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs-feliks
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
Feliks Kiszkurno
ogs-feliks
Commits
b6f7dff4
Commit
b6f7dff4
authored
12 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
Fixed include dependencies.
parent
8afc6023
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
FemLib/FEMCondition.cpp
+10
-9
10 additions, 9 deletions
FemLib/FEMCondition.cpp
FemLib/FEMCondition.h
+11
-15
11 additions, 15 deletions
FemLib/FEMCondition.h
Gui/VtkVis/VtkConditionSource.cpp
+11
-6
11 additions, 6 deletions
Gui/VtkVis/VtkConditionSource.cpp
with
32 additions
and
30 deletions
FemLib/FEMCondition.cpp
+
10
−
9
View file @
b6f7dff4
...
...
@@ -13,9 +13,6 @@
*/
#include
"FEMCondition.h"
#include
"ProcessInfo.h"
#include
"GEOObjects.h"
//for SourceTerm
FEMCondition
::
FEMCondition
(
const
std
::
string
&
geometry_name
,
CondType
t
)
:
_type
(
t
),
_geoName
(
"[unspecified]"
),
_associated_geometry
(
geometry_name
)
...
...
@@ -26,16 +23,20 @@ FEMCondition::FEMCondition(const std::string &geometry_name, CondType t)
this
->
setProcessDistributionType
(
FiniteElement
::
INVALID_DIS_TYPE
);
}
FEMCondition
::
FEMCondition
(
const
std
::
string
&
geometry_name
,
FiniteElement
::
ProcessType
pt
,
FiniteElement
::
PrimaryVariable
pv
,
GeoLib
::
GEOTYPE
gt
,
const
std
::
string
&
gn
,
FiniteElement
::
DistributionType
dt
,
CondType
ct
)
FEMCondition
::
FEMCondition
(
const
std
::
string
&
geometry_name
,
FiniteElement
::
ProcessType
pt
,
FiniteElement
::
PrimaryVariable
pv
,
GeoLib
::
GEOTYPE
gt
,
const
std
::
string
&
gn
,
FiniteElement
::
DistributionType
dt
,
CondType
ct
)
:
ProcessInfo
(
pt
,
pv
/*, NULL*/
),
GeoInfo
(
gt
,
NULL
),
DistributionInfo
(
dt
),
_type
(
ct
),
_geoName
(
gn
),
_associated_geometry
(
geometry_name
)
{
}
FEMCondition
::
FEMCondition
(
const
FEMCondition
&
cond
,
CondType
t
)
:
ProcessInfo
(
cond
.
getProcessType
(),
cond
.
getProcessPrimaryVariable
()
/*, NULL*/
),
:
ProcessInfo
(
cond
.
getProcessType
(),
cond
.
getProcessPrimaryVariable
()
/*, NULL*/
),
GeoInfo
(
cond
.
getGeomType
(),
cond
.
getGeoObj
()),
DistributionInfo
(
cond
.
getProcessDistributionType
()),
_type
(
t
),
...
...
@@ -67,6 +68,6 @@ void FEMCondition::setDisValues(const std::vector< std::pair<size_t, double> > &
nodes
.
push_back
(
dis_values
[
i
].
first
);
values
.
push_back
(
dis_values
[
i
].
second
);
}
this
->
_disNodes
=
nodes
;
this
->
_disValues
=
values
;
this
->
_disNodes
=
nodes
;
this
->
_disValues
=
values
;
}
This diff is collapsed.
Click to expand it.
FemLib/FEMCondition.h
+
11
−
15
View file @
b6f7dff4
...
...
@@ -15,22 +15,16 @@
#ifndef FEMCONDITION_H
#define FEMCONDITION_H
#include
<vector>
#include
"DistributionInfo.h"
#include
"GeoInfo.h"
#include
"GeoObject.h"
#include
"Point.h"
#include
"ProcessInfo.h"
#include
<vector>
class
CBoundaryCondition
;
class
CInitialCondition
;
class
CSourceTerm
;
//class GEOObjects;
class
GridAdapter
;
#include
"GEOObjects.h"
/**
* \brief Adapter class for handling FEM Conditions in the user Interface
*/
...
...
@@ -47,11 +41,12 @@ public:
FEMCondition
(
const
std
::
string
&
geometry_name
,
CondType
t
=
UNSPECIFIED
);
FEMCondition
(
const
std
::
string
&
geometry_name
,
FiniteElement
::
ProcessType
pt
=
FiniteElement
::
INVALID_PROCESS
,
FiniteElement
::
PrimaryVariable
pv
=
FiniteElement
::
INVALID_PV
,
GeoLib
::
GEOTYPE
gt
=
GeoLib
::
INVALID
,
const
std
::
string
&
gn
=
"[unspecified]"
,
FiniteElement
::
DistributionType
dt
=
FiniteElement
::
INVALID_DIS_TYPE
,
CondType
ct
=
UNSPECIFIED
);
FiniteElement
::
ProcessType
pt
=
FiniteElement
::
INVALID_PROCESS
,
FiniteElement
::
PrimaryVariable
pv
=
FiniteElement
::
INVALID_PV
,
GeoLib
::
GEOTYPE
gt
=
GeoLib
::
INVALID
,
const
std
::
string
&
gn
=
"[unspecified]"
,
FiniteElement
::
DistributionType
dt
=
FiniteElement
::
INVALID_DIS_TYPE
,
CondType
ct
=
UNSPECIFIED
);
FEMCondition
(
const
FEMCondition
&
cond
,
CondType
t
);
~
FEMCondition
()
{}
...
...
@@ -75,7 +70,8 @@ public:
void
setConstantDisValue
(
double
disValue
)
{
_disValues
.
clear
();
_disValues
.
push_back
(
disValue
);
}
/// Sets a vector of values specifying the distribution.
void
setDisValues
(
const
std
::
vector
<
std
::
size_t
>
&
disNodes
,
const
std
::
vector
<
double
>
&
disValues
)
void
setDisValues
(
const
std
::
vector
<
std
::
size_t
>
&
disNodes
,
const
std
::
vector
<
double
>
&
disValues
)
{
_disNodes
=
disNodes
;
_disValues
=
disValues
;
...
...
@@ -86,7 +82,7 @@ public:
void
setDisValues
(
const
std
::
vector
<
std
::
pair
<
std
::
size_t
,
double
>
>
&
dis_values
);
/// Removes all distribution values
void
clearDisValues
()
{
_disValues
.
resize
(
0
);
}
;
void
clearDisValues
()
{
_disValues
.
resize
(
0
);
}
/// Sets the name of the geo-object the condition is assigned to.
void
setGeoName
(
std
::
string
geoName
)
{
_geoName
=
geoName
;
}
...
...
This diff is collapsed.
Click to expand it.
Gui/VtkVis/VtkConditionSource.cpp
+
11
−
6
View file @
b6f7dff4
...
...
@@ -16,6 +16,8 @@
// GeoLib
#include
"AABB.h"
#include
"Color.h"
#include
"Polyline.h"
#include
"Surface.h"
#include
"FEMCondition.h"
#include
"VtkConditionSource.h"
...
...
@@ -29,9 +31,9 @@
#include
<vtkPoints.h>
#include
<vtkPolyData.h>
#include
<vtkPolygon.h>
#include
<vtkProperty.h>
#include
<vtkSmartPointer.h>
#include
<vtkStreamingDemandDrivenPipeline.h>
#include
<vtkProperty.h>
#include
<vtkLookupTable.h>
...
...
@@ -131,7 +133,8 @@ int VtkConditionSource::RequestData( vtkInformation* request,
dis_type_value
=
static_cast
<
vtkIdType
>
(
_dis_type_map
.
size
());
_dis_type_map
.
insert
(
std
::
pair
<
FiniteElement
::
DistributionType
,
size_t
>
(
type
,
dis_type_value
));
}
else
dis_type_value
=
it
->
second
;
else
dis_type_value
=
it
->
second
;
if
((
*
_cond_vec
)[
n
]
->
getGeomType
()
==
GeoLib
::
POINT
)
{
...
...
@@ -166,7 +169,8 @@ int VtkConditionSource::RequestData( vtkInformation* request,
}
else
if
((
*
_cond_vec
)[
n
]
->
getGeomType
()
==
GeoLib
::
POLYLINE
)
{
const
GeoLib
::
Polyline
*
ply
=
static_cast
<
const
GeoLib
::
Polyline
*>
((
*
_cond_vec
)[
n
]
->
getGeoObj
());
const
GeoLib
::
Polyline
*
ply
=
static_cast
<
const
GeoLib
::
Polyline
*>
((
*
_cond_vec
)[
n
]
->
getGeoObj
());
const
int
nPoints
=
ply
->
getNumberOfPoints
();
newLines
->
InsertNextCell
(
nPoints
);
double
value
(
0
);
...
...
@@ -182,7 +186,7 @@ int VtkConditionSource::RequestData( vtkInformation* request,
scalars
->
InsertNextValue
(
dis_values
[
0
]);
else
if
(
type
==
FiniteElement
::
LINEAR
||
type
==
FiniteElement
::
LINEAR_NEUMANN
)
{
for
(
size_t
j
=
0
;
j
<
dis_values
.
size
();
j
++
)
for
(
size_t
j
=
0
;
j
<
dis_values
.
size
();
j
++
)
{
if
(
static_cast
<
int
>
(
dis_nodes
[
j
])
==
i
)
value
=
dis_values
[
j
];
...
...
@@ -216,7 +220,8 @@ int VtkConditionSource::RequestData( vtkInformation* request,
if
(
point_idx_map
[
point_index
]
==
-
1
)
{
point_idx_map
[
point_index
]
=
pnt_id
;
newPoints
->
InsertNextPoint
((
*
_points
)[
point_index
]
->
getCoords
());
newPoints
->
InsertNextPoint
(
(
*
_points
)[
point_index
]
->
getCoords
());
aPolygon
->
GetPointIds
()
->
SetId
(
j
,
pnt_id
);
distypes
->
InsertNextValue
(
dis_type_value
);
...
...
@@ -246,7 +251,7 @@ int VtkConditionSource::RequestData( vtkInformation* request,
else
if
((
*
_cond_vec
)[
n
]
->
getGeomType
()
==
GeoLib
::
INVALID
)
{
size_t
nValues
=
dis_values
.
size
();
for
(
size_t
i
=
0
;
i
<
nValues
;
i
++
)
for
(
size_t
i
=
0
;
i
<
nValues
;
i
++
)
{
//vtkIdType pid = newPoints->InsertNextPoint((*_points)[dis_nodes[i]]->getData());
vtkIdType
pid
=
newPoints
->
InsertNextPoint
((
*
_points
)[
i
]
->
getCoords
());
...
...
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