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< Triangle::prm > &prmTri, const int ScalfmmNbThreads)
 
void calc_demag (Mesh::mesh &msh)
 

Public Attributes

std::vector< double > corr
 
const std::vector< Tetra::prm > & prmTetra
 
const std::vector< Triangle::prm > & prmTriangle
 

Private Member Functions

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

Private Attributes

std::vector< double > srcDen
 
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< Triangle::prm > &  prmTri,
const int  ScalfmmNbThreads 
)
inline

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

Parameters
[in]msh
[in]prmTet
[in]prmTri
[in]ScalfmmNbThreads

Member Function Documentation

◆ calc_charges()

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

computes all charges from tetraedrons and triangles 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

Compute the demagnetizing field. Include the second order corrections if FIRST_ORDER=OFF (which is the default).

Parameters
[in]msh

◆ demag()

void scal_fmm::fmm::demag ( const std::function< const Eigen::Vector3d(const Nodes::Node &)> &  getter,
const 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 ( const std::vector< T > &  container,
const std::vector< int > &  idxContainer,
FSize &  idx,
const Eigen::Ref< const Eigen::Vector3d >  c 
)
inlineprivate

function template to insert volume or surface charges in tree for demag computation. class T is Tet or Tri, it must have getPtGauss() method to get the Gauss points, second template parameter is NPI of the namespace containing class T. idxContainer is the list of indices of the magnetic T elements stored in container.

Member Data Documentation

◆ corr

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

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

◆ kernels

KernelClass scal_fmm::fmm::kernels
private

kernel initialized by constructor

◆ norm

double scal_fmm::fmm::norm
private

normalization coefficient

◆ prmTetra

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

all volume region parameters for the tetraedrons

◆ prmTriangle

const std::vector<Triangle::prm>& scal_fmm::fmm::prmTriangle

all surface region parameters for the triangles

◆ srcDen

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

sources: both surface and volume charges

◆ tree

OctreeClass scal_fmm::fmm::tree
private

tree initialized by constructor


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