121 void output(std::ostream &outfile,
const unsigned &nplot)
131 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
142 <<
r <<
" " <<
theta <<
" ";
146 for(
unsigned i=0;
i<3;
i++)
155 outfile << std::endl;
167 void output(FILE* file_pt,
const unsigned &n_plot)
171 void output_fct(std::ostream &outfile,
const unsigned &Nplot,
179 void output_fct(std::ostream &outfile,
const unsigned &Nplot,
227 for(
unsigned i=0;
i<3;
i++) {values.push_back(nst_values[
i]);}
230 values.push_back(advection_values[0]);
257 for(
unsigned i=0;
i<3;
i++) {values.push_back(nst_values[
i]);}
260 values.push_back(advection_values[0]);
287 {
return x[0]*
x[0]*
sin(
x[1]);}
307 this->Ra_pt = cast_father_element_pt->
ra_pt();
330 unsigned n_fluid_flux =
337 unsigned n_temp_flux =
345 for(
unsigned i=0;
i<n_temp_flux;
i++)
347 flux[n_fluid_flux+
i] = temp_flux[
i];
361 unsigned n_fluid_flux =
364 unsigned n_temp_flux =
370 for(
unsigned i=0;
i<n_fluid_flux;
i++) {flux_index[
i] = 0;}
373 for(
unsigned i=0;
i<n_temp_flux;
i++) {flux_index[n_fluid_flux +
i] = 1;}
386 double&
error,
double& norm)
397 double&
error,
double& norm)
435 for (
unsigned i=0;
i<3;
i++)
459 #ifdef USE_FD_JACOBIAN_FOR_REFINEABLE_BUOYANT_Q_ELEMENT
507 HangInfo *hang_info_pt=0, *hang_info2_pt=0;
511 unsigned u_nodal_spherical_nst[3];
512 for(
unsigned i=0;
i<3;
i++)
516 const unsigned u_nodal_spherical_adv_diff =
520 const unsigned n_node = this->
nnode();
523 Shape psif(n_node), testf(n_node);
524 DShape dpsifdx(n_node,2), dtestfdx(n_node,2);
530 double Ra = this->
ra();
531 double Pe = this->
pe();
535 int local_eqn=0, local_unknown=0;
538 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
561 for(
unsigned l=0;l<n_node;l++)
564 double u_value = this->
nodal_value(l,u_nodal_spherical_adv_diff);
566 for(
unsigned j=0;
j<2;
j++)
568 interpolated_du_spherical_adv_diff_dx[
j] += u_value*dpsifdx(l,
j);
589 for(
unsigned l=0;l<n_node;l++)
594 double hang_weight=1.0;
603 n_master = hang_info_pt->
nmaster();
612 for(
unsigned m=0;
m<n_master;
m++)
631 for(
unsigned i=0;
i<3;
i++)
639 u_nodal_spherical_nst[
i]);
651 unsigned n_master2=1;
652 double hang_weight2=1.0;
655 for(
unsigned l2=0;l2<n_node;l2++)
664 n_master2 = hang_info2_pt->nmaster();
673 for(
unsigned m2=0;
m2<n_master2;
m2++)
680 u_nodal_spherical_adv_diff);
682 hang_weight2 = hang_info2_pt->master_weight(
m2);
689 u_nodal_spherical_adv_diff);
694 if(local_unknown >= 0)
697 jacobian(local_eqn,local_unknown)
699 r2*sin_theta*
W*hang_weight*hang_weight2/(
pow(
r,5.0));
715 u_nodal_spherical_adv_diff);
728 unsigned n_master2=1;
729 double hang_weight2=1.0;
732 for(
unsigned l2=0;l2<n_node;l2++)
741 n_master2 = hang_info2_pt->nmaster();
750 for(
unsigned m2=0;
m2<n_master2;
m2++)
756 hang_weight2 = hang_info2_pt->master_weight(
m2);
766 for(
unsigned i2=0;i2<2;i2++)
774 u_nodal_spherical_nst[i2]);
781 u_nodal_spherical_nst[i2]);
785 if(local_unknown >= 0)
791 jacobian(local_eqn,local_unknown)
793 interpolated_du_spherical_adv_diff_dx[i2]*testf(l)
794 *r2*sin_theta*
W*hang_weight*hang_weight2;
799 jacobian(local_eqn,local_unknown)
801 interpolated_du_spherical_adv_diff_dx[i2]*testf(l)
802 *
r*sin_theta*
W*hang_weight*hang_weight2;
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
RowVector3d w
Definition: Matrix_resize_int.cpp:3
FaceGeometry()
Definition: spherical_buoyant_navier_stokes.h:840
Definition: elements.h:4998
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: elements.h:1735
virtual void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output an exact solution over the element.
Definition: elements.h:3104
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
virtual void output(std::ostream &outfile)
Definition: elements.h:3050
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
Definition: elements.cc:3962
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
virtual void compute_error(FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Calculate the norm of the error and that of the exact solution.
Definition: elements.h:3198
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Definition: elements.h:1759
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
double nodal_position(const unsigned &n, const unsigned &i) const
Definition: elements.h:2317
virtual void enable_ALE()
Definition: elements.h:2430
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Definition: elements.h:3174
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Definition: elements.h:1765
double const & master_weight(const unsigned &i) const
Return weight for dofs on i-th master node.
Definition: nodes.h:808
Node *const & master_node_pt(const unsigned &i) const
Return a pointer to the i-th master node.
Definition: nodes.h:791
unsigned nmaster() const
Return the number of master nodes.
Definition: nodes.h:785
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
HangInfo *const & hanging_pt() const
Definition: nodes.h:1228
bool is_hanging() const
Test whether the node is geometrically hanging.
Definition: nodes.h:1285
unsigned nplot_points(const unsigned &nplot) const
Definition: Qelements.h:1107
void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &use_equally_spaced_interior_sample_points=false) const
Definition: Qelements.h:1067
std::string tecplot_zone_string(const unsigned &nplot) const
Definition: Qelements.h:1098
Definition: Qelements.h:459
unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at local node n.
Definition: spherical_navier_stokes_elements.h:871
double dshape_and_dtest_eulerian_at_knot_spherical_nst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const
Definition: spherical_navier_stokes_elements.h:1013
Definition: spherical_buoyant_navier_stokes.h:62
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: spherical_buoyant_navier_stokes.h:456
static double Default_Physical_Constant_Value
The static default value of the Rayleigh number.
Definition: spherical_buoyant_navier_stokes.h:70
unsigned ncont_interpolated_values() const
Definition: spherical_buoyant_navier_stokes.h:204
void further_setup_hanging_nodes()
Definition: spherical_buoyant_navier_stokes.h:268
unsigned required_nvalue(const unsigned &n) const
Definition: spherical_buoyant_navier_stokes.h:86
unsigned num_Z2_flux_terms()
Definition: spherical_buoyant_navier_stokes.h:318
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: spherical_buoyant_navier_stokes.h:478
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function: Broken default.
Definition: spherical_buoyant_navier_stokes.h:167
void rebuild_from_sons(Mesh *&mesh_pt)
Definition: spherical_buoyant_navier_stokes.h:278
Node * vertex_node_pt(const unsigned &j) const
Definition: spherical_buoyant_navier_stokes.h:199
void output(std::ostream &outfile)
Overload the standard output function with the broken default.
Definition: spherical_buoyant_navier_stokes.h:116
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Definition: spherical_buoyant_navier_stokes.h:210
void output(std::ostream &outfile, const unsigned &nplot)
Definition: spherical_buoyant_navier_stokes.h:121
void get_body_force_spherical_nst(const double &time, const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &result)
Definition: spherical_buoyant_navier_stokes.h:418
void output(FILE *file_pt)
C-style output function: Broken default.
Definition: spherical_buoyant_navier_stokes.h:163
unsigned ncompound_fluxes()
Definition: spherical_buoyant_navier_stokes.h:354
void output_fct(std::ostream &outfile, const unsigned &Nplot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Definition: spherical_buoyant_navier_stokes.h:179
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the constituent elements' contribution to the residual vector.
Definition: spherical_buoyant_navier_stokes.h:442
double *& ra_pt()
Access function for the pointer to the Rayleigh number.
Definition: spherical_buoyant_navier_stokes.h:95
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: spherical_buoyant_navier_stokes.h:327
void get_Z2_compound_flux_indices(Vector< unsigned > &flux_index)
Definition: spherical_buoyant_navier_stokes.h:358
void further_build()
Definition: spherical_buoyant_navier_stokes.h:294
void disable_ALE()
Final override for disable ALE.
Definition: spherical_buoyant_navier_stokes.h:99
RefineableBuoyantQSphericalCrouzeixRaviartElement()
Definition: spherical_buoyant_navier_stokes.h:76
void fill_in_off_diagonal_jacobian_blocks_analytic(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: spherical_buoyant_navier_stokes.h:499
void output_fct(std::ostream &outfile, const unsigned &Nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output function for an exact solution: Broken default.
Definition: spherical_buoyant_navier_stokes.h:171
void enable_ALE()
Final override for enable ALE.
Definition: spherical_buoyant_navier_stokes.h:107
unsigned nrecovery_order()
The recovery order is that of the NavierStokes elements.
Definition: spherical_buoyant_navier_stokes.h:313
double * Ra_pt
Pointer to a new physical variable, the Rayleigh number.
Definition: spherical_buoyant_navier_stokes.h:67
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Definition: spherical_buoyant_navier_stokes.h:395
void get_wind_spherical_adv_diff(const unsigned &ipt, const Vector< double > &s, const Vector< double > &x, Vector< double > &wind) const
Definition: spherical_buoyant_navier_stokes.h:404
const double & ra() const
Access function for the Rayleigh number (const version)
Definition: spherical_buoyant_navier_stokes.h:92
unsigned u_index_spherical_adv_diff() const
Definition: spherical_buoyant_navier_stokes.h:190
void get_interpolated_values(const unsigned &t, const Vector< double > &s, Vector< double > &values)
Definition: spherical_buoyant_navier_stokes.h:239
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Definition: spherical_buoyant_navier_stokes.h:383
double geometric_jacobian(const Vector< double > &x)
Fill in the geometric Jacobian, which in this case is r*r*sin(theta)
Definition: spherical_buoyant_navier_stokes.h:286
unsigned nvertex_node() const
Definition: spherical_buoyant_navier_stokes.h:194
virtual RefineableElement * father_element_pt() const
Return a pointer to the father element.
Definition: refineable_elements.h:539
int local_hang_eqn(Node *const &node_pt, const unsigned &i)
Definition: refineable_elements.h:278
Definition: refineable_spherical_advection_diffusion_elements.h:360
void further_setup_hanging_nodes()
Definition: refineable_spherical_advection_diffusion_elements.h:411
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: empty.
Definition: refineable_spherical_advection_diffusion_elements.h:400
Definition: refineable_spherical_navier_stokes_elements.h:568
unsigned nrecovery_order()
Definition: refineable_spherical_navier_stokes_elements.h:701
void further_setup_hanging_nodes()
Definition: refineable_spherical_navier_stokes_elements.h:778
void further_build()
Definition: refineable_spherical_navier_stokes_elements.h:784
void rebuild_from_sons(Mesh *&mesh_pt)
Rebuild from sons: Reconstruct pressure from the (merged) sons.
Definition: refineable_spherical_navier_stokes_elements.h:598
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Definition: refineable_spherical_navier_stokes_elements.h:722
void further_build()
Further build: Copy source function pointer from father element.
Definition: refineable_spherical_advection_diffusion_elements.h:182
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
Definition: refineable_spherical_advection_diffusion_elements.h:78
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: refineable_spherical_advection_diffusion_elements.h:85
void get_interpolated_values(const Vector< double > &s, Vector< double > &values)
Definition: refineable_spherical_advection_diffusion_elements.h:95
unsigned num_Z2_flux_terms()
Number of 'flux' terms for Z2 error estimation.
Definition: refineable_spherical_navier_stokes_elements.h:75
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Definition: refineable_spherical_navier_stokes_elements.h:83
void disable_ALE()
Definition: spherical_advection_diffusion_elements.h:127
double interpolated_u_spherical_adv_diff(const Vector< double > &s) const
Return FE representation of function value u(s) at local coordinate s.
Definition: spherical_advection_diffusion_elements.h:334
const double & pe() const
Peclet number.
Definition: spherical_advection_diffusion_elements.h:194
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the element's contribution to its residual vector (wrapper)
Definition: spherical_advection_diffusion_elements.h:298
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: spherical_advection_diffusion_elements.h:322
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: spherical_advection_diffusion_elements.h:312
virtual unsigned u_index_spherical_nst(const unsigned &i) const
Definition: spherical_navier_stokes_elements.h:387
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: spherical_navier_stokes_elements.h:681
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Compute the element's residual Vector.
Definition: spherical_navier_stokes_elements.h:668
void disable_ALE()
Definition: spherical_navier_stokes_elements.h:424
double interpolated_p_spherical_nst(const Vector< double > &s) const
Return FE interpolated pressure at local coordinate s.
Definition: spherical_navier_stokes_elements.h:780
const Vector< double > & g() const
Vector of gravitational components.
Definition: spherical_navier_stokes_elements.h:323
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: spherical_navier_stokes_elements.h:691
void enable_ALE()
Definition: spherical_navier_stokes_elements.h:433
void interpolated_u_spherical_nst(const Vector< double > &s, Vector< double > &veloc) const
Compute vector of FE interpolated velocity u at local coordinate s.
Definition: spherical_navier_stokes_elements.h:702
RealScalar s
Definition: level1_cplx_impl.h:130
int * m
Definition: level2_cplx_impl.h:294
double theta
Definition: two_d_biharmonic.cc:236
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
double Pe
Peclet number.
Definition: axisym_heat_sphere.cc:59
double Ra
Rayleigh number.
Definition: axisym_heat_sphere.cc:62
void gravity(const double &t, const Vector< double > &xi, Vector< double > &b)
Definition: ConstraintElementsUnitTest.cpp:20
void flux(const double &time, const Vector< double > &x, double &flux)
Get flux applied along boundary x=0.
Definition: pretend_melt.cc:59
int error
Definition: calibrate.py:297
Definition: MortaringCantileverCompareToNonMortaring.cpp:176
@ W
Definition: quadtree.h:63
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
list x
Definition: plotDoE.py:28
t
Definition: plotPSD.py:36
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2