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
Package registry
Model registry
Operate
Terraform modules
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
Romin Tomasetti
gmsh
Commits
93677b55
Commit
93677b55
authored
7 years ago
by
Christophe Geuzaine
Browse files
Options
Downloads
Patches
Plain Diff
removed Rbf code
parent
a1c0a020
No related branches found
No related tags found
No related merge requests found
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
Geo/CMakeLists.txt
+4
-7
4 additions, 7 deletions
Geo/CMakeLists.txt
Geo/GRbf.cpp
+0
-1269
0 additions, 1269 deletions
Geo/GRbf.cpp
Geo/GRbf.h
+0
-183
0 additions, 183 deletions
Geo/GRbf.h
Geo/gmshLevelset.cpp
+0
-1
0 additions, 1 deletion
Geo/gmshLevelset.cpp
with
4 additions
and
1460 deletions
Geo/CMakeLists.txt
+
4
−
7
View file @
93677b55
...
...
@@ -10,16 +10,13 @@ set(SRC
GEntity.cpp STensor3.cpp
GVertex.cpp GEdge.cpp GFace.cpp GRegion.cpp
GEdgeLoop.cpp
GRbf.cpp
gmshVertex.cpp gmshEdge.cpp gmshFace.cpp gmshRegion.cpp
gmshSurface.cpp
OCCVertex.cpp OCCEdge.cpp OCCFace.cpp OCCRegion.cpp
GenericVertex.cpp GenericEdge.cpp GenericFace.cpp GenericRegion.cpp
discreteEdge.cpp discreteFace.cpp discreteDiskFace.cpp discreteRegion.cpp
fourierEdge.cpp fourierFace.cpp fourierProjectionFace.cpp
ACISVertex.cpp
ACISEdge.cpp
ACISFace.cpp
ACISVertex.cpp ACISEdge.cpp ACISFace.cpp
GModel.cpp
GModelCreateTopologyFromMesh.cpp
GModelVertexArrays.cpp
...
...
This diff is collapsed.
Click to expand it.
Geo/GRbf.cpp
deleted
100644 → 0
+
0
−
1269
View file @
a1c0a020
This diff is collapsed.
Click to expand it.
Geo/GRbf.h
deleted
100644 → 0
+
0
−
183
View file @
a1c0a020
// Gmsh - Copyright (C) 1997-2017 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@onelab.info>.
//
// Contributed by FIXME
#ifndef _RBF_H_
#define _RBF_H_
#include
<math.h>
#include
<vector>
#include
"fullMatrix.h"
#include
"SPoint3.h"
#include
"SVector3.h"
#include
"MVertex.h"
#include
"Context.h"
template
<
class
t
>
class
linearSystem
;
#if defined(HAVE_ANN)
class
ANNkd_tree
;
#endif
class
Sphere
{
public:
int
index
;
SPoint3
center
;
double
radius
;
};
class
GRbf
{
std
::
map
<
MVertex
*
,
int
>
_mapV
;
std
::
map
<
MVertex
*
,
int
>
_mapAllV
;
std
::
map
<
int
,
std
::
vector
<
int
>
>
nodesInSphere
;
fullMatrix
<
double
>
matA
,
matAInv
;
fullMatrix
<
double
>
matA_nn
,
matAInv_nn
;
int
nbNodes
;
//initial nodes
bool
isLocal
;
int
_inUV
;
double
delta
;
//offset level set
double
deltaUV
;
//offset level set
double
radius
;
double
sBox
;
SVector3
lastDXDU
,
lastDXDV
;
double
lastX
,
lastY
,
lastZ
,
lastU
,
lastV
;
int
radialFunctionIndex
;
// Index for the radial function used (0 - GA,1 - MQ, ... )
std
::
set
<
MVertex
*>
myNodes
;
//Used mesh vertices for light rbf
fullMatrix
<
double
>
centers
;
// Data centers (without duplicates)
fullMatrix
<
double
>
allCenters
;
// Data centers
fullMatrix
<
double
>
normals
;
// Data normals(without Duplicates)
fullMatrix
<
double
>
surfInterp
;
//level set
fullMatrix
<
double
>
extendedX
;
//X values extend in and out
fullMatrix
<
double
>
UV
;
//solution harmonic map laplu=0 and laplV=0
#if defined (HAVE_ANN)
ANNkd_tree
*
XYZkdtree
;
ANNkd_tree
*
UVkdtree
;
#endif
public:
GRbf
(
double
sizeBox
,
int
variableEps
,
int
rbfFun
,
std
::
map
<
MVertex
*
,
SVector3
>
normals
,
std
::
set
<
MVertex
*>
allNodes
,
std
::
vector
<
MVertex
*>
bcNodes
,
bool
isLocal
=
false
);
~
GRbf
();
//build octree
void
buildOctree
(
double
radius
);
void
buildXYZkdtree
();
// Sets up the surface generation problem as suggested by Beatson et
// al. Introduction of 2 extra points per node. The function values
// at the nodes on the surface are set to 0 while the function
// values inside are set to -1 and outside to 1.
void
setup_level_set
(
const
fullMatrix
<
double
>
&
cntrs
,
const
fullMatrix
<
double
>
&
normals
,
fullMatrix
<
double
>
&
level_set_nodes
,
fullMatrix
<
double
>
&
level_set_funvals
);
// Evaluates the (p)th derivative of the radial function w.r.t. r^2 (not w.r.t. r)
// This is to avoid the introduction of removable singularities at r=0.
double
evalRadialFnDer
(
int
p
,
double
dx
,
double
dy
,
double
dz
,
double
ep
);
// Generates the RBF collocation matrix for data in d-dimensions, associated with the
//(p)th derivative of the radial function w.r.t. the (q)th variable
fullMatrix
<
double
>
generateRbfMat
(
int
p
,
const
fullMatrix
<
double
>
&
nodes1
,
const
fullMatrix
<
double
>
&
nodes2
);
// Computes the interpolation(p==0) or the derivative (p!=0)
// operator(mxn) (n:number of centers, m: number of evaluation
// nodes)
void
RbfOp
(
int
p
,
// (p)th derivatives
const
fullMatrix
<
double
>
&
cntrs
,
const
fullMatrix
<
double
>
&
nodes
,
fullMatrix
<
double
>
&
D
);
// Computes the interpolant(p==0) or the derivative (p!=0) of the
// function values entered and evaluates it at the new nodes
void
evalRbfDer
(
int
p
,
// (p)th derivatives
const
fullMatrix
<
double
>
&
cntrs
,
const
fullMatrix
<
double
>
&
nodes
,
const
fullMatrix
<
double
>
&
fValues
,
fullMatrix
<
double
>
&
fApprox
);
// Finds surface differentiation matrix using the LOCAL projection method
void
RbfLapSurface_local_projection
(
const
fullMatrix
<
double
>
&
cntrs
,
const
fullMatrix
<
double
>
&
normals
,
fullMatrix
<
double
>
&
Oper
);
// Finds global surface differentiation matrix using the projection method
void
RbfLapSurface_global_projection2
(
const
fullMatrix
<
double
>
&
cntrs
,
const
fullMatrix
<
double
>
&
normals
,
fullMatrix
<
double
>
&
Oper
);
// Finds global surface differentiation matrix using the projection method
void
RbfLapSurface_global_projection
(
const
fullMatrix
<
double
>
&
cntrs
,
const
fullMatrix
<
double
>
&
normals
,
fullMatrix
<
double
>
&
Oper
);
// Finds surface differentiation matrix (method CPML LOCAL)
void
RbfLapSurface_local_CPM
(
bool
isLow
,
const
fullMatrix
<
double
>
&
cntrs
,
const
fullMatrix
<
double
>
&
normals
,
fullMatrix
<
double
>
&
Oper
);
void
RbfLapSurface_local_CPM_sparse
(
std
::
vector
<
MVertex
*>
&
bndVertices
,
bool
isLow
,
const
fullMatrix
<
double
>
&
cntrs
,
const
fullMatrix
<
double
>
&
normals
,
linearSystem
<
double
>
&
sys
);
// Finds global surface differentiation matrix (method CPML)
void
RbfLapSurface_global_CPM_low
(
const
fullMatrix
<
double
>
&
cntrs
,
const
fullMatrix
<
double
>
&
normals
,
fullMatrix
<
double
>
&
D
);
// Finds global surface differentiation matrix (method CPMH)
void
RbfLapSurface_global_CPM_high
(
const
fullMatrix
<
double
>
&
cntrs
,
const
fullMatrix
<
double
>
&
normals
,
fullMatrix
<
double
>
&
D
);
// Second method that Finds global surface differentiation matrix (method CPMH)
void
RbfLapSurface_global_CPM_high_2
(
const
fullMatrix
<
double
>
&
cntrs
,
const
fullMatrix
<
double
>
&
normals
,
fullMatrix
<
double
>
&
D
);
// Calculates the curvature of a surface at centers
void
curvatureRBF
(
const
fullMatrix
<
double
>
&
cntrs
,
fullMatrix
<
double
>
&
curvature
);
void
computeCurvature
(
const
fullMatrix
<
double
>
&
cntrs
,
std
::
map
<
MVertex
*
,
double
>&
rbf_curv
);
void
computeLocalCurvature
(
const
fullMatrix
<
double
>
&
cntrs
,
std
::
map
<
MVertex
*
,
double
>&
rbf_curv
);
//Finds the U,V,S (in the 0-level set) that are the 'num_neighbours'
//closest to u_eval and v_eval. Thus in total, we're working with
//'3*num_neighbours' nodes Say that the vector 'index' gives us the
//indices of the closest points
bool
UVStoXYZ
(
const
double
u_eval
,
const
double
v_eval
,
double
&
XX
,
double
&
YY
,
double
&
ZZ
,
SVector3
&
dXdu
,
SVector3
&
dxdv
,
int
num_neighbours
=
100
);
void
solveHarmonicMap
(
fullMatrix
<
double
>
Oper
,
std
::
vector
<
MVertex
*>
ordered
,
std
::
vector
<
double
>
coords
,
std
::
map
<
MVertex
*
,
SPoint3
>
&
rbf_param
);
void
solveHarmonicMap_sparse
(
linearSystem
<
double
>
&
sys
,
int
numNodes
,
const
std
::
vector
<
MVertex
*>
&
ordered
,
const
std
::
vector
<
double
>
&
coords
,
std
::
map
<
MVertex
*
,
SPoint3
>
&
rbf_param
);
inline
const
fullMatrix
<
double
>
getUV
()
{
return
UV
;};
inline
const
fullMatrix
<
double
>
getXYZ
()
{
return
centers
;};
inline
const
fullMatrix
<
double
>
getN
()
{
return
normals
;};
};
#endif
This diff is collapsed.
Click to expand it.
Geo/gmshLevelset.cpp
+
0
−
1
View file @
93677b55
...
...
@@ -436,7 +436,6 @@ fullMatrix<double> gLevelsetPoints::generateRbfMat(int p, int index,
}
}
return
rbfMat
;
}
void
gLevelsetPoints
::
RbfOp
(
int
p
,
int
index
,
...
...
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