BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
belfem::fem::Calculator Class Reference

#include <cl_FEM_Calculator.hpp>

Public Member Functions

 Calculator (Group *aGroup, const ModelDimensionality aDimensionality)
 default constructor
 Calculator (Group *aGroup, Mesh *aMesh)
 ~Calculator ()
void init_qold_table ()
void allocate ()
 called by dof manager
void link (Group *aGroup)
void link (Element *aElement)
void link (mesh::Facet *aFacet)
Groupgroup ()
Elementelement ()
const Materialmaterial () const
Matrix< real > & K ()
 return the stiffness matrix
Matrix< real > & M ()
 return the mass matrix
Matrix< real > & JN ()
 return the Newton correction matrix
Vector< real > & f ()
 return the load vector
const Vector< real > & q ()
 return the dof vector at current timestep
const Vector< real > & qold (const uint aStep=0)
 return the dof vector at an old timestep
Vector< real > & qswap ()
 return a swap vector for the dofs
const Vector< real > & node_data (const string &aNodeField)
 return a vector object
bool vector_exists (const string aLabel) const
Vector< real > & vector (const string &aLabel)
 return a vector object
bool matrix_exists (const string aLabel) const
Matrix< real > & matrix (const string &aLabel)
 return a matrix object
const Matrix< real > & X () const
 node coordinates on element
const Matrix< real > & J (const uint aIndex)
 jacobian matrix
const Matrix< real > & invJ (const uint aIndex)
 inverse of jacobian matrix
const Matrix< real > & Jm (const uint aIndex)
 jacobian matrix for master
const Matrix< real > & Js (const uint aIndex)
 jacobian matrix for slave
const Matrix< real > & N (const uint aIndex)
 node interpolator
const Matrix< real > & E (const uint aIndex)
 edge interpolator
const Matrix< real > & C (const uint aIndex)
 curl interpolator
const Matrix< real > & G (const uint aIndex)
 gradient interpolator for nedelec elements
uint num_nedelec_dofs () const
const Matrix< real > & Em (const uint aIndex)
 edge interpolator on master
const Matrix< real > & Cm (const uint aIndex)
 curl interpolator on master
const Matrix< real > & Es (const uint aIndex)
 edge interpolator on slave
const Matrix< real > & Cs (const uint aIndex)
 curl interpolator on slave
const Matrix< real > & Nm (const uint aIndex)
 node interpolator master
const Matrix< real > & Ns (const uint aIndex)
 node interpolator slave
const Vector< real > & Nvec (const uint aIndex) const
 node interpolator, but as vector
real node_interp (const uint aIndex, const Vector< real > &aNodeValues) const
 node interpolation function for local values
const Matrix< real > & B (const uint aIndex=0)
 gradient operator
const Matrix< real > & Bm (const uint aIndex=0)
 gradient operator master
const Matrix< real > & Bs (const uint aIndex=0)
 gradient operator slave
const Matrix< real > & Xm () const
 node coordinates on master element
const Matrix< real > & Xs () const
 node coordinates on slave element
real dS (const uint aIndex=0)
 surface increment
real dV (const uint aIndex=0)
 volume increment
const Vector< real > & normal (const uint aIndex=0)
 returns the normal of a surface
void initialize_integration (const ElementType aElementType, const InterpolationType aInterpolationType)
void set_integration_order (const uint aOrder)
uint integration_order () const
void allocate_memory ()
const IntegrationDataintegration () const
const IntegrationDatamaster_integration () const
const IntegrationDataslave_integration () const
const IntegrationDatavolume_integration () const
const IntegrationDatavolume_enrichment () const
const IntegrationDatasideset_enrichment () const
uint num_intpoints () const
real timestep () const
void set_model_parameters (const Vector< real > &aParams)
const Vector< real > & model_parameters () const
calculator::VectorDatacreate_vector (const string &aLabel, const uint aSize, const EntityType aType=EntityType::UNDEFINED)
calculator::MatrixDatacreate_matrix (const string &aLabel, const uint aNumRows, const uint aNumCols)
void print_dofs ()
void print_local_dofs ()
const Vector< real > & nedelec_data_h ()
const Vector< real > & nedelec_data_a ()
Calculatorget_normal_calculator (Vector< real > &aPhiM, Vector< real > &aPhiS, bool &aMasterIsConductor, bool &aSlaveIsConductor)
 links the tape-sideset calculator to the facet of the linked layer element and returns it.
