17 #ifdef OOMPH_HAS_MUMPS
24 setElasticModulus(1e6);
26 setSolidCubicMesh(3, 3, 3, -1, 1, -1, 1, -1, 1);
27 pinBoundaries({Boundary::X_MIN, Boundary::X_MAX});
32 logger(
INFO,
"\nElements: %", solid_mesh_pt()->nelement());
33 std::cout <<
"Center Positions:\n";
34 for (
int e = 0;
e < solid_mesh_pt()->nelement(); ++
e) {
36 std::cout <<
" " <<
e <<
": " <<
getXiCenter(e_pt) << std::endl;
39 ELEMENT* e_pt =
dynamic_cast<ELEMENT*
>(solid_mesh_pt()->element_pt(22));
48 logger(
INFO,
"Nodes per element: %", e_pt->nnode());
49 std::cout <<
"Nodal positions element 22:\n";
50 for (
int n = 0;
n < e_pt->nnode(); ++
n) {
52 std::cout <<
" " <<
n <<
": " << n_pt->
x(0) <<
' ' << n_pt->
x(1) <<
' ' << n_pt->
x(2) << std::endl;
56 logger(
INFO,
"Integration points per element: %", e_pt->integral_pt()->nweight());
57 std::cout <<
"Local and global coordinates, weight, Jacobian and shape functions at integration points:\n";
58 unsigned dim = e_pt->nodal_dimension();
59 for (
unsigned ipt = 0; ipt < e_pt->integral_pt()->nweight(); ipt++) {
62 for (
unsigned i = 0;
i < dim; ++
i) {
63 s[
i] = e_pt->integral_pt()->knot(ipt,
i);
66 Shape psi(e_pt->nnode(), e_pt->nnodal_position_type());
67 DShape dpsidxi(e_pt->nnode(), e_pt->nnodal_position_type(), dim);
68 double J = e_pt->dshape_lagrangian_at_knot(ipt, psi, dpsidxi);
70 double w = e_pt->integral_pt()->weight(ipt);
74 std::stringstream psi_ss;
75 for (
int l = 0; l < e_pt->nnode(); ++l) {
76 for (
int k = 0;
k < e_pt->nnodal_position_type(); ++
k) {
77 for (
int i = 0;
i < dim; ++
i) {
79 interpolated_xi[
i] += e_pt->lagrangian_position_gen(l,
k,
i) * psi(l,
k);
80 interpolated_x[
i] += e_pt->nodal_position_gen(l,
k,
i) * psi(l,
k);
82 psi_ss << psi(l,
k) <<
' ';
85 std::cout <<
"ipt " << ipt <<
" w " <<
w <<
" J " <<
J <<
" s " <<
s <<
" xi " << interpolated_xi <<
" psi " << psi_ss.str() << std::endl;
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
Array< double, 1, 3 > e(1./3., 0.5, 2.)
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
Logger< MERCURYDPM_LOGLEVEL > logger("MercuryKernel")
Definition of different loggers with certain modules. A user can define its own custom logger here.
RowVector3d w
Definition: Matrix_resize_int.cpp:3
void removeOldFiles() const
Definition: BaseCoupling.h:47
void setName(std::string name)
Definition: BaseCoupling.h:38
static Vector< double > getXiCenter(ELEMENT *e_pt)
Definition: ElementAnalysis.cpp:89
O::ELEMENT ELEMENT
Definition: SCoupling.h:18
void coupleBoundary(unsigned b)
Definition: SCoupling.h:692
Wrapper to Mumps solver.
Definition: mumps_solver.h:62
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
RealScalar s
Definition: level1_cplx_impl.h:130
char char char int int * k
Definition: level2_impl.h:374