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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Larry Price
gmsh
Commits
bf3dc102
Commit
bf3dc102
authored
11 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
pp
parent
fad13778
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
contrib/HighOrderMeshOptimizer/ParamCoord.h
+28
-35
28 additions, 35 deletions
contrib/HighOrderMeshOptimizer/ParamCoord.h
with
28 additions
and
35 deletions
contrib/HighOrderMeshOptimizer/ParamCoord.h
+
28
−
35
View file @
bf3dc102
#ifndef _PARAMCOORD_H_
#define _PARAMCOORD_H_
class
ParamCoord
{
public:
virtual
void
exportParamCoord
(
MVertex
*
v
,
const
SPoint3
&
uvw
)
{};
virtual
int
nCoord
(
MVertex
*
vert
)
=
0
;
// Number of parametric coordinates for vertex
virtual
SPoint3
getUvw
(
MVertex
*
vert
)
=
0
;
// Get parametric coordinates of vertex
virtual
SPoint3
uvw2Xyz
(
MVertex
*
vert
,
const
SPoint3
&
uvw
)
=
0
;
// Calculate physical coordinates from parametric coordinates of vertex
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
SPoint3
&
gXyz
,
SPoint3
&
gUvw
)
=
0
;
// Calculate derivatives w.r.t parametric coordinates
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
std
::
vector
<
SPoint3
>
&
gXyz
,
std
::
vector
<
SPoint3
>
&
gUvw
)
=
0
;
// Calculate derivatives w.r.t parametric coordinates
// Number of parametric coordinates for vertex
virtual
int
nCoord
(
MVertex
*
vert
)
=
0
;
// Get parametric coordinates of vertex
virtual
SPoint3
getUvw
(
MVertex
*
vert
)
=
0
;
// Calculate physical coordinates from parametric coordinates of vertex
virtual
SPoint3
uvw2Xyz
(
MVertex
*
vert
,
const
SPoint3
&
uvw
)
=
0
;
// Calculate derivatives w.r.t parametric coordinates
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
SPoint3
&
gXyz
,
SPoint3
&
gUvw
)
=
0
;
// Calculate derivatives w.r.t parametric coordinates
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
std
::
vector
<
SPoint3
>
&
gXyz
,
std
::
vector
<
SPoint3
>
&
gUvw
)
=
0
;
virtual
~
ParamCoord
()
{}
};
class
ParamCoordPhys3D
:
public
ParamCoord
{
public:
int
nCoord
(
MVertex
*
vert
)
{
return
3
;
}
virtual
SPoint3
getUvw
(
MVertex
*
vert
)
{
return
vert
->
point
();
}
virtual
SPoint3
uvw2Xyz
(
MVertex
*
vert
,
const
SPoint3
&
uvw
)
{
return
uvw
;
}
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
SPoint3
&
gXyz
,
SPoint3
&
gUvw
)
{
gUvw
=
gXyz
;
}
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
std
::
vector
<
SPoint3
>
&
gXyz
,
std
::
vector
<
SPoint3
>
&
gUvw
)
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
SPoint3
&
gXyz
,
SPoint3
&
gUvw
){
gUvw
=
gXyz
;
}
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
std
::
vector
<
SPoint3
>
&
gXyz
,
std
::
vector
<
SPoint3
>
&
gUvw
)
{
std
::
vector
<
SPoint3
>::
iterator
itUvw
=
gUvw
.
begin
();
for
(
std
::
vector
<
SPoint3
>::
const_iterator
itXyz
=
gXyz
.
begin
();
itXyz
!=
gXyz
.
end
();
itXyz
++
)
{
for
(
std
::
vector
<
SPoint3
>::
const_iterator
itXyz
=
gXyz
.
begin
();
itXyz
!=
gXyz
.
end
();
itXyz
++
)
{
*
itUvw
=
*
itXyz
;
itUvw
++
;
}
}
};
class
ParamCoordPhys2D
:
public
ParamCoord
{
public:
int
nCoord
(
MVertex
*
vert
)
{
return
2
;
}
virtual
SPoint3
getUvw
(
MVertex
*
vert
)
{
return
vert
->
point
();
}
virtual
SPoint3
uvw2Xyz
(
MVertex
*
vert
,
const
SPoint3
&
uvw
)
{
return
uvw
;
}
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
SPoint3
&
gXyz
,
SPoint3
&
gUvw
)
{
gUvw
=
gXyz
;
}
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
std
::
vector
<
SPoint3
>
&
gXyz
,
std
::
vector
<
SPoint3
>
&
gUvw
)
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
SPoint3
&
gXyz
,
SPoint3
&
gUvw
)
{
gUvw
=
gXyz
;
}
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
std
::
vector
<
SPoint3
>
&
gXyz
,
std
::
vector
<
SPoint3
>
&
gUvw
)
{
std
::
vector
<
SPoint3
>::
iterator
itUvw
=
gUvw
.
begin
();
for
(
std
::
vector
<
SPoint3
>::
const_iterator
itXyz
=
gXyz
.
begin
();
itXyz
!=
gXyz
.
end
();
itXyz
++
)
{
for
(
std
::
vector
<
SPoint3
>::
const_iterator
itXyz
=
gXyz
.
begin
();
itXyz
!=
gXyz
.
end
();
itXyz
++
)
{
*
itUvw
=
*
itXyz
;
itUvw
++
;
}
}
};
class
ParamCoordParent
:
public
ParamCoord
{
public:
int
nCoord
(
MVertex
*
vert
)
{
return
vert
->
onWhat
()
->
dim
();
}
virtual
void
exportParamCoord
(
MVertex
*
v
,
const
SPoint3
&
uvw
);
virtual
SPoint3
getUvw
(
MVertex
*
vert
);
virtual
SPoint3
uvw2Xyz
(
MVertex
*
vert
,
const
SPoint3
&
uvw
);
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
SPoint3
&
gXyz
,
SPoint3
&
gUvw
);
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
std
::
vector
<
SPoint3
>
&
gXyz
,
std
::
vector
<
SPoint3
>
&
gUvw
);
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
SPoint3
&
gXyz
,
SPoint3
&
gUvw
);
virtual
void
gXyz2gUvw
(
MVertex
*
vert
,
const
SPoint3
&
uvw
,
const
std
::
vector
<
SPoint3
>
&
gXyz
,
std
::
vector
<
SPoint3
>
&
gUvw
);
};
#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