29 #ifndef OOMPH_HERMITE_ELEMENT_HEADER
30 #define OOMPH_HERMITE_ELEMENT_HEADER
34 #include <oomph-lib-config.h>
84 template<
unsigned DIM>
101 unsigned n_node =
static_cast<unsigned>(
pow(2.0,
static_cast<int>(
DIM)));
122 unsigned ncoord =
dim();
123 for (
unsigned i = 0;
i < ncoord;
i++)
138 unsigned ncoord =
dim();
139 for (
unsigned i = 0;
i < ncoord;
i++)
186 return invert_jacobian<DIM>(jacobian, inverse_jacobian);
199 transform_second_derivatives_template<DIM>(
200 jacobian, inverse_jacobian, jacobian2, dbasis, d2basis);
222 unsigned NNODE_1D = 2;
223 const double S_min = this->
s_min();
224 const double S_range = this->
s_max() - S_min;
225 for (
unsigned i = 0;
i <
DIM;
i++)
227 j_sub[
i] = j_copy % NNODE_1D;
228 j_copy = (j_copy - j_sub[
i]) / NNODE_1D;
236 s_fraction.resize(
DIM);
239 unsigned NNODE_1D = 2;
240 for (
unsigned i = 0;
i <
DIM;
i++)
242 j_sub[
i] = j_copy % NNODE_1D;
243 j_copy = (j_copy - j_sub[
i]) / NNODE_1D;
244 s_fraction[
i] = j_sub[
i];
267 void output(std::ostream& outfile,
const unsigned& n_plot);
273 void output(FILE* file_pt,
const unsigned& n_plot);
279 const unsigned& nplot,
281 const bool& use_equally_spaced_interior_sample_points =
false)
const;
324 const unsigned& nplot,
326 const bool& use_equally_spaced_interior_sample_points)
const
331 if (use_equally_spaced_interior_sample_points)
334 double dx_new = range /
double(nplot);
335 double range_new =
double(nplot - 1) * dx_new;
336 s[0] = -1.0 + 0.5 * dx_new + range_new * (1.0 +
s[0]) / range;
351 const unsigned& nplot)
const
353 std::ostringstream header;
354 header <<
"ZONE I=" << nplot <<
"\n";
376 const unsigned& nplot,
378 const bool& use_equally_spaced_interior_sample_points)
const
382 unsigned i0 =
i % nplot;
383 unsigned i1 = (
i - i0) / nplot;
388 if (use_equally_spaced_interior_sample_points)
391 double dx_new = range /
double(nplot);
392 double range_new =
double(nplot - 1) * dx_new;
393 s[0] = -1.0 + 0.5 * dx_new + range_new * (1.0 +
s[0]) / range;
394 s[1] = -1.0 + 0.5 * dx_new + range_new * (1.0 +
s[1]) / range;
410 const unsigned& nplot)
const
412 std::ostringstream header;
413 header <<
"ZONE I=" << nplot <<
", J=" << nplot <<
"\n";
424 return nplot * nplot;
433 template<
unsigned DIM>
443 return FiniteElement::invert_jacobian<DIM>(jacobian, inverse_jacobian);
454 dpsids, jacobian, inverse_jacobian);
474 FiniteElement::transform_second_derivatives_diagonal<DIM>(
475 jacobian, inverse_jacobian, jacobian2, dbasis, d2basis);
501 template<
unsigned DIM>
510 unsigned n_node =
nnode();
524 void output(std::ostream& outfile);
527 void output(std::ostream& outfile,
const unsigned& n_plot);
530 void output(FILE* file_pt);
533 void output(FILE* file_pt,
const unsigned& n_plot);
567 template<
unsigned DIM>
592 dpsids, jacobian, inverse_jacobian);
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Definition: hermite_elements.h:435
double invert_jacobian_mapping(const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: hermite_elements.h:440
double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: hermite_elements.h:448
DiagQHermiteElement()
Constructor.
Definition: hermite_elements.h:481
void operator=(const DiagQHermiteElement &)=delete
Broken assignment operator.
void transform_second_derivatives(const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
Definition: hermite_elements.h:467
DiagQHermiteElement(const DiagQHermiteElement &dummy)=delete
Broken copy constructor.
void transform_derivatives(const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
Definition: hermite_elements.h:459
Definition: elements.h:4338
void set_nnodal_position_type(const unsigned &nposition_type)
Set the number of types required to interpolate the coordinate.
Definition: elements.h:1396
void set_dimension(const unsigned &dim)
Definition: elements.h:1380
unsigned dim() const
Definition: elements.h:2611
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
void transform_derivatives_diagonal(const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
Definition: elements.cc:2877
void set_n_node(const unsigned &n)
Definition: elements.h:1404
virtual void set_integration_scheme(Integral *const &integral_pt)
Set the spatial integration scheme.
Definition: elements.cc:3210
virtual double local_to_eulerian_mapping_diagonal(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: elements.cc:2588
Definition: Qelements.h:64
Definition: hermite_elements.h:57
QHermiteElementBase()
Empty default constructor.
Definition: hermite_elements.h:60
void operator=(const QHermiteElementBase &)=delete
Broken assignment operator.
QHermiteElementBase(const QHermiteElementBase &)=delete
Broken copy constructor.
Definition: hermite_elements.h:86
double local_one_d_fraction_of_node(const unsigned &n1d, const unsigned &i)
Definition: hermite_elements.h:250
void shape(const Vector< double > &s, Shape &psi) const
void transform_second_derivatives(const DenseMatrix< double > &jacobian, const DenseMatrix< double > &inverse_jacobian, const DenseMatrix< double > &jacobian2, DShape &dbasis, DShape &d2basis) const
Definition: hermite_elements.h:192
void output(FILE *file_pt, const unsigned &n_plot)
C_style output at n_plot points.
double invert_jacobian_mapping(const DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: hermite_elements.h:183
QHermiteElement()
Constructor.
Definition: hermite_elements.h:98
std::string tecplot_zone_string(const unsigned &nplot) const
bool local_coord_is_valid(const Vector< double > &s)
Check whether the local coordinate are valid or not.
Definition: hermite_elements.h:120
void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points=false) const
void move_local_coord_back_into_element(Vector< double > &s) const
Definition: hermite_elements.h:136
unsigned nnode_1d() const
Return number of nodes along each element edge.
Definition: hermite_elements.h:258
void local_coordinate_of_node(const unsigned &j, Vector< double > &s) const
Get local coordinates of node j in the element; vector sets its own size.
Definition: hermite_elements.h:217
unsigned nplot_points(const unsigned &nplot) const
void operator=(const QHermiteElement &)=delete
Broken assignment operator.
static Gauss< DIM, 3 > Default_integration_scheme
Assign the static Default_integration_scheme.
Definition: hermite_elements.h:94
void local_fraction_of_node(const unsigned &j, Vector< double > &s_fraction)
Get local fraction of node j in the element; vector sets its own size.
Definition: hermite_elements.h:234
void build_face_element(const int &face_index, FaceElement *face_element_pt)
void output(std::ostream &outfile, const unsigned &n_plot)
Output at n_plot points.
void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
double s_min() const
Min. value of local coordinate.
Definition: hermite_elements.h:204
double s_max() const
Max. value of local coordinate.
Definition: hermite_elements.h:210
void output(FILE *file_pt)
C-style output.
void output(std::ostream &outfile)
Output.
void d2shape_local(const Vector< double > &s, Shape &psi, DShape &dpsids, DShape &d2psids) const
QHermiteElement(const QHermiteElement &dummy)=delete
Broken copy constructor.
Definition: hermite_elements.h:570
void operator=(const SolidDiagQHermiteElement &)=delete
Broken assignment operator.
double local_to_lagrangian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: hermite_elements.h:586
SolidDiagQHermiteElement()
Constructor.
Definition: hermite_elements.h:573
SolidDiagQHermiteElement(const SolidDiagQHermiteElement &dummy)=delete
Broken copy constructor.
Definition: elements.h:3561
void set_nnodal_lagrangian_type(const unsigned &nlagrangian_type)
Definition: elements.h:4070
virtual double local_to_lagrangian_mapping_diagonal(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Definition: elements.cc:6643
void set_lagrangian_dimension(const unsigned &lagrangian_dimension)
Definition: elements.h:3565
Definition: hermite_elements.h:504
void output(FILE *file_pt, const unsigned &n_plot)
C_style output at n_plot points.
SolidQHermiteElement(const SolidQHermiteElement &dummy)=delete
Broken copy constructor.
void build_face_element(const int &face_index, FaceElement *face_element_pt)
Definition: hermite_elements.cc:1270
void output(std::ostream &outfile)
Overload the output function.
Definition: hermite_elements.cc:1072
void operator=(const SolidQHermiteElement &)=delete
Broken assignment operator.
SolidQHermiteElement()
Constructor.
Definition: hermite_elements.h:507
void output(std::ostream &outfile, const unsigned &n_plot)
Output at n_plot points.
RealScalar s
Definition: level1_cplx_impl.h:130
#define DIM
Definition: linearised_navier_stokes_elements.h:44
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
std::string string(const unsigned &i)
Definition: oomph_definitions.cc:286
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2