Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
ScalFMM
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
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
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
solverstack
ScalFMM
Commits
d5359227
Commit
d5359227
authored
10 years ago
by
PIACIBELLO Cyrille
Browse files
Options
Downloads
Patches
Plain Diff
PAI Cmake modified, and header for old api c removed
parent
c021c2d9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Addons/CKernelApi/CMakeLists.txt
+1
-1
1 addition, 1 deletion
Addons/CKernelApi/CMakeLists.txt
Addons/CKernelApi/Src/CKernelApi.h
+0
-102
0 additions, 102 deletions
Addons/CKernelApi/Src/CKernelApi.h
Addons/CKernelApi/Src/CScalfmmApi.h
+8
-0
8 additions, 0 deletions
Addons/CKernelApi/Src/CScalfmmApi.h
with
9 additions
and
103 deletions
Addons/CKernelApi/CMakeLists.txt
+
1
−
1
View file @
d5359227
...
@@ -40,7 +40,7 @@ if(SCALFMM_ADDON_CKERNELAPI)
...
@@ -40,7 +40,7 @@ if(SCALFMM_ADDON_CKERNELAPI)
# Install header
# Install header
SET
(
my_include_dirs
"Src"
)
SET
(
my_include_dirs
"Src"
)
file
(
GLOB hpp_in_dir Src/*.hpp
)
file
(
GLOB hpp_in_dir Src/*.hpp
Src/*.h
)
INSTALL
(
FILES
${
hpp_in_dir
}
DESTINATION include/ScalFmm/CKernelApi
)
INSTALL
(
FILES
${
hpp_in_dir
}
DESTINATION include/ScalFmm/CKernelApi
)
file
(
GLOB_RECURSE source_tests_files Tests/*.c
)
file
(
GLOB_RECURSE source_tests_files Tests/*.c
)
...
...
This diff is collapsed.
Click to expand it.
Addons/CKernelApi/Src/CKernelApi.h
deleted
100644 → 0
+
0
−
102
View file @
c021c2d9
// ===================================================================================
// Copyright ScalFmm 2014 I
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info".
// "http://www.gnu.org/licenses".
// ===================================================================================
//
#ifndef CKERNELAPI_H
#define CKERNELAPI_H
/**
* This file defines the API for the USER.
* We briefly comment all the functions.
* The objective of the C Kernel API is to give a quick and easy way
* to anyone (who can program in C) to implement a kernel.
* Using C++ is advised but this is a simple alternative.
*/
///////////////////////////////////////////////////////////////////////////
/// Init part
///////////////////////////////////////////////////////////////////////////
//< For the user an handle is a void*
typedef
void
*
Scalfmm_Handle
;
//< Function to init the cells (should be given by the user when calling Scalfmm_init_cell)
//< it gives the level of the cell, its morton index, it position in term of box at that level
//< and the spatial position of its center
typedef
void
*
(
*
Callback_init_cell
)(
int
level
,
long
long
morton_index
,
int
*
tree_position
,
double
*
spatial_position
);
//< Function to destroy what have bee initialized by the user (should be give in Scalfmm_dealloc_handle)
typedef
void
(
*
Callback_free_cell
)(
void
*
);
//< This function init an handle (and an tree based on the given properties)
Scalfmm_Handle
Scalfmm_init_handle
(
int
treeHeight
,
double
boxWidth
,
double
*
boxCenter
);
//< This function should be used to dealloc our handle
void
Scalfmm_dealloc_handle
(
Scalfmm_Handle
handle
,
Callback_free_cell
cellDestroyer
);
//< This function should be used to insert an array of particle in the tree
//< The indexes are the one used on the particles operator
//< The position of the particles should be composed of one triple per particle:
//< xyzxyzxyz...
void
Scalfmm_insert_array_of_particles
(
Scalfmm_Handle
handle
,
FSize
nbParticles
,
int
*
particleIndexes
,
double
*
particleXYZ
);
//< To insert one particle only
void
Scalfmm_one_particle
(
Scalfmm_Handle
handle
,
int
particleIndexe
,
double
x
,
double
y
,
double
z
);
//< This function should be called to init the cells
//< It must be called after all the particles have been inserted!
void
Scalfmm_init_cell
(
Scalfmm_Handle
handle
,
Callback_init_cell
cellInitializer
);
///////////////////////////////////////////////////////////////////////////
/// Kernel part
///////////////////////////////////////////////////////////////////////////
//< These function are the callbacks of the FMM operators
typedef
void
(
*
Callback_P2M
)(
void
*
leafCell
,
FSize
nbParticles
,
const
int
*
particleIndexes
,
void
*
userData
);
typedef
void
(
*
Callback_M2M
)(
int
level
,
void
*
parentCell
,
int
childPosition
,
void
*
childCell
,
void
*
userData
);
typedef
void
(
*
Callback_M2L
)(
int
level
,
void
*
targetCell
,
int
sourceCellPosition
,
void
*
sourceCell
,
void
*
userData
);
typedef
void
(
*
Callback_L2L
)(
int
level
,
void
*
parentCell
,
int
childPosition
,
void
*
childCell
,
void
*
userData
);
typedef
void
(
*
Callback_L2P
)(
void
*
leafCell
,
FSize
nbParticles
,
int
*
particleIndexes
,
void
*
userData
);
typedef
void
(
*
Callback_P2P
)(
FSize
nbParticles
,
const
int
*
particleIndexes
,
int
nbSourceParticles
,
const
int
*
sourceParticleIndexes
,
void
*
userData
);
typedef
void
(
*
Callback_P2PInner
)(
FSize
nbParticles
,
int
*
particleIndexes
,
void
*
userData
);
//< This structure should be filled (or filled with null) to call the FMM
struct
Scalfmm_Kernel_Descriptor
{
Callback_P2M
p2m
;
Callback_M2M
m2m
;
Callback_M2L
m2l
;
Callback_L2L
l2l
;
Callback_L2P
l2p
;
Callback_P2P
p2p
;
Callback_P2PInner
p2pinner
;
};
//< Execute one FMM using the given kernel, the userData is the one given in all the operators as last
//< parameter.
void
Scalfmm_execute_kernel
(
Scalfmm_Handle
handle
,
struct
Scalfmm_Kernel_Descriptor
userKernel
,
void
*
userData
);
///////////////////////////////////////////////////////////////////////////
/// Util functions
///////////////////////////////////////////////////////////////////////////
//< This function fill the childFullPosition[3] with [-1;1] to know the position of a child relatively to
//< its position from its parent in term of halph box for this level
void
Scalfmm_utils_parentChildPosition
(
int
childPosition
,
int
*
childFullPosition
);
//< This function fill the childFullPosition[3] with [-3;3] to know the position of a interaction
//< cell relatively to its position from the target in term of box
void
Scalfmm_utils_interactionPosition
(
int
interactionPosition
,
int
*
srcPosition
);
#endif // CKERNELAPI_H
This diff is collapsed.
Click to expand it.
Addons/CKernelApi/Src/CScalfmmApi.h
+
8
−
0
View file @
d5359227
...
@@ -524,5 +524,13 @@ void scalfmm_dealloc_handle(scalfmm_handle handle, Callback_free_cell cellDestro
...
@@ -524,5 +524,13 @@ void scalfmm_dealloc_handle(scalfmm_handle handle, Callback_free_cell cellDestro
*/
*/
void
scalfmm_reset_tree
(
scalfmm_handle
handle
);
void
scalfmm_reset_tree
(
scalfmm_handle
handle
);
/**
* @brief This function shouldn't be there !! display information
* about the octree built versus the octree hibox want.
* @param Handle scalfmm_handle provided by scalfmm_init.
* @param Rinflu influence radius for each particle previously
* inserted. Tree must be built before calling this function
*/
void
scalfmm_hibox_Rinflu_display
(
scalfmm_handle
Handle
,
FSize
nbPart
,
double
*
Rinflu
);
#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