Utilities

Utilities#

UML diagram of Center, Int3Hash, LinearSystem, LinearSystem::CuData, Linsolver, Linsolver::Stepper, MFM, PoissonSystem, Tile, VoronoiTessellator.

@startuml
!theme vibrant
package Legend {
  class Class
  abstract class Abstract
  class Visibility {
    +public field
    +public method()
    -private field
    -private method()
    #protected method()
  }
  Class -[hidden]-> WeakDependency
  Abstract -[hidden]-> WeakDependency
  Visibility o-- Aggregation : Aggregation
  Visibility +.. Nested : Nested
  Visibility --> Dependency : Dependency
  Visibility ..> WeakDependency : Weak dependency
}
class "Center" as C_0002384270896976357959
class C_0002384270896976357959 {
__
+pos : real3
+ridx : unsigned int
}
class "Tile" as C_0014918082456004758218
class C_0014918082456004758218 {
__
+centers : std::vector<Center>
+pos : int3
}
class "Int3Hash" as C_0013722146795233890461
class C_0013722146795233890461 {
+operator()(const int3 & k) const : std::size_t
__
}
class "VoronoiTessellator" as C_0005483049785531173097
class C_0005483049785531173097 {
-Poisson(const real lambda) : int
-centersInTile(const int3 pos) : std::vector<Center>
+generate(const Grid grid, const real3 cellsize, const bool pbc, const bool make2D = false) : std::vector<unsigned int>
+getTileSize(const real3 griddims) const : real3
+periodicShift(const real3 coo, real3 center) : real3
+regionOf(const real3 coo) : unsigned int
-tileOfCell(const real3 coo) const : Tile
__
-centerIdx_ : std::function<unsigned int (real3)>
-distInt_ : std::uniform_int_distribution<>
-distReal_ : std::uniform_real_distribution<>
-engine_ : std::default_random_engine
-grainsize_ : real
-grid_dims_ : real3
-is2D_ : bool
-lambda_ : real
-numTiles_x : int
-numTiles_y : int
-numTiles_z : int
-pbc_ : bool
-seed_ : int
+tessellation : GpuBuffer<unsigned int>
-tileCache_ : std::unordered_map<int3,Tile,Int3Hash>
-tilesize_ : real3
}
class "PoissonSystem" as C_0015344774739314663014
class C_0015344774739314663014 {
-construct() const : LinearSystem
+init() : void
+solve() : Field
+solver() : LinSolver *
__
-magnet_ : const Ferromagnet *
-solver_ : LinSolver
}
class "LinearSystem" as C_0010566572544474238227
class C_0010566572544474238227 {
+operator=(const LinearSystem &) = default : LinearSystem &
+operator=(LinearSystem &&) = default : LinearSystem &
..
+cu() const : CuData
+empty() const : bool
+matrixmul(const GVec & x) const : GVec
+nRows() const : int
+residual(const GVec & x) const : GVec
__
-b_ : GVec
-matrixidx_ : GpuBuffer<int>
-matrixval_ : GVec
-nnz_ : int
}
class "LinearSystem::CuData" as C_0017651466972960482510
class C_0017651466972960482510 {
+matrixIdx(int row, int elem) : int &
+matrixVal(int row, int elem) : lsReal &
__
+b : lsReal *
+idx_ : int *
+nnz : int
+nrows : int
+val_ : lsReal *
}
class "LinSolver" as C_0007259496789364408165
class C_0007259496789364408165 {
{static} +getMethodByName(const std::string &) : Method
+getState() const : GVec
+resetState() : void
+residual() const : GVec
+residualMaxNorm() const : double
+setMethod(Method) : void
+setMethod(const std::string & methodName) : void
+setState(GVec newx) : void
+setSystem(LinearSystem newSystem) : void
+solve() : GVec
+stepper() : Stepper *
__
+max_iter : int
-stepper_ : std::unique_ptr<Stepper>
-system_ : LinearSystem
+tol : double
-x_ : GVec
}
abstract "LinSolver::Stepper" as C_0001652868625503698268
abstract C_0001652868625503698268 {
+Stepper(LinSolver * parent) : void
{static} +create(LinSolver * parent, Method) : std::unique_ptr<Stepper>
{abstract} +method() const = 0 : Method
+restart() : void
{abstract} +step() = 0 : void
#system() const : LinearSystem *
#xRef() const : GVec &
__
-parent_ : LinSolver *
}
class "MFM" as C_0017999676284232896070
class C_0017999676284232896070 {
+eval() const : Field
+name() const : std::string
+ncomp() const : int
+system() const : std::shared_ptr<const System>
+unit() const : std::string
__
+lift : real
-magnets_ : std::map<std::string,Magnet *>
-name_ : std::string
-system_ : std::shared_ptr<System>
+tipsize : real
}
C_0014918082456004758218 o-- C_0002384270896976357959 : +centers
C_0005483049785531173097 ..> C_0002384270896976357959
C_0005483049785531173097 o-- C_0014918082456004758218 : -tileCache_
C_0015344774739314663014 ..> C_0010566572544474238227
C_0015344774739314663014 o-- C_0007259496789364408165 : -solver_
C_0010566572544474238227 ..> C_0017651466972960482510
C_0017651466972960482510 --+ C_0010566572544474238227
C_0007259496789364408165 o-- C_0001652868625503698268 : -stepper_
C_0007259496789364408165 o-- C_0010566572544474238227 : -system_
C_0001652868625503698268 --+ C_0007259496789364408165
C_0001652868625503698268 ..> C_0010566572544474238227
C_0001652868625503698268 --> C_0007259496789364408165 : -parent_

'Generated with clang-uml, version 0.6.2
'LLVM version clang version 19.1.7 (https://github.com/conda-forge/clangdev-feedstock 3c5e7de432e909e225d8040e72a44724afb0c446)
@enduml