const Vector< real > & nedelec_data_master_h ()
 edge dofs of the master volume of the linked facet, read from the edge_h mesh field ( the live dof storage on every rank, see q() ) into vector( "nedelec_h" ), which is sized for the master type.
const Vector< real > & nedelec_data_slave_h ()
 slave twin of nedelec_data_master_h(), into vector( "nedelec_h_s" )
bool volume_is_conductor (const mesh::Element *aVolume) const
 true if the volume element sits on an h-conductor block ( DomainType::Conductor ), i.e.
Meshmesh ()
bool element_is_linear () const
void link_maxwell (Kernel *aMaxwellKernel, Kernel *aThermalKernel=nullptr)
 register the kernels for the maxwell data helper.
real bj_angle (const Vector< real > &b, const Vector< real > &j, real &norm_b, real &norm_j) const
real bn_angle (const Vector< real > &b, const Vector< real > &n, real &norm_b) const
calculator::MaxwellDatamaxwell ()
EdgeFunctionedge_function ()

Constructor & Destructor Documentation

◆ Calculator() [1/2]

belfem::fem::Calculator::Calculator ( Group * aGroup,
const ModelDimensionality aDimensionality )

default constructor

◆ Calculator() [2/2]

belfem::fem::Calculator::Calculator ( Group * aGroup,
Mesh * aMesh )

◆ ~Calculator()

belfem::fem::Calculator::~Calculator ( )

Member Function Documentation

◆ allocate()

void belfem::fem::Calculator::allocate ( )

called by dof manager

◆ allocate_memory()

void belfem::fem::Calculator::allocate_memory ( )

◆ B()

const Matrix< real > & belfem::fem::Calculator::B ( const uint aIndex = 0)
inline

gradient operator

◆ bj_angle()

real belfem::fem::Calculator::bj_angle ( const Vector< real > & b,
const Vector< real > & j,
real & norm_b,
real & norm_j ) const
inline

◆ Bm()

const Matrix< real > & belfem::fem::Calculator::Bm ( const uint aIndex = 0)
inline

gradient operator master

◆ bn_angle()

real belfem::fem::Calculator::bn_angle ( const Vector< real > & b,
const Vector< real > & n,
real & norm_b ) const
inline

◆ Bs()

const Matrix< real > & belfem::fem::Calculator::Bs ( const uint aIndex = 0)
inline

gradient operator slave

◆ C()

const Matrix< real > & belfem::fem::Calculator::C ( const uint aIndex)

curl interpolator

◆ Cm()

const Matrix< real > & belfem::fem::Calculator::Cm ( const uint aIndex)

curl interpolator on master

◆ create_matrix()

calculator::MatrixData * belfem::fem::Calculator::create_matrix ( const string & aLabel,
const uint aNumRows,
const uint aNumCols )

◆ create_vector()

calculator::VectorData * belfem::fem::Calculator::create_vector ( const string & aLabel,
const uint aSize,
const EntityType aType = EntityType::UNDEFINED )

◆ Cs()

const Matrix< real > & belfem::fem::Calculator::Cs ( const uint aIndex)

curl interpolator on slave

◆ dS()

real belfem::fem::Calculator::dS ( const uint aIndex = 0)
inline

surface increment

◆ dV()

real belfem::fem::Calculator::dV ( const uint aIndex = 0)
inline

volume increment

◆ E()

const Matrix< real > & belfem::fem::Calculator::E ( const uint aIndex)

edge interpolator

◆ edge_function()

EdgeFunction * belfem::fem::Calculator::edge_function ( )
inline

◆ element()

Element * belfem::fem::Calculator::element ( )
inline

◆ element_is_linear()

bool belfem::fem::Calculator::element_is_linear ( ) const
inline

◆ Em()

const Matrix< real > & belfem::fem::Calculator::Em ( const uint aIndex)

edge interpolator on master

◆ Es()

const Matrix< real > & belfem::fem::Calculator::Es ( const uint aIndex)

edge interpolator on slave

◆ f()

Vector< real > & belfem::fem::Calculator::f ( )
inline

return the load vector

◆ G()

const Matrix< real > & belfem::fem::Calculator::G ( const uint aIndex)

gradient interpolator for nedelec elements

◆ get_normal_calculator()

Calculator * belfem::fem::Calculator::get_normal_calculator ( Vector< real > & aPhiM,
Vector< real > & aPhiS,
bool & aMasterIsConductor,
bool & aSlaveIsConductor )

links the tape-sideset calculator to the facet of the linked layer element and returns it.

Gathers the nodal phi of each volume side that is a phi-region into aPhiM / aPhiS and reports per side whether the volume is an h-conductor instead ( its trace then comes from nedelec_data_master_h / _slave_h )

◆ group()

Group * belfem::fem::Calculator::group ( )
inline

◆ init_qold_table()

void belfem::fem::Calculator::init_qold_table ( )

◆ initialize_integration()

void belfem::fem::Calculator::initialize_integration ( const ElementType aElementType,
const InterpolationType aInterpolationType )

◆ integration()

const IntegrationData * belfem::fem::Calculator::integration ( ) const
inline

◆ integration_order()

uint belfem::fem::Calculator::integration_order ( ) const
inline

◆ invJ()

const Matrix< real > & belfem::fem::Calculator::invJ ( const uint aIndex)
inline

inverse of jacobian matrix

◆ J()

const Matrix< real > & belfem::fem::Calculator::J ( const uint aIndex)
inline

jacobian matrix

◆ Jm()

const Matrix< real > & belfem::fem::Calculator::Jm ( const uint aIndex)
inline

jacobian matrix for master

◆ JN()

Matrix< real > & belfem::fem::Calculator::JN ( )
inline

return the Newton correction matrix

◆ Js()

const Matrix< real > & belfem::fem::Calculator::Js ( const uint aIndex)
inline

jacobian matrix for slave

◆ K()

Matrix< real > & belfem::fem::Calculator::K ( )
inline

return the stiffness matrix

◆ link() [1/3]

void belfem::fem::Calculator::link ( Element * aElement)

◆ link() [2/3]

void belfem::fem::Calculator::link ( Group * aGroup)

◆ link() [3/3]

void belfem::fem::Calculator::link ( mesh::Facet * aFacet)

◆ link_maxwell()

void belfem::fem::Calculator::link_maxwell ( Kernel * aMaxwellKernel,
Kernel * aThermalKernel = nullptr )

register the kernels for the maxwell data helper.

Called by the MaxwellFactory (magnetic only) and by Controller::set_thermal_kernel (both kernels) once everything is in place. The helper itself is created at the end of allocate(), when the work vectors exist; calling this afterwards rebuilds it.

◆ M()

Matrix< real > & belfem::fem::Calculator::M ( )
inline

return the mass matrix

◆ master_integration()

const IntegrationData * belfem::fem::Calculator::master_integration ( ) const
inline

◆ material()

const Material * belfem::fem::Calculator::material ( ) const

◆ matrix()

Matrix< real > & belfem::fem::Calculator::matrix ( const string & aLabel)
inline

return a matrix object

◆ matrix_exists()

bool belfem::fem::Calculator::matrix_exists ( const string aLabel) const
inline

◆ maxwell()

calculator::MaxwellData * belfem::fem::Calculator::maxwell ( )
inline

◆ mesh()

Mesh * belfem::fem::Calculator::mesh ( )
inline

◆ model_parameters()

const Vector< real > & belfem::fem::Calculator::model_parameters ( ) const
inline

◆ N()

const Matrix< real > & belfem::fem::Calculator::N ( const uint aIndex)
inline

node interpolator

◆ nedelec_data_a()

