Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
8a96a8fb
Commit
8a96a8fb
authored
12 years ago
by
Francois Henrotte
Browse files
Options
Downloads
Patches
Plain Diff
new Matrix.h
parent
292d9d68
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Mesh/Matrix.h
+85
-0
85 additions, 0 deletions
Mesh/Matrix.h
Mesh/directions3D.cpp
+1
-1
1 addition, 1 deletion
Mesh/directions3D.cpp
Mesh/simple3D.cpp
+8
-3
8 additions, 3 deletions
Mesh/simple3D.cpp
with
94 additions
and
4 deletions
Mesh/Matrix.h
0 → 100644
+
85
−
0
View file @
8a96a8fb
// Gmsh - Copyright (C) 1997-2013 C. Geuzaine, J.-F. Remacle
//
// See the LICENSE.txt file for license information. Please report all
// bugs and problems to the public mailing list <gmsh@geuz.org>.
//
// Contributor(s):
// Tristan Carrier
#ifndef _MATRIX_TCB_H_
#define _MATRIX_TCB_H_
class
Matrix
{
private:
double
m11
,
m21
,
m31
,
m12
,
m22
,
m32
,
m13
,
m23
,
m33
;
public:
Matrix
(){
m11
=
1.0
;
m21
=
0.0
;
m31
=
0.0
;
m12
=
0.0
;
m22
=
1.0
;
m32
=
0.0
;
m13
=
0.0
;
m23
=
0.0
;
m33
=
1.0
;
}
~
Matrix
(){}
void
set_m11
(
double
x
){
m11
=
x
;
}
void
set_m21
(
double
x
){
m21
=
x
;
}
void
set_m31
(
double
x
){
m31
=
x
;
}
void
set_m12
(
double
x
){
m12
=
x
;
}
void
set_m22
(
double
x
){
m22
=
x
;
}
void
set_m32
(
double
x
){
m32
=
x
;
}
void
set_m13
(
double
x
){
m13
=
x
;
}
void
set_m23
(
double
x
){
m23
=
x
;
}
void
set_m33
(
double
x
){
m33
=
x
;
}
double
get_m11
(){
return
m11
;
}
double
get_m21
(){
return
m21
;
}
double
get_m31
(){
return
m31
;
}
double
get_m12
(){
return
m12
;
}
double
get_m22
(){
return
m22
;
}
double
get_m32
(){
return
m23
;
}
double
get_m13
(){
return
m13
;
}
double
get_m23
(){
return
m23
;
}
double
get_m33
(){
return
m33
;
}
};
/*
double Matrix::get_m11(){ return m11; }
double Matrix::get_m21(){ return m21; }
double Matrix::get_m31(){ return m31; }
double Matrix::get_m12(){ return m12; }
double Matrix::get_m22(){ return m22; }
double Matrix::get_m32(){ return m32; }
double Matrix::get_m13(){ return m13; }
double Matrix::get_m23(){ return m23; }
double Matrix::get_m33(){ return m33; }
Matrix::Matrix(){
m11 = 1.0;
m21 = 0.0;
m31 = 0.0;
m12 = 0.0;
m22 = 1.0;
m32 = 0.0;
m13 = 0.0;
m23 = 0.0;
m33 = 1.0;
}
Matrix::~Matrix(){}
void Matrix::set_m11(double new_m11){ m11 = new_m11; }
void Matrix::set_m21(double new_m21){ m21 = new_m21; }
void Matrix::set_m31(double new_m31){ m31 = new_m31; }
void Matrix::set_m12(double new_m12){ m12 = new_m12; }
void Matrix::set_m22(double new_m22){ m22 = new_m22; }
void Matrix::set_m32(double new_m32){ m32 = new_m32; }
void Matrix::set_m13(double new_m13){ m13 = new_m13; }
void Matrix::set_m23(double new_m23){ m23 = new_m23; }
void Matrix::set_m33(double new_m33){ m33 = new_m33; }
*/
#endif
This diff is collapsed.
Click to expand it.
Mesh/directions3D.cpp
+
1
−
1
View file @
8a96a8fb
...
@@ -590,7 +590,7 @@ void Frame_field::fillTreeVolume(GRegion* gr){
...
@@ -590,7 +590,7 @@ void Frame_field::fillTreeVolume(GRegion* gr){
annTreeData
[
index
][
0
]
=
pVertex
->
x
();
annTreeData
[
index
][
0
]
=
pVertex
->
x
();
annTreeData
[
index
][
1
]
=
pVertex
->
y
();
annTreeData
[
index
][
1
]
=
pVertex
->
y
();
annTreeData
[
index
][
2
]
=
pVertex
->
z
();
annTreeData
[
index
][
2
]
=
pVertex
->
z
();
vertIndices
[
index
++
]
=
pVertex
->
getNum
();
vertIndices
.
push_back
(
pVertex
->
getNum
()
)
;
}
}
annTree
=
new
ANNkd_tree
(
annTreeData
,
n
,
3
);
annTree
=
new
ANNkd_tree
(
annTreeData
,
n
,
3
);
#endif
#endif
...
...
This diff is collapsed.
Click to expand it.
Mesh/simple3D.cpp
+
8
−
3
View file @
8a96a8fb
...
@@ -347,10 +347,14 @@ void Filler::treat_region(GRegion* gr){
...
@@ -347,10 +347,14 @@ void Filler::treat_region(GRegion* gr){
RTree
<
Node
*
,
double
,
3
,
double
>
rtree
;
RTree
<
Node
*
,
double
,
3
,
double
>
rtree
;
Frame_field
::
init_region
(
gr
);
Frame_field
::
init_region
(
gr
);
Frame_field
::
init
(
gr
);
Frame_field
::
init
(
gr
);
std
::
cout
<<
"Smoothing: energy = "
<<
Frame_field
::
smooth
(
gr
)
<<
std
::
endl
;
std
::
cout
<<
"Smoothing: energy = "
<<
Frame_field
::
smooth
(
gr
)
<<
std
::
endl
;
std
::
cout
<<
"Smoothing: energy = "
<<
Frame_field
::
smooth
(
gr
)
<<
std
::
endl
;
std
::
cout
<<
"Smoothing: energy = "
<<
Frame_field
::
smooth
(
gr
)
<<
std
::
endl
;
std
::
cout
<<
"Smoothing: energy = "
<<
Frame_field
::
smooth
(
gr
)
<<
std
::
endl
;
std
::
cout
<<
"Smoothing: energy = "
<<
Frame_field
::
smooth
(
gr
)
<<
std
::
endl
;
std
::
cout
<<
"Smoothing: energy = "
<<
Frame_field
::
smooth
(
gr
)
<<
std
::
endl
;
std
::
cout
<<
"Smoothing: energy = "
<<
Frame_field
::
smooth
(
gr
)
<<
std
::
endl
;
Frame_field
::
save
(
gr
,
"smoothed.pos"
);
Frame_field
::
fillTreeVolume
(
gr
);
Frame_field
::
fillTreeVolume
(
gr
);
Size_field
::
init_region
(
gr
);
Size_field
::
init_region
(
gr
);
...
@@ -464,8 +468,9 @@ void Filler::treat_region(GRegion* gr){
...
@@ -464,8 +468,9 @@ void Filler::treat_region(GRegion* gr){
Metric
Filler
::
get_metric
(
double
x
,
double
y
,
double
z
){
Metric
Filler
::
get_metric
(
double
x
,
double
y
,
double
z
){
Metric
m
;
Metric
m
;
Matrix
m2
;
Matrix
m2
;
if
(
1
)
//m2 = Frame_field::search(x,y,z);
m2
=
Frame_field
::
search
(
x
,
y
,
z
);
else
m2
=
Frame_field
::
findNearestCross
(
x
,
y
,
z
);
m2
=
Frame_field
::
findNearestCross
(
x
,
y
,
z
);
m
.
set_m11
(
m2
.
get_m11
());
m
.
set_m11
(
m2
.
get_m11
());
...
...
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