BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
fn_kelvin_christoffel.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 BELFEM_FN_KELVIN_CHRISTOFFEL_HPP
13#define BELFEM_FN_KELVIN_CHRISTOFFEL_HPP
14
15
16#include "cl_Vector.hpp"
17#include "cl_Matrix.hpp"
18#include "cl_Tensor.hpp"
20
21namespace belfem
22{
23//----------------------------------------------------------------------------
24
25 template < typename T >
26 inline void
27 kelvin_christoffel( const Tensor< T > & aA, const Vector< T > & aB, Matrix< T > & aC )
28 {
30 "operating tensor must be 3x3x3x3" );
31
32 BELFEM_ASSERT( aB.length() == 3,
33 "argument vector must be allocated as 3x1" );
34
35 BELFEM_ASSERT( aC.n_rows() == 3
36 && aC.n_cols() == 3,
37 "target matrix must be allocated as 3x3" );
38
39 // canonical mixed signature ( tensor data pointer, vector/matrix
40 // refs ) — the only form both backends provide; under Blaze the
41 // matrices are padded, so raw matrix pointers must not be used
42 tensor::kelvin_christoffel( aA.data(), aB, aC );
43 }
44
45//----------------------------------------------------------------------------
46}
47#endif //BELFEM_FN_KELVIN_CHRISTOFFEL_HPP
#define BELFEM_ASSERT(aCheck,...)
Definition assert.hpp:244
Dense column-major matrix.
Definition cl_BZ_Matrix.hpp:28
size_t n_rows() const
Definition cl_AR_Matrix.hpp:205
size_t n_cols() const
Definition cl_AR_Matrix.hpp:213
Third- or fourth-order tensor container; the constitutive helpers (contraction, rotation,...
Definition cl_Tensor.hpp:43
T * data()
expose the underlying raw pointer
Definition cl_Tensor.hpp:211
bool is_3333() const
returns true if this is a 3x3x3x3 tensor
Definition cl_Tensor.hpp:319
Column vector.
Definition cl_BZ_Vector.hpp:41
size_t length() const
get the length of the vector
Definition cl_AR_Vector.hpp:257
void kelvin_christoffel(const T *A, const T *B, T *C)
C_ik = A_ijkl * B_j * B_l.
Definition fn_TR_kelvin_christoffel_arma.hpp:29
USER GUIDES:
Definition cl_Capacitor.cpp:16
void kelvin_christoffel(const Tensor< T > &aA, const Vector< T > &aB, Matrix< T > &aC)
Definition fn_kelvin_christoffel.hpp:27