const Vector< real > & belfem::fem::Calculator::nedelec_data_a ( )
inline

◆ nedelec_data_h()

const Vector< real > & belfem::fem::Calculator::nedelec_data_h ( )
inline

◆ nedelec_data_master_h()

const Vector< real > & belfem::fem::Calculator::nedelec_data_master_h ( )

edge dofs of the master volume of the linked facet, read from the edge_h mesh field ( the live dof storage on every rank, see q() ) into vector( "nedelec_h" ), which is sized for the master type.

Linear elements only ( one dof per edge )

◆ nedelec_data_slave_h()

const Vector< real > & belfem::fem::Calculator::nedelec_data_slave_h ( )

slave twin of nedelec_data_master_h(), into vector( "nedelec_h_s" )

◆ Nm()

const Matrix< real > & belfem::fem::Calculator::Nm ( const uint aIndex)
inline

node interpolator master

◆ node_data()

const Vector< real > & belfem::fem::Calculator::node_data ( const string & aNodeField)

return a vector object

◆ node_interp()

real belfem::fem::Calculator::node_interp ( const uint aIndex,
const Vector< real > & aNodeValues ) const
inline

node interpolation function for local values

◆ normal()

const Vector< real > & belfem::fem::Calculator::normal ( const uint aIndex = 0)
inline

returns the normal of a surface

Parameters
aIndex
Returns

◆ Ns()

const Matrix< real > & belfem::fem::Calculator::Ns ( const uint aIndex)
inline

node interpolator slave

◆ num_intpoints()

uint belfem::fem::Calculator::num_intpoints ( ) const
inline

◆ num_nedelec_dofs()

uint belfem::fem::Calculator::num_nedelec_dofs ( ) const

◆ Nvec()

const Vector< real > & belfem::fem::Calculator::Nvec ( const uint aIndex) const
inline

node interpolator, but as vector

◆ print_dofs()

void belfem::fem::Calculator::print_dofs ( )

◆ print_local_dofs()

void belfem::fem::Calculator::print_local_dofs ( )

◆ q()

const Vector< real > & belfem::fem::Calculator::q ( )

return the dof vector at current timestep

◆ qold()

const Vector< real > & belfem::fem::Calculator::qold ( const uint aStep = 0)

return the dof vector at an old timestep

◆ qswap()

Vector< real > & belfem::fem::Calculator::qswap ( )

return a swap vector for the dofs

return the swap vector for the dofs

◆ set_integration_order()

void belfem::fem::Calculator::set_integration_order ( const uint aOrder)

◆ set_model_parameters()

void belfem::fem::Calculator::set_model_parameters ( const Vector< real > & aParams)
inline

◆ sideset_enrichment()

const IntegrationData * belfem::fem::Calculator::sideset_enrichment ( ) const
inline

◆ slave_integration()

const IntegrationData * belfem::fem::Calculator::slave_integration ( ) const
inline

◆ timestep()

real belfem::fem::Calculator::timestep ( ) const
inline

◆ vector()

Vector< real > & belfem::fem::Calculator::vector ( const string & aLabel)
inline

return a vector object

◆ vector_exists()

bool belfem::fem::Calculator::vector_exists ( const string aLabel) const
inline

◆ volume_enrichment()

const IntegrationData * belfem::fem::Calculator::volume_enrichment ( ) const
inline

◆ volume_integration()

const IntegrationData * belfem::fem::Calculator::volume_integration ( ) const
inline

◆ volume_is_conductor()

bool belfem::fem::Calculator::volume_is_conductor ( const mesh::Element * aVolume) const

true if the volume element sits on an h-conductor block ( DomainType::Conductor ), i.e.

its field is edge-interpolated and has no nodal potential

◆ X()

const Matrix< real > & belfem::fem::Calculator::X ( ) const
inline

node coordinates on element

◆ Xm()

const Matrix< real > & belfem::fem::Calculator::Xm ( ) const
inline

node coordinates on master element

◆ Xs()

const Matrix< real > & belfem::fem::Calculator::Xs ( ) const
inline

node coordinates on slave element


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