tambah komentar untuk doxygen

master
rifki sadikin 6 years ago
parent cb7d67c70d
commit 66446c6ce8
  1. 13
      example/PoissonSolver3DGPUTest.cpp
  2. 7
      example/PoissonSolver3DGPUTest.h
  3. 7
      kernel/PoissonSolver3DGPU.cu

@ -6,12 +6,12 @@
#include <ctime> #include <ctime>
#include "PoissonSolver3DGPUTest.h" #include "PoissonSolver3DGPUTest.h"
/// /// \file berkas PoissonSolver3DGPUTest.cpp berisi implementasi pengujian pustaka PoissonSolver3DCylindricalGPU
/// DoPoissonSolverExperiments
/// ///
/// dibuat oleh: Rifki Sadikin (rifki.sadikin@lipi.go.id) /// dibuat oleh: Rifki Sadikin (rifki.sadikin@lipi.go.id)
/// tanggal: 7 November 2018 /// tanggal: 7 November 2018
/// Lakukan eksperimen poisson solver
void DoPoissonSolverExperiment(const int kRows, const int kColumns, const int kPhiSlices, const int kIterations, const int kSymmetry) { void DoPoissonSolverExperiment(const int kRows, const int kColumns, const int kPhiSlices, const int kIterations, const int kSymmetry) {
@ -130,7 +130,7 @@ void DoPoissonSolverExperiment(const int kRows, const int kColumns, const int kP
// set init /// Inisisasi nilai volt dan charge
void InitVoltandCharge3D(float * VPotentialExact,float *VPotential,float * RhoCharge,const int kRows, const int kColumns,const int kPhiSlices,float gridSizeR,float gridSizeZ,float gridSizePhi) { void InitVoltandCharge3D(float * VPotentialExact,float *VPotential,float * RhoCharge,const int kRows, const int kColumns,const int kPhiSlices,float gridSizeR,float gridSizeZ,float gridSizePhi) {
//TFormula vTestFunction1("f1", "[0]*(x^4 - 338.0 *x^3 + 21250.75 * x^2)*cos([1]* y)^2*exp(-1* [2] * z^2)"); //TFormula vTestFunction1("f1", "[0]*(x^4 - 338.0 *x^3 + 21250.75 * x^2)*cos([1]* y)^2*exp(-1* [2] * z^2)");
@ -176,7 +176,7 @@ c = 1e-4;
} }
// /// analytic function untuk potensial
float TestFunction1PotentialEval(double a, double b, double c, float radius0,float phi0,float z0) { float TestFunction1PotentialEval(double a, double b, double c, float radius0,float phi0,float z0) {
//TFormula vTestFunction1("f1", "[0]*(x^4 - 338.0 *x^3 + 21250.75 * x^2)*cos([1]* y)^2*exp(-1* [2] * z^2)"); //TFormula vTestFunction1("f1", "[0]*(x^4 - 338.0 *x^3 + 21250.75 * x^2)*cos([1]* y)^2*exp(-1* [2] * z^2)");
@ -185,7 +185,8 @@ float TestFunction1PotentialEval(double a, double b, double c, float radius0,fl
return ret; return ret;
} }
//
/// analytic function untuk charge
float TestFunction1ChargeEval(double a, double b, double c, float radius0,float phi0,float z0) { float TestFunction1ChargeEval(double a, double b, double c, float radius0,float phi0,float z0) {
//TFormula rhoTestFunction1("ff1", "[0]*(((16.0 * x^2 - 9.0 * 338.0 * x + 4.0*21250.75) *cos([1] * y)^2 * exp(-1 *[2]*z^2)) - ((x^2 - 338.0 * x + 21250.75) * 2 * [1]^2 * cos(2 * [1] * y) * exp(-1 *[2]*z^2)) + ((x^4 - 338.0 * x^3 + 21250.75 * x^2) * cos([1] * y)^2 * (4*[2]^2*z^2 - 2 * [2]) * exp(-1 *[2]*z^2)))"); //TFormula rhoTestFunction1("ff1", "[0]*(((16.0 * x^2 - 9.0 * 338.0 * x + 4.0*21250.75) *cos([1] * y)^2 * exp(-1 *[2]*z^2)) - ((x^2 - 338.0 * x + 21250.75) * 2 * [1]^2 * cos(2 * [1] * y) * exp(-1 *[2]*z^2)) + ((x^4 - 338.0 * x^3 + 21250.75 * x^2) * cos([1] * y)^2 * (4*[2]^2*z^2 - 2 * [2]) * exp(-1 *[2]*z^2)))");
@ -195,7 +196,7 @@ float TestFunction1ChargeEval(double a, double b, double c, float radius0,float
} }
// testing // fungsi main untuk test
int main() { int main() {

@ -1,3 +1,10 @@
/// \file PoissonSolver3DGPUTEst.h
/// \brief Berkas ini berisi definisi fungs untuk memakai pustaka libPoissonSolver3DCylindrialGPU.so
///
/// \author Rifki Sadikin <rifki.sadikin@lipi.go.id>, Pusat Penelitian Informatika, Lembaga Ilmu Pengetahuan Indonesia
/// \author I Wayan Aditya Swardiana <i.wayan.aditya.swardiana@lipi.go.id>, Pusat Penelitian Informatika, Lembaga Ilmu Pengetahuan Indonesia
/// \date November 8, 2018
#ifndef POISSONSOLVERGPU3DGPUTEST_H #ifndef POISSONSOLVERGPU3DGPUTEST_H
#define POISSONSOLVERGPU3DGPUTEST_H #define POISSONSOLVERGPU3DGPUTEST_H

@ -17,6 +17,13 @@
* provided "as is" without express or implied warranty. * * provided "as is" without express or implied warranty. *
**************************************************************************/ **************************************************************************/
/// \file PoissonSolver3DGPU.cu
/// \brief Berkas ini berisi implementasi kernel dalam cuda untuk PoissonSolver Cylindrical berbasis Multigrid
///
/// \author Rifki Sadikin <rifki.sadikin@lipi.go.id>, Pusat Penelitian Informatika, Lembaga Ilmu Pengetahuan Indonesia
/// \author I Wayan Aditya Swardiana <i.wayan.aditya.swardiana@lipi.go.id>, Pusat Penelitian Informatika, Lembaga Ilmu Pengetahuan Indonesia
/// \date November 8, 2018
#include "PoissonSolver3DGPU.h" #include "PoissonSolver3DGPU.h"
#include <cuda.h> #include <cuda.h>
#include <math.h> #include <math.h>

Loading…
Cancel
Save