BELFEM 0.9.3
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_maxwell_l2N.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef FN_MAXWELL_L2N_HPP
13#define FN_MAXWELL_L2N_HPP
14
15#include "typedefs.hpp"
16#include "cl_Matrix.hpp"
17
18#include "cl_FEM_Calculator.hpp"
19
20namespace belfem
21{
22 namespace fem
23 {
24 namespace maxwell
25 {
26 inline const Matrix< real > &
27 l2N( Calculator * aCalc, const uint aIndex )
28 {
29 const Vector< real > & n = aCalc->Nvec( aIndex ) ;
30 Matrix< real > & N = aCalc->matrix("L2N");
31
32 uint nnodes = n.length();
33 uint ndim = N.n_rows() ;
34 for( uint j=0; j<ndim; ++j )
35 {
36 uint c = j ;
37 for( uint i=0; i<nnodes; ++i )
38 {
39 N( j, c ) = n( i );
40 c+=ndim;
41 }
42 }
43
44 return N;
45 }
46 }
47 }
48}
49#endif //FN_MAXWELL_L2N_HPP
size_t n_rows() const
Definition cl_AR_Matrix.hpp:183
Definition cl_FEM_Calculator.hpp:596
Matrix< real > & matrix(const string &aLabel)
return a matrix object
Definition cl_FEM_Calculator.hpp:1687
const Vector< real > & Nvec(const uint aIndex) const
node interpolator, but as vector
Definition cl_FEM_Calculator.hpp:2055
Definition cl_EF_PENTA6TS.hpp:30
const Matrix< real > & l2N(Calculator *aCalc, const uint aIndex)
Definition fn_maxwell_l2N.hpp:27
Definition cl_IFB_LINE3.hpp:21
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int uint
Definition typedefs.hpp:30