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
48b43a53
Commit
48b43a53
authored
12 years ago
by
Éric Béchet
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
36eae5e3
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Geo/MElement.h
+8
-4
8 additions, 4 deletions
Geo/MElement.h
Geo/MSubElement.cpp
+612
-108
612 additions, 108 deletions
Geo/MSubElement.cpp
Geo/MSubElement.h
+130
-32
130 additions, 32 deletions
Geo/MSubElement.h
with
750 additions
and
144 deletions
Geo/MElement.h
+
8
−
4
View file @
48b43a53
...
@@ -161,6 +161,10 @@ class MElement
...
@@ -161,6 +161,10 @@ class MElement
virtual
int
getNumChildren
()
const
{
return
0
;
}
virtual
int
getNumChildren
()
const
{
return
0
;
}
virtual
MElement
*
getChild
(
int
i
)
const
{
return
NULL
;
}
virtual
MElement
*
getChild
(
int
i
)
const
{
return
NULL
;
}
virtual
bool
ownsParent
()
const
{
return
false
;
}
virtual
bool
ownsParent
()
const
{
return
false
;
}
// get base element in case of MSubElement
virtual
const
MElement
*
getBaseElement
()
const
{
return
this
;
}
virtual
MElement
*
getBaseElement
()
{
return
this
;
}
// get and set domain for borders
// get and set domain for borders
virtual
MElement
*
getDomain
(
int
i
)
const
{
return
NULL
;
}
virtual
MElement
*
getDomain
(
int
i
)
const
{
return
NULL
;
}
virtual
void
setDomain
(
MElement
*
e
,
int
i
)
{
}
virtual
void
setDomain
(
MElement
*
e
,
int
i
)
{
}
...
@@ -239,10 +243,10 @@ class MElement
...
@@ -239,10 +243,10 @@ class MElement
int
order
=-
1
);
int
order
=-
1
);
// return the Jacobian of the element evaluated at point (u,v,w) in
// return the Jacobian of the element evaluated at point (u,v,w) in
// parametric coordinates
// parametric coordinates
double
getJacobian
(
const
fullMatrix
<
double
>
&
gsf
,
double
jac
[
3
][
3
]);
virtual
double
getJacobian
(
const
fullMatrix
<
double
>
&
gsf
,
double
jac
[
3
][
3
]);
// To be compatible with _vgrads of functionSpace without having to put under fullMatrix form
// To be compatible with _vgrads of functionSpace without having to put under fullMatrix form
double
getJacobian
(
const
std
::
vector
<
SVector3
>
&
gsf
,
double
jac
[
3
][
3
]);
virtual
double
getJacobian
(
const
std
::
vector
<
SVector3
>
&
gsf
,
double
jac
[
3
][
3
]);
double
getJacobian
(
double
u
,
double
v
,
double
w
,
double
jac
[
3
][
3
]);
virtual
double
getJacobian
(
double
u
,
double
v
,
double
w
,
double
jac
[
3
][
3
]);
inline
double
getJacobian
(
double
u
,
double
v
,
double
w
,
fullMatrix
<
double
>
&
j
){
inline
double
getJacobian
(
double
u
,
double
v
,
double
w
,
fullMatrix
<
double
>
&
j
){
double
JAC
[
3
][
3
];
double
JAC
[
3
][
3
];
const
double
detJ
=
getJacobian
(
u
,
v
,
w
,
JAC
);
const
double
detJ
=
getJacobian
(
u
,
v
,
w
,
JAC
);
...
@@ -253,7 +257,7 @@ class MElement
...
@@ -253,7 +257,7 @@ class MElement
}
}
return
detJ
;
return
detJ
;
}
}
double
getPrimaryJacobian
(
double
u
,
double
v
,
double
w
,
double
jac
[
3
][
3
]);
virtual
double
getPrimaryJacobian
(
double
u
,
double
v
,
double
w
,
double
jac
[
3
][
3
]);
double
getJacobianDeterminant
(
double
u
,
double
v
,
double
w
)
double
getJacobianDeterminant
(
double
u
,
double
v
,
double
w
)
{
{
double
jac
[
3
][
3
];
return
getJacobian
(
u
,
v
,
w
,
jac
);
double
jac
[
3
][
3
];
return
getJacobian
(
u
,
v
,
w
,
jac
);
...
...
This diff is collapsed.
Click to expand it.
Geo/MSubElement.cpp
+
612
−
108
View file @
48b43a53
This diff is collapsed.
Click to expand it.
Geo/MSubElement.h
+
130
−
32
View file @
48b43a53
...
@@ -23,22 +23,43 @@ class MSubTetrahedron : public MTetrahedron
...
@@ -23,22 +23,43 @@ class MSubTetrahedron : public MTetrahedron
bool
_owner
;
bool
_owner
;
MElement
*
_orig
;
MElement
*
_orig
;
std
::
vector
<
MElement
*>
_parents
;
std
::
vector
<
MElement
*>
_parents
;
IntPt
*
_intpt
;
mutable
MElement
*
_base
;
int
_pOrder
;
int
_npts
;
IntPt
*
_pts
;
public:
public:
MSubTetrahedron
(
MVertex
*
v0
,
MVertex
*
v1
,
MVertex
*
v2
,
MVertex
*
v3
,
int
num
=
0
,
MSubTetrahedron
(
MVertex
*
v0
,
MVertex
*
v1
,
MVertex
*
v2
,
MVertex
*
v3
,
int
num
=
0
,
int
part
=
0
,
int
part
=
0
,
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
:
MTetrahedron
(
v0
,
v1
,
v2
,
v3
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_
int
pt
(
0
)
{}
:
MTetrahedron
(
v0
,
v1
,
v2
,
v3
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_
base
(
0
),
_pOrder
(
-
1
),
_npts
(
0
),
_
pt
s
(
0
)
{}
MSubTetrahedron
(
std
::
vector
<
MVertex
*>
v
,
int
num
=
0
,
int
part
=
0
,
bool
owner
=
false
,
MSubTetrahedron
(
std
::
vector
<
MVertex
*>
v
,
int
num
=
0
,
int
part
=
0
,
MElement
*
orig
=
NULL
)
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
:
MTetrahedron
(
v
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_
int
pt
(
0
)
{}
:
MTetrahedron
(
v
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_
base
(
0
),
_pOrder
(
-
1
),
_npts
(
0
),
_
pt
s
(
0
)
{}
MSubTetrahedron
(
const
MTetrahedron
&
tet
,
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
MSubTetrahedron
(
const
MTetrahedron
&
tet
,
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
:
MTetrahedron
(
tet
),
_owner
(
owner
),
_orig
(
orig
),
_intpt
(
0
)
{}
:
MTetrahedron
(
tet
),
_owner
(
owner
),
_orig
(
orig
),
_base
(
0
),
_pOrder
(
-
1
),
_npts
(
0
),
_pts
(
0
)
{}
~
MSubTetrahedron
();
~
MSubTetrahedron
();
virtual
int
getTypeForMSH
()
const
{
return
MSH_TET_SUB
;
}
virtual
int
getTypeForMSH
()
const
{
return
MSH_TET_SUB
;
}
virtual
const
nodalBasis
*
getFunctionSpace
(
int
order
=-
1
)
const
;
virtual
const
JacobianBasis
*
getJacobianFuncSpace
(
int
order
=-
1
)
const
;
// the parametric coordinates are the coordinates in the local parent element
// the parametric coordinates are the coordinates in the local parent element
virtual
void
getShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[],
int
order
=-
1
);
virtual
void
getGradShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[][
3
],
int
order
=-
1
);
virtual
void
getHessShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[][
3
][
3
],
int
order
=-
1
);
virtual
void
getThirdDerivativeShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[][
3
][
3
][
3
],
int
order
=-
1
);
virtual
double
getJacobian
(
const
fullMatrix
<
double
>
&
gsf
,
double
jac
[
3
][
3
]);
virtual
double
getJacobian
(
const
std
::
vector
<
SVector3
>
&
gsf
,
double
jac
[
3
][
3
]);
virtual
double
getJacobian
(
double
u
,
double
v
,
double
w
,
double
jac
[
3
][
3
]);
virtual
double
getPrimaryJacobian
(
double
u
,
double
v
,
double
w
,
double
jac
[
3
][
3
]);
virtual
int
getNumShapeFunctions
();
virtual
int
getNumPrimaryShapeFunctions
();
virtual
MVertex
*
getShapeFunctionNode
(
int
i
);
virtual
void
movePointFromParentSpaceToElementSpace
(
double
&
u
,
double
&
v
,
double
&
w
);
virtual
void
movePointFromElementSpaceToParentSpace
(
double
&
u
,
double
&
v
,
double
&
w
);
virtual
bool
isInside
(
double
u
,
double
v
,
double
w
);
virtual
bool
isInside
(
double
u
,
double
v
,
double
w
);
virtual
void
getIntegrationPoints
(
int
pOrder
,
int
*
npts
,
IntPt
**
pts
);
virtual
void
getIntegrationPoints
(
int
pOrder
,
int
*
npts
,
IntPt
**
pts
);
virtual
MElement
*
getParent
()
const
{
return
_orig
;
}
virtual
MElement
*
getParent
()
const
{
return
_orig
;
}
virtual
void
setParent
(
MElement
*
p
,
bool
owner
=
false
)
{
_orig
=
p
;
_owner
=
owner
;
}
virtual
void
setParent
(
MElement
*
p
,
bool
owner
=
false
)
{
_orig
=
p
;
_owner
=
owner
;
}
virtual
bool
ownsParent
()
const
{
return
_owner
;
}
virtual
bool
ownsParent
()
const
{
return
_owner
;
}
...
@@ -47,6 +68,9 @@ class MSubTetrahedron : public MTetrahedron
...
@@ -47,6 +68,9 @@ class MSubTetrahedron : public MTetrahedron
{
{
_parents
=
parents
;
_orig
=
_parents
[
0
];
_owner
=
owner
;
_parents
=
parents
;
_orig
=
_parents
[
0
];
_owner
=
owner
;
}
}
virtual
const
MElement
*
getBaseElement
()
const
{
if
(
!
_base
)
_base
=
new
MTetrahedron
(
*
this
);
return
_base
;}
virtual
MElement
*
getBaseElement
()
{
if
(
!
_base
)
_base
=
new
MTetrahedron
(
*
this
);
return
_base
;}
};
};
// A sub triangle, contained in another element
// A sub triangle, contained in another element
...
@@ -56,21 +80,43 @@ class MSubTriangle : public MTriangle
...
@@ -56,21 +80,43 @@ class MSubTriangle : public MTriangle
bool
_owner
;
bool
_owner
;
MElement
*
_orig
;
MElement
*
_orig
;
std
::
vector
<
MElement
*>
_parents
;
std
::
vector
<
MElement
*>
_parents
;
IntPt
*
_intpt
;
mutable
MElement
*
_base
;
int
_pOrder
;
int
_npts
;
IntPt
*
_pts
;
public:
public:
MSubTriangle
(
MVertex
*
v0
,
MVertex
*
v1
,
MVertex
*
v2
,
int
num
=
0
,
int
part
=
0
,
MSubTriangle
(
MVertex
*
v0
,
MVertex
*
v1
,
MVertex
*
v2
,
int
num
=
0
,
int
part
=
0
,
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
:
MTriangle
(
v0
,
v1
,
v2
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_
int
pt
(
0
)
{}
:
MTriangle
(
v0
,
v1
,
v2
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_
base
(
0
),
_pOrder
(
-
1
),
_npts
(
0
),
_
pt
s
(
0
)
{}
MSubTriangle
(
std
::
vector
<
MVertex
*>
v
,
int
num
=
0
,
int
part
=
0
,
bool
owner
=
false
,
MSubTriangle
(
std
::
vector
<
MVertex
*>
v
,
int
num
=
0
,
int
part
=
0
,
MElement
*
orig
=
NULL
)
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
:
MTriangle
(
v
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_
int
pt
(
0
)
{}
:
MTriangle
(
v
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_
base
(
0
),
_pOrder
(
-
1
),
_npts
(
0
),
_
pt
s
(
0
)
{}
MSubTriangle
(
const
MTriangle
&
tri
,
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
MSubTriangle
(
const
MTriangle
&
tri
,
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
:
MTriangle
(
tri
),
_owner
(
owner
),
_orig
(
orig
),
_
int
pt
(
0
)
{}
:
MTriangle
(
tri
),
_owner
(
owner
),
_orig
(
orig
),
_
base
(
0
),
_pOrder
(
-
1
),
_npts
(
0
),
_
pt
s
(
0
)
{}
~
MSubTriangle
();
~
MSubTriangle
();
virtual
int
getTypeForMSH
()
const
{
return
MSH_TRI_SUB
;
}
virtual
int
getTypeForMSH
()
const
{
return
MSH_TRI_SUB
;
}
virtual
const
nodalBasis
*
getFunctionSpace
(
int
order
=-
1
)
const
;
virtual
const
JacobianBasis
*
getJacobianFuncSpace
(
int
order
=-
1
)
const
;
// the parametric coordinates are the coordinates in the local parent element
// the parametric coordinates are the coordinates in the local parent element
virtual
void
getShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[],
int
order
=-
1
);
virtual
void
getGradShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[][
3
],
int
order
=-
1
);
virtual
void
getHessShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[][
3
][
3
],
int
order
=-
1
);
virtual
void
getThirdDerivativeShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[][
3
][
3
][
3
],
int
order
=-
1
);
virtual
double
getJacobian
(
const
fullMatrix
<
double
>
&
gsf
,
double
jac
[
3
][
3
]);
virtual
double
getJacobian
(
const
std
::
vector
<
SVector3
>
&
gsf
,
double
jac
[
3
][
3
]);
virtual
double
getJacobian
(
double
u
,
double
v
,
double
w
,
double
jac
[
3
][
3
]);
virtual
double
getPrimaryJacobian
(
double
u
,
double
v
,
double
w
,
double
jac
[
3
][
3
]);
virtual
int
getNumShapeFunctions
();
virtual
int
getNumPrimaryShapeFunctions
();
virtual
MVertex
*
getShapeFunctionNode
(
int
i
);
virtual
void
movePointFromParentSpaceToElementSpace
(
double
&
u
,
double
&
v
,
double
&
w
);
virtual
void
movePointFromElementSpaceToParentSpace
(
double
&
u
,
double
&
v
,
double
&
w
);
virtual
bool
isInside
(
double
u
,
double
v
,
double
w
);
virtual
bool
isInside
(
double
u
,
double
v
,
double
w
);
virtual
void
getIntegrationPoints
(
int
pOrder
,
int
*
npts
,
IntPt
**
pts
);
virtual
void
getIntegrationPoints
(
int
pOrder
,
int
*
npts
,
IntPt
**
pts
);
virtual
MElement
*
getParent
()
const
{
return
_orig
;
}
virtual
MElement
*
getParent
()
const
{
return
_orig
;
}
virtual
void
setParent
(
MElement
*
p
,
bool
owner
=
false
)
{
_orig
=
p
;
_owner
=
owner
;
}
virtual
void
setParent
(
MElement
*
p
,
bool
owner
=
false
)
{
_orig
=
p
;
_owner
=
owner
;
}
virtual
bool
ownsParent
()
const
{
return
_owner
;
}
virtual
bool
ownsParent
()
const
{
return
_owner
;
}
...
@@ -79,6 +125,9 @@ class MSubTriangle : public MTriangle
...
@@ -79,6 +125,9 @@ class MSubTriangle : public MTriangle
{
{
_parents
=
parents
;
_orig
=
_parents
[
0
];
_owner
=
owner
;
_parents
=
parents
;
_orig
=
_parents
[
0
];
_owner
=
owner
;
}
}
virtual
const
MElement
*
getBaseElement
()
const
{
if
(
!
_base
)
_base
=
new
MTriangle
(
*
this
);
return
_base
;}
virtual
MElement
*
getBaseElement
()
{
if
(
!
_base
)
_base
=
new
MTriangle
(
*
this
);
return
_base
;}
};
};
// A sub line, contained in another element
// A sub line, contained in another element
...
@@ -88,22 +137,43 @@ class MSubLine : public MLine
...
@@ -88,22 +137,43 @@ class MSubLine : public MLine
bool
_owner
;
bool
_owner
;
MElement
*
_orig
;
MElement
*
_orig
;
std
::
vector
<
MElement
*>
_parents
;
std
::
vector
<
MElement
*>
_parents
;
IntPt
*
_intpt
;
mutable
MElement
*
_base
;
int
_pOrder
;
int
_npts
;
IntPt
*
_pts
;
public:
public:
MSubLine
(
MVertex
*
v0
,
MVertex
*
v1
,
int
num
=
0
,
int
part
=
0
,
bool
owner
=
false
,
MSubLine
(
MVertex
*
v0
,
MVertex
*
v1
,
int
num
=
0
,
int
part
=
0
,
MElement
*
orig
=
NULL
)
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
:
MLine
(
v0
,
v1
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_
int
pt
(
0
)
{}
:
MLine
(
v0
,
v1
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_
base
(
0
),
_pOrder
(
-
1
),
_npts
(
0
),
_
pt
s
(
0
)
{}
MSubLine
(
std
::
vector
<
MVertex
*>
v
,
int
num
=
0
,
int
part
=
0
,
bool
owner
=
false
,
MSubLine
(
std
::
vector
<
MVertex
*>
v
,
int
num
=
0
,
int
part
=
0
,
MElement
*
orig
=
NULL
)
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
:
MLine
(
v
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_
int
pt
(
0
)
{}
:
MLine
(
v
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_
base
(
0
),
_pOrder
(
-
1
),
_npts
(
0
),
_
pt
s
(
0
)
{}
MSubLine
(
const
MLine
&
lin
,
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
MSubLine
(
const
MLine
&
lin
,
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
:
MLine
(
lin
),
_owner
(
owner
),
_orig
(
orig
),
_intpt
(
0
)
{}
:
MLine
(
lin
),
_owner
(
owner
),
_orig
(
orig
),
_base
(
0
),
_pOrder
(
-
1
),
_npts
(
0
),
_pts
(
0
)
{}
~
MSubLine
();
~
MSubLine
();
virtual
int
getTypeForMSH
()
const
{
return
MSH_LIN_SUB
;
}
virtual
int
getTypeForMSH
()
const
{
return
MSH_LIN_SUB
;
}
virtual
const
nodalBasis
*
getFunctionSpace
(
int
order
=-
1
)
const
;
virtual
const
JacobianBasis
*
getJacobianFuncSpace
(
int
order
=-
1
)
const
;
// the parametric coordinates are the coordinates in the local parent element
// the parametric coordinates are the coordinates in the local parent element
virtual
void
getShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[],
int
order
=-
1
);
virtual
void
getGradShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[][
3
],
int
order
=-
1
);
virtual
void
getHessShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[][
3
][
3
],
int
order
=-
1
);
virtual
void
getThirdDerivativeShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[][
3
][
3
][
3
],
int
order
=-
1
);
virtual
double
getJacobian
(
const
fullMatrix
<
double
>
&
gsf
,
double
jac
[
3
][
3
]);
virtual
double
getJacobian
(
const
std
::
vector
<
SVector3
>
&
gsf
,
double
jac
[
3
][
3
]);
virtual
double
getJacobian
(
double
u
,
double
v
,
double
w
,
double
jac
[
3
][
3
]);
virtual
double
getPrimaryJacobian
(
double
u
,
double
v
,
double
w
,
double
jac
[
3
][
3
]);
virtual
int
getNumShapeFunctions
();
virtual
int
getNumPrimaryShapeFunctions
();
virtual
MVertex
*
getShapeFunctionNode
(
int
i
);
virtual
void
movePointFromParentSpaceToElementSpace
(
double
&
u
,
double
&
v
,
double
&
w
);
virtual
void
movePointFromElementSpaceToParentSpace
(
double
&
u
,
double
&
v
,
double
&
w
);
virtual
bool
isInside
(
double
u
,
double
v
,
double
w
);
virtual
bool
isInside
(
double
u
,
double
v
,
double
w
);
virtual
void
getIntegrationPoints
(
int
pOrder
,
int
*
npts
,
IntPt
**
pts
);
virtual
void
getIntegrationPoints
(
int
pOrder
,
int
*
npts
,
IntPt
**
pts
);
virtual
MElement
*
getParent
()
const
{
return
_orig
;
}
virtual
MElement
*
getParent
()
const
{
return
_orig
;
}
virtual
void
setParent
(
MElement
*
p
,
bool
owner
=
false
)
{
_orig
=
p
;
_owner
=
owner
;
}
virtual
void
setParent
(
MElement
*
p
,
bool
owner
=
false
)
{
_orig
=
p
;
_owner
=
owner
;
}
virtual
bool
ownsParent
()
const
{
return
_owner
;
}
virtual
bool
ownsParent
()
const
{
return
_owner
;
}
...
@@ -112,6 +182,9 @@ class MSubLine : public MLine
...
@@ -112,6 +182,9 @@ class MSubLine : public MLine
{
{
_parents
=
parents
;
_orig
=
_parents
[
0
];
_owner
=
owner
;
_parents
=
parents
;
_orig
=
_parents
[
0
];
_owner
=
owner
;
}
}
virtual
const
MElement
*
getBaseElement
()
const
{
if
(
!
_base
)
_base
=
new
MLine
(
*
this
);
return
_base
;}
virtual
MElement
*
getBaseElement
()
{
if
(
!
_base
)
_base
=
new
MLine
(
*
this
);
return
_base
;}
};
};
// A sub point, contained in another element
// A sub point, contained in another element
...
@@ -121,21 +194,43 @@ class MSubPoint : public MPoint
...
@@ -121,21 +194,43 @@ class MSubPoint : public MPoint
bool
_owner
;
bool
_owner
;
MElement
*
_orig
;
MElement
*
_orig
;
std
::
vector
<
MElement
*>
_parents
;
std
::
vector
<
MElement
*>
_parents
;
IntPt
*
_intpt
;
mutable
MElement
*
_base
;
int
_pOrder
;
int
_npts
;
IntPt
*
_pts
;
public:
public:
MSubPoint
(
MVertex
*
v0
,
int
num
=
0
,
int
part
=
0
,
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
MSubPoint
(
MVertex
*
v0
,
int
num
=
0
,
int
part
=
0
,
:
MPoint
(
v0
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_intpt
(
0
)
{}
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
MSubPoint
(
std
::
vector
<
MVertex
*>
v
,
int
num
=
0
,
int
part
=
0
,
bool
owner
=
false
,
:
MPoint
(
v0
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_base
(
0
),
_pOrder
(
-
1
),
_npts
(
0
),
_pts
(
0
)
{}
MElement
*
orig
=
NULL
)
MSubPoint
(
std
::
vector
<
MVertex
*>
v
,
int
num
=
0
,
int
part
=
0
,
:
MPoint
(
v
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_intpt
(
0
)
{}
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
:
MPoint
(
v
,
num
,
part
),
_owner
(
owner
),
_orig
(
orig
),
_base
(
0
),
_pOrder
(
-
1
),
_npts
(
0
),
_pts
(
0
)
{}
MSubPoint
(
const
MPoint
&
pt
,
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
MSubPoint
(
const
MPoint
&
pt
,
bool
owner
=
false
,
MElement
*
orig
=
NULL
)
:
MPoint
(
pt
),
_owner
(
owner
),
_orig
(
orig
),
_intpt
(
0
)
{}
:
MPoint
(
pt
),
_owner
(
owner
),
_orig
(
orig
),
_base
(
0
),
_pOrder
(
-
1
),
_npts
(
0
),
_pts
(
0
)
{}
~
MSubPoint
();
~
MSubPoint
();
virtual
int
getTypeForMSH
()
const
{
return
MSH_PNT_SUB
;
}
virtual
int
getTypeForMSH
()
const
{
return
MSH_PNT_SUB
;
}
virtual
const
nodalBasis
*
getFunctionSpace
(
int
order
=-
1
)
const
;
virtual
const
JacobianBasis
*
getJacobianFuncSpace
(
int
order
=-
1
)
const
;
// the parametric coordinates are the coordinates in the local parent element
// the parametric coordinates are the coordinates in the local parent element
virtual
void
getShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[],
int
order
=-
1
);
virtual
void
getGradShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[][
3
],
int
order
=-
1
);
virtual
void
getHessShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[][
3
][
3
],
int
order
=-
1
);
virtual
void
getThirdDerivativeShapeFunctions
(
double
u
,
double
v
,
double
w
,
double
s
[][
3
][
3
][
3
],
int
order
=-
1
);
virtual
double
getJacobian
(
const
fullMatrix
<
double
>
&
gsf
,
double
jac
[
3
][
3
]);
virtual
double
getJacobian
(
const
std
::
vector
<
SVector3
>
&
gsf
,
double
jac
[
3
][
3
]);
virtual
double
getJacobian
(
double
u
,
double
v
,
double
w
,
double
jac
[
3
][
3
]);
virtual
double
getPrimaryJacobian
(
double
u
,
double
v
,
double
w
,
double
jac
[
3
][
3
]);
virtual
int
getNumShapeFunctions
();
virtual
int
getNumPrimaryShapeFunctions
();
virtual
MVertex
*
getShapeFunctionNode
(
int
i
);
virtual
void
movePointFromParentSpaceToElementSpace
(
double
&
u
,
double
&
v
,
double
&
w
);
virtual
void
movePointFromElementSpaceToParentSpace
(
double
&
u
,
double
&
v
,
double
&
w
);
virtual
bool
isInside
(
double
u
,
double
v
,
double
w
);
virtual
bool
isInside
(
double
u
,
double
v
,
double
w
);
virtual
void
getIntegrationPoints
(
int
pOrder
,
int
*
npts
,
IntPt
**
pts
);
virtual
void
getIntegrationPoints
(
int
pOrder
,
int
*
npts
,
IntPt
**
pts
);
virtual
MElement
*
getParent
()
const
{
return
_orig
;
}
virtual
MElement
*
getParent
()
const
{
return
_orig
;
}
virtual
void
setParent
(
MElement
*
p
,
bool
owner
=
false
)
{
_orig
=
p
;
_owner
=
owner
;
}
virtual
void
setParent
(
MElement
*
p
,
bool
owner
=
false
)
{
_orig
=
p
;
_owner
=
owner
;
}
virtual
bool
ownsParent
()
const
{
return
_owner
;
}
virtual
bool
ownsParent
()
const
{
return
_owner
;
}
...
@@ -144,6 +239,9 @@ class MSubPoint : public MPoint
...
@@ -144,6 +239,9 @@ class MSubPoint : public MPoint
{
{
_parents
=
parents
;
_orig
=
_parents
[
0
];
_owner
=
owner
;
_parents
=
parents
;
_orig
=
_parents
[
0
];
_owner
=
owner
;
}
}
virtual
const
MElement
*
getBaseElement
()
const
{
if
(
!
_base
)
_base
=
new
MPoint
(
*
this
);
return
_base
;}
virtual
MElement
*
getBaseElement
()
{
if
(
!
_base
)
_base
=
new
MPoint
(
*
this
);
return
_base
;}
};
};
#endif
#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