Feellgood
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
scal_fmm::fmm Class Reference

#include <fmm_demag.h>

Public Member Functions

 fmm (Mesh::mesh &msh, std::vector< Tetra::prm > &prmTet, std::vector< Facette::prm > &prmFac, const int ScalfmmNbThreads)
 
void calc_demag (Mesh::mesh &msh)
 

Public Attributes

std::vector< double > srcDen
 
std::vector< double > corr
 
std::vector< Tetra::prmprmTetra
 
std::vector< Facette::prmprmFacette
 

Private Member Functions

template<class T , const int NPI>
void insertCharges (std::vector< T > const &container, FSize &idx, Eigen::Ref< Eigen::Vector3d > const c)
 
void calc_charges (std::function< const Eigen::Vector3d(Nodes::Node)> getter, Mesh::mesh &msh)
 
void demag (std::function< const Eigen::Vector3d(Nodes::Node)> getter, std::function< void(Nodes::Node &, const double)> setter, Mesh::mesh &msh)
 

Private Attributes

const int NOD
 
OctreeClass tree
 
KernelClass kernels
 
double norm
 

Detailed Description

to initialize a tree and a kernel for the computation of the demagnetizing field, and launch the computation easily with calc_demag public member

Constructor & Destructor Documentation

◆ fmm()

scal_fmm::fmm::fmm ( Mesh::mesh msh,
std::vector< Tetra::prm > &  prmTet,
std::vector< Facette::prm > &  prmFac,
const int  ScalfmmNbThreads 
)
inline

constructor, initialize memory for tree, kernel, sources corrections, initialize all sources

Parameters
[in]msh
[in]prmTet
[in]prmFac
[in]ScalfmmNbThreads

Member Function Documentation

◆ calc_charges()

void scal_fmm::fmm::calc_charges ( std::function< const Eigen::Vector3d(Nodes::Node)>  getter,
Mesh::mesh msh 
)
inlineprivate

computes all charges from tetraedrons and facettes for the demag field to feed a tree in the fast multipole algo (scalfmm)

◆ calc_demag()

void scal_fmm::fmm::calc_demag ( Mesh::mesh msh)
inline

launch the calculation of the demag field with second order corrections

Parameters
[in]msh

◆ demag()

void scal_fmm::fmm::demag ( std::function< const Eigen::Vector3d(Nodes::Node)>  getter,
std::function< void(Nodes::Node &, const double)>  setter,
Mesh::mesh msh 
)
inlineprivate

computes the demag field, with (getter = u,setter = phi) or (getter = v,setter = phi_v)

◆ insertCharges()

template<class T , const int NPI>
void scal_fmm::fmm::insertCharges ( std::vector< T > const &  container,
FSize &  idx,
Eigen::Ref< Eigen::Vector3d > const  c 
)
inlineprivate

function template to insert volume or surface charges in tree for demag computation. class T is Tet or Fac, it must have getPtGauss() method, second template parameter is NPI of the namespace containing class T

Member Data Documentation

◆ corr

std::vector<double> scal_fmm::fmm::corr

corrections associated to the nodes, contributions only due to the facettes

◆ kernels

KernelClass scal_fmm::fmm::kernels
private

kernel initialized by constructor

◆ NOD

const int scal_fmm::fmm::NOD
private

number of nodes

◆ norm

double scal_fmm::fmm::norm
private

normalization coefficient

◆ prmFacette

std::vector<Facette::prm> scal_fmm::fmm::prmFacette

all surface region parameters for the facettes

◆ prmTetra

std::vector<Tetra::prm> scal_fmm::fmm::prmTetra

all volume region parameters for the tetraedrons

◆ srcDen

std::vector<double> scal_fmm::fmm::srcDen

sources

◆ tree

OctreeClass scal_fmm::fmm::tree
private

tree initialized by constructor


The documentation for this class was generated from the following file: