Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
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
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
Jakob Randow
ogs
Commits
37fe3129
Commit
37fe3129
authored
12 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
Resolved merge conflicts.
parent
7820e19e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp
+0
-41
0 additions, 41 deletions
...pleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp
with
0 additions
and
41 deletions
Utils/SimpleMeshCreation/createMeshElemPropertiesFromASCRaster.cpp
+
0
−
41
View file @
37fe3129
...
@@ -142,27 +142,8 @@ int main (int argc, char* argv[])
...
@@ -142,27 +142,8 @@ int main (int argc, char* argv[])
}
}
{
{
<<<<<<<
HEAD
double
src_mean_value
(
src_properties
[
0
]);
<<<<<<<
HEAD
for
(
size_t
k
(
1
);
k
<
n_cols
*
n_rows
;
k
++
)
src_mean_value
+=
src_properties
[
k
];
src_mean_value
/=
n_cols
*
n_rows
;
=======
for
(
size_t
k
(
1
);
k
<
n_cols
*
n_rows
;
k
++
)
{
src_mean_value
+=
src_properties
[
k
];
}
src_mean_value
/=
n_cols
*
n_rows
;
<<<<<<<
HEAD
>>>>>>>
Added
include
MathTools
.
h
.
std
::
cout
<<
"mean value of source: "
<<
src_mean_value
<<
std
::
endl
;
=======
INFO
(
"Mean value of source: %f."
,
src_mean_value
);
>>>>>>>
Using
logog
logging
in
createMeshElemPropertiesFromASCRaster
.
cpp
.
=======
const
double
mu
(
std
::
accumulate
(
src_properties
.
begin
(),
src_properties
.
end
(),
0
)
/
size
);
const
double
mu
(
std
::
accumulate
(
src_properties
.
begin
(),
src_properties
.
end
(),
0
)
/
size
);
INFO
(
"Mean value of source: %f."
,
mu
);
INFO
(
"Mean value of source: %f."
,
mu
);
>>>>>>>
Using
std
::
accumulate
and
std
::
iota
to
make
code
more
compact
.
double
src_variance
(
MathLib
::
fastpow
(
src_properties
[
0
]
-
mu
,
2
));
double
src_variance
(
MathLib
::
fastpow
(
src_properties
[
0
]
-
mu
,
2
));
for
(
std
::
size_t
k
(
1
);
k
<
size
;
k
++
)
{
for
(
std
::
size_t
k
(
1
);
k
<
size
;
k
++
)
{
...
@@ -175,20 +156,9 @@ int main (int argc, char* argv[])
...
@@ -175,20 +156,9 @@ int main (int argc, char* argv[])
MeshLib
::
Mesh
*
src_mesh
(
MeshLib
::
ConvertRasterToMesh
(
*
raster
,
MshElemType
::
QUAD
,
MeshLib
::
Mesh
*
src_mesh
(
MeshLib
::
ConvertRasterToMesh
(
*
raster
,
MshElemType
::
QUAD
,
MeshLib
::
UseIntensityAs
::
MATERIAL
).
execute
());
MeshLib
::
UseIntensityAs
::
MATERIAL
).
execute
());
<<<<<<<
HEAD
std
::
vector
<
size_t
>
src_perm
(
n_cols
*
n_rows
);
for
(
size_t
k
(
0
);
k
<
n_cols
*
n_rows
;
k
++
)
src_perm
[
k
]
=
k
;
<<<<<<<
HEAD
BaseLib
::
Quicksort
<
double
,
std
::
size_t
>
(
src_properties
,
0
,
n_cols
*
n_rows
,
src_perm
);
=======
BaseLib
::
Quicksort
<
double
>
(
src_properties
,
0
,
n_cols
*
n_rows
,
src_perm
);
>>>>>>>
Added
include
MathTools
.
h
.
=======
std
::
vector
<
std
::
size_t
>
src_perm
(
size
);
std
::
vector
<
std
::
size_t
>
src_perm
(
size
);
std
::
iota
(
src_perm
.
begin
(),
src_perm
.
end
(),
0
);
std
::
iota
(
src_perm
.
begin
(),
src_perm
.
end
(),
0
);
BaseLib
::
Quicksort
<
double
>
(
src_properties
,
0
,
size
,
src_perm
);
BaseLib
::
Quicksort
<
double
>
(
src_properties
,
0
,
size
,
src_perm
);
>>>>>>>
Using
std
::
accumulate
and
std
::
iota
to
make
code
more
compact
.
// compress the property data structure
// compress the property data structure
const
std
::
size_t
mat_map_size
(
src_properties
.
size
());
const
std
::
size_t
mat_map_size
(
src_properties
.
size
());
...
@@ -253,20 +223,9 @@ int main (int argc, char* argv[])
...
@@ -253,20 +223,9 @@ int main (int argc, char* argv[])
}
}
if
(
!
out_mesh_arg
.
getValue
().
empty
())
{
if
(
!
out_mesh_arg
.
getValue
().
empty
())
{
<<<<<<<
HEAD
std
::
vector
<
size_t
>
dest_perm
(
n_dest_mesh_elements
);
<<<<<<<
HEAD
for
(
size_t
k
(
0
);
k
<
n_dest_mesh_elements
;
k
++
)
dest_perm
[
k
]
=
k
;
BaseLib
::
Quicksort
<
double
,
std
::
size_t
>
(
dest_properties
,
0
,
n_dest_mesh_elements
,
dest_perm
);
=======
for
(
size_t
k
(
0
);
k
<
n_dest_mesh_elements
;
k
++
)
dest_perm
[
k
]
=
k
;
=======
std
::
vector
<
std
::
size_t
>
dest_perm
(
n_dest_mesh_elements
);
std
::
vector
<
std
::
size_t
>
dest_perm
(
n_dest_mesh_elements
);
std
::
iota
(
dest_perm
.
begin
(),
dest_perm
.
end
(),
0
);
std
::
iota
(
dest_perm
.
begin
(),
dest_perm
.
end
(),
0
);
>>>>>>>
Using
std
::
accumulate
and
std
::
iota
to
make
code
more
compact
.
BaseLib
::
Quicksort
<
double
>
(
dest_properties
,
0
,
n_dest_mesh_elements
,
dest_perm
);
BaseLib
::
Quicksort
<
double
>
(
dest_properties
,
0
,
n_dest_mesh_elements
,
dest_perm
);
>>>>>>>
Added
include
MathTools
.
h
.
// reset materials in destination mesh
// reset materials in destination mesh
for
(
std
::
size_t
k
(
0
);
k
<
n_dest_mesh_elements
;
k
++
)
{
for
(
std
::
size_t
k
(
0
);
k
<
n_dest_mesh_elements
;
k
++
)
{
...
...
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