30 #ifndef OOMPH_PERIODIC_ORBIT_HANDLER_CLASS_HEADER 31 #define OOMPH_PERIODIC_ORBIT_HANDLER_CLASS_HEADER 35 #include <oomph-lib-config.h> 45 #include "../meshes/one_d_mesh.template.h" 46 #include "../meshes/one_d_mesh.template.cc" 51 class PeriodicOrbitEquations;
53 class PeriodicOrbitAssemblyHandlerBase;
71 Type=
"PeriodicOrbitTimeDiscretisation";
88 unsigned order()
const {
return 1;}
95 "Cannot perform impulsive start for PeriodicOrbitTimeDiscretisation",
96 OOMPH_CURRENT_FUNCTION,
97 OOMPH_EXCEPTION_LOCATION);
105 "Cannot perform impulsive start for PeriodicOrbitTimeDiscretisation",
106 OOMPH_CURRENT_FUNCTION,
107 OOMPH_EXCEPTION_LOCATION);
126 unsigned n_value = data_pt->
nvalue();
129 for(
unsigned t=0;
t<n_time_value;
t++)
136 for(
unsigned j=0;j<n_value;j++)
138 data_pt->
set_value(
t,j,initial_value_fct[j](time));
147 "Cannot shift time values for PeriodicOrbitTimeDiscretisation",
148 OOMPH_CURRENT_FUNCTION,
149 OOMPH_EXCEPTION_LOCATION);
156 "Cannot shift time positions for PeriodicOrbitTimeDiscretisation",
157 OOMPH_CURRENT_FUNCTION,
158 OOMPH_EXCEPTION_LOCATION);
232 if(Time_pt==0) {
return 0.0;}
233 else {
return Time_pt->
time();}
244 fill_in_generic_residual_contribution_orbit(
245 assembly_handler_pt,elem_pt,
258 fill_in_generic_residual_contribution_orbit(assembly_handler_pt,
260 residuals,jacobian,1);
265 std::ostream &outfile,
266 const unsigned &n_plot);
272 void fill_in_generic_residual_contribution_orbit(
276 const unsigned& flag);
286 unsigned n_time_dof = cast_time_stepper_pt->
ntstorage();
287 for(
unsigned i=0;
i<n_time_dof;
i++)
289 cast_time_stepper_pt->
Weight(0,
i) = 0.0;
290 cast_time_stepper_pt->
Weight(1,
i) = 0.0;
294 const double inverse_timescale = this->omega();
296 const unsigned n_node = this->nnode();
301 for(
unsigned l=0;l<n_node;l++)
303 global_eqn = this->eqn_number(this->nodal_local_eqn(l,0));
304 cast_time_stepper_pt->
Weight(0,global_eqn) = psi(l);
305 cast_time_stepper_pt->
Weight(1,global_eqn) =
306 dpsidt(l,0)*inverse_timescale;
312 virtual double dshape_and_dtest_eulerian_orbit(
const Vector<double> &
s,
320 virtual double dshape_and_dtest_eulerian_at_knot_orbit(
const unsigned &ipt,
343 template <
unsigned NNODE_1D>
389 this->get_interpolated_values(0,s,value);
399 const unsigned n_node = this->nnode();
403 for(
unsigned n=0;n<n_node;n++)
405 value[0] += this->nodal_value(t,n,0)*psi(n);
415 {
return this->node_pt(0)->ntstorage();}
421 const unsigned n_node = this->nnode();
428 (void)this->dshape_eulerian(s,psi,dpsidx);
431 const unsigned n_tstorage = this->node_pt(0)->ntstorage();
434 for(
unsigned t=0;
t<n_tstorage;
t++)
440 for(
unsigned n=0;n<n_node;n++)
442 const double dpsidx_ = dpsidx(n,0);
443 for(
unsigned t=0;
t<n_tstorage;
t++)
445 flux[
t] += this->nodal_value(
t,n,0)*dpsidx_;
469 void output(std::ostream &outfile,
const unsigned &n_plot)
481 void output(FILE* file_pt,
const unsigned &n_plot)
489 inline double dshape_and_dtest_eulerian_orbit(
496 inline double dshape_and_dtest_eulerian_at_knot_orbit(
const unsigned& ipt,
515 template<
unsigned NNODE_1D>
525 const double J = this->dshape_eulerian(s,psi,dpsidt);
543 template<
unsigned NNODE_1D>
553 const double J = this->dshape_eulerian_at_knot(ipt,psi,dpsidt);
566 template<
unsigned NNODE_1D>
573 template<
class ELEMENT>
577 template<
unsigned NNODE_1D>
590 this->boundary_node_pt(1,0)->
591 make_periodic(this->boundary_node_pt(0,0));
597 std::ostream &outfile,
const unsigned &n_plot)
600 const unsigned n_element = this->nelement();
601 for(
unsigned e=0;
e<n_element;
e++)
603 dynamic_cast<ELEMENT*
>(this->element_pt(
e))
604 ->orbit_output(elem_pt,outfile,n_plot);
617 const unsigned n_element = this->nelement();
618 for(
unsigned e=0;
e<n_element;
e++)
620 dynamic_cast<ELEMENT*
>(this->element_pt(
e))
621 ->fill_in_contribution_to_integrated_residuals(
622 assembly_handler_pt,elem_pt,residuals);
637 const unsigned n_element = this->nelement();
638 for(
unsigned e=0;
e<n_element;
e++)
640 dynamic_cast<ELEMENT*
>(this->element_pt(
e))
641 ->fill_in_contribution_to_integrated_jacobian(
642 assembly_handler_pt,elem_pt,residuals,jacobian);
675 template<
unsigned NNODE_1D>
712 const unsigned &n_element_in_period,
715 const double &omega) :
716 Problem_pt(problem_pt), N_element_in_period(n_element_in_period),
720 Ndof = problem_pt->
ndof();
727 (n_element_in_period);
729 Basic_time_mesh_pt = Time_mesh_pt;
733 Time_mesh_pt->max_permitted_error() = 1.0e-2;
734 Time_mesh_pt->min_permitted_error() = 1.0e-5;
735 Time_mesh_pt->max_refinement_level() = 10;
740 Time_mesh_pt->assign_global_eqn_numbers(dummy_dof_pt);
742 Time_mesh_pt->assign_local_eqn_numbers(
false);
745 N_tstorage = dummy_dof_pt.size();
753 for(
unsigned e=0;
e<n_element_in_period;
e++)
757 (Time_mesh_pt->element_pt(
e));
760 el_pt->
time_pt() = problem_pt->time_pt();
777 if(problem_pt->nsub_mesh() > 0)
780 "PeriodicOrbitHandler can't cope with submeshes yet",
781 OOMPH_CURRENT_FUNCTION,
782 OOMPH_EXCEPTION_LOCATION);
786 unsigned n_node = problem_pt->mesh_pt()->nnode();
787 for(
unsigned n=0;n<n_node;n++)
789 Node*
const nod_pt = problem_pt->mesh_pt()->node_pt(n);
792 unsigned n_value = nod_pt->
nvalue();
793 for(
unsigned i=0;
i<n_value;
i++)
797 const unsigned n_tstorage = nod_pt->
ntstorage();
798 const double value = nod_pt->
value(
i);
799 for(
unsigned t=1;
t<n_tstorage;
t++)
807 unsigned n_element = problem_pt->mesh_pt()->nelement();
808 for(
unsigned e=0;
e<n_element;
e++)
810 unsigned n_internal =
811 problem_pt->mesh_pt()->element_pt(
e)->ninternal_data();
812 for(
unsigned i=0;
i<n_internal;
i++)
815 Data*
const data_pt = problem_pt->mesh_pt()->element_pt(
e)
816 ->internal_data_pt(
i);
821 unsigned n_value = data_pt->
nvalue();
822 for(
unsigned j=0;j<n_value;j++)
826 const unsigned n_tstorage = data_pt->
ntstorage();
827 const double value = data_pt->
value(j);
828 for(
unsigned t=1;
t<n_tstorage;
t++)
839 oomph_info <<
"Re-allocated " << problem_pt->assign_eqn_numbers()
840 <<
" equation numbers\n";
843 problem_pt->Dof_pt.resize(Ndof*N_tstorage + 1);
847 for(
unsigned i=0;
i<N_tstorage;
i++)
849 unsigned offset = Ndof*
i;
850 for(
unsigned n=0;n<Ndof;n++)
852 problem_pt->Dof_pt[offset + n] = problem_pt->Dof_pt[n] +
i;
857 problem_pt->Dof_pt[Ndof*N_tstorage] = Ω
860 problem_pt->Dof_distribution_pt->build(problem_pt->communicator_pt(),
861 Ndof*N_tstorage+1,
true);
865 for(
unsigned i=0;
i<N_tstorage;
i++)
867 unsigned offset = Ndof*
i;
868 for(
unsigned n=0;n<Ndof;n++)
870 problem_pt->dof(offset + n) = initial_guess(i,n);
875 Previous_dofs.resize(Ndof*N_tstorage+1,0.0);
876 this->set_previous_dofs_to_current_dofs();
891 for(
unsigned n=0;n<Ndof*N_tstorage+1;n++)
893 Previous_dofs[n] = Problem_pt->
dof(n);
899 {
return ((elem_pt->
ndof())*N_tstorage + 1);}
904 const unsigned &ieqn_local)
907 unsigned raw_ndof = elem_pt->
ndof();
909 if(ieqn_local == raw_ndof*N_tstorage) {
return N_tstorage*Ndof;}
914 unsigned t = ieqn_local/raw_ndof;
916 unsigned raw_ieqn = ieqn_local%raw_ndof;
918 return t*Ndof + elem_pt->
eqn_number(raw_ieqn);
925 {Time_mesh_pt->assemble_residuals(
this,elem_pt,
934 const unsigned n_elem_dof = this->ndof(elem_pt);
935 dofs.resize(n_elem_dof);
938 for(
unsigned i=0;
i<n_elem_dof;
i++)
940 dofs[
i] = Problem_pt->
dof(this->eqn_number(elem_pt,
i));
948 const unsigned n_elem_dof = this->ndof(elem_pt);
949 dofs.resize(n_elem_dof);
952 for(
unsigned i=0;
i<n_elem_dof;
i++)
954 dofs[
i] = Previous_dofs[this->eqn_number(elem_pt,
i)];
963 const unsigned n_elem_dof = this->ndof(elem_pt);
966 for(
unsigned i=0;
i<n_elem_dof;
i++)
968 Problem_pt->
dof(this->eqn_number(elem_pt,
i)) = dofs[
i];
979 Time_mesh_pt->assemble_residuals_and_jacobian(
this,elem_pt,
1006 for(
unsigned e=0;
e<n_element;
e++)
1016 const unsigned n_node = Time_mesh_pt->nnode();
1018 for(
unsigned n=0;n<n_node;n++) {t[n] = Time_mesh_pt->node_pt(n)->x(0);}
1035 unsigned total_n_value=0;
1039 for(
unsigned i=0;
i<n_global_data;
i++)
1046 for(
unsigned n=0;n<n_node;n++)
1059 for(
unsigned e=0;
e<n_space_element;
e++)
1061 const unsigned n_internal_data =
1063 for(
unsigned i=0;
i<n_internal_data;
i++)
1076 unsigned n_time_node = Time_mesh_pt->nnode();
1077 for(
unsigned t=0;
t<n_time_node;
t++)
1079 Time_mesh_pt->node_pt(
t)->set_time_stepper(fake_space_time_stepper_pt,
1085 for(
unsigned i=0;
i<n_global_data;
i++)
1088 const unsigned n_value = glob_data_pt->
nvalue();
1089 for(
unsigned j=0;j<n_value;j++)
1091 for(
unsigned t=0;
t<N_tstorage;
t++)
1095 Time_mesh_pt->node_pt(
t)->set_value(count,0,glob_data_pt->
value(
t,j));
1102 for(
unsigned n=0;n<n_node;n++)
1105 const unsigned n_value = nod_pt->
nvalue();
1106 for(
unsigned i=0;
i<n_value;
i++)
1108 for(
unsigned t=0;
t<N_tstorage;
t++)
1110 Time_mesh_pt->node_pt(
t)->set_value(count,0,nod_pt->
value(
t,
i));
1119 const unsigned n_solid_value =
1121 for(
unsigned i=0;
i<n_solid_value;
i++)
1123 for(
unsigned t=0;
t<N_tstorage;
t++)
1125 Time_mesh_pt->node_pt(
t)->set_value(
1135 for(
unsigned e=0;
e<n_space_element;
e++)
1137 const unsigned n_internal =
1139 for(
unsigned i=0;
i<n_internal;
i++)
1141 Data*
const internal_dat_pt =
1144 const unsigned n_value = internal_dat_pt->
nvalue();
1145 for(
unsigned j=0;j<n_value;j++)
1147 for(
unsigned t=0;
t<N_tstorage;
t++)
1149 Time_mesh_pt->node_pt(
t)->
1150 set_value(count,0,internal_dat_pt->
value(
t,j));
1181 const unsigned n_time_element = Time_mesh_pt->nelement();
1183 Time_mesh_pt->spatial_error_estimator_pt()
1185 Basic_time_mesh_pt,elemental_error);
1188 for(
unsigned e=0;
e<n_time_element;
e++)
1236 Time_mesh_pt->assign_global_eqn_numbers(dummy_dof_pt);
1238 Time_mesh_pt->assign_local_eqn_numbers(
false);
1241 N_tstorage = dummy_dof_pt.size();
1243 N_element_in_period = Time_mesh_pt->nelement();
1250 for(
unsigned e=0;
e<N_element_in_period;
e++)
1254 (Time_mesh_pt->element_pt(
e));
1277 "PeriodicOrbitHandler can't cope with submeshes yet",
1278 OOMPH_CURRENT_FUNCTION,
1279 OOMPH_EXCEPTION_LOCATION);
1283 for(
unsigned n=0;n<n_node;n++)
1289 for(
unsigned e=0;
e<n_space_element;
e++)
1291 unsigned n_internal =
1293 for(
unsigned i=0;
i<n_internal;
i++)
1304 delete Time_stepper_pt;
1305 Time_stepper_pt = periodic_time_stepper_pt;
1310 <<
" equation numbers\n";
1313 Problem_pt->
Dof_pt.resize(Ndof*N_tstorage + 1);
1317 for(
unsigned i=0;
i<N_tstorage;
i++)
1319 unsigned offset = Ndof*
i;
1320 for(
unsigned n=0;n<Ndof;n++)
1327 Problem_pt->
Dof_pt[Ndof*N_tstorage] = Ω
1331 Ndof*N_tstorage+1,
true);
1338 for(
unsigned i=0;
i<n_global_data;
i++)
1341 const unsigned n_value = glob_data_pt->
nvalue();
1342 for(
unsigned j=0;j<n_value;j++)
1344 for(
unsigned t=0;
t<N_tstorage;
t++)
1349 Time_mesh_pt->node_pt(
t)->value(count,0));
1356 for(
unsigned n=0;n<n_node;n++)
1359 const unsigned n_value = nod_pt->
nvalue();
1360 for(
unsigned i=0;
i<n_value;
i++)
1362 for(
unsigned t=0;
t<N_tstorage;
t++)
1364 nod_pt->
set_value(
t,
i,Time_mesh_pt->node_pt(
t)->value(count,0));
1373 const unsigned n_solid_value =
1375 for(
unsigned i=0;
i<n_solid_value;
i++)
1377 for(
unsigned t=0;
t<N_tstorage;
t++)
1381 Time_mesh_pt->node_pt(
t)->value(count,0));
1389 for(
unsigned e=0;
e<n_space_element;
e++)
1391 const unsigned n_internal =
1393 for(
unsigned i=0;
i<n_internal;
i++)
1395 Data*
const internal_dat_pt =
1398 const unsigned n_value = internal_dat_pt->
nvalue();
1399 for(
unsigned j=0;j<n_value;j++)
1401 for(
unsigned t=0;
t<N_tstorage;
t++)
1405 Time_mesh_pt->node_pt(
t)->value(count,0));
1414 n_time_node = Time_mesh_pt->nnode();
1415 for(
unsigned t=0;
t<n_time_node;
t++)
1421 delete fake_space_time_stepper_pt;
1424 Previous_dofs.resize(Ndof*N_tstorage+1,0.0);
1425 this->set_previous_dofs_to_current_dofs();
1453 const unsigned n_dof = this->ndof();
1455 for(
unsigned i=0;
i<n_dof;
i++) {inner_product(
i,
i) = 1.0;}
1459 const double &
time=0.0)
virtual void get_inner_product_matrix(DenseMatrix< double > &inner_product)
Get the inner product matrix.
void assign_initial_positions_impulsive(Node *const &node_pt)
Broken initialisation of the positions for the node corresponding to an impulsive start...
void adapt_temporal_mesh()
Adapt the time mesh.
A Generalised Element class.
void get_interpolated_values(const unsigned &t, const Vector< double > &s, Vector< double > &value)
Return the temporal dummy values.
double value(const unsigned &i) const
Return i-th stored value. This function is not virtual so that it can be inlined. This means that if ...
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
void fill_in_contribution_to_integrated_residuals(PeriodicOrbitAssemblyHandlerBase *const &assembly_handler_pt, GeneralisedElement *const &elem_pt, Vector< double > &residuals)
Add the element's contribution to its residual vector (wrapper)
unsigned required_nvalue(const unsigned &n) const
Broken assignment operator.
void get_previous_dofs_for_element(GeneralisedElement *const elem_pt, Vector< double > &dofs)
Base class for finite elements that can compute the quantities that are required for the Z2 error est...
Problem * Problem_pt
Pointer to the problem.
void initialise(const T &val)
Initialize all values in the matrix to val.
void set_previous_dofs_to_current_dofs()
Update the previous dofs.
Mesh * Basic_time_mesh_pt
Storage for the mesh of temporal elements with a simple mesh pointer.
double dshape_and_dtest_eulerian_at_knot_orbit(const unsigned &ipt, Shape &psi, DShape &dpsidt, Shape &test, DShape &dtestdt) const
Shape, test functions & derivs. w.r.t. to global coords. at integration point ipt. Return Jacobian.
PeriodicOrbitTimeDiscretisation(const unsigned &n_tstorage)
Constructor for the case when we allow adaptive timestepping.
unsigned num_Z2_flux_terms()
Number of flux terms for Z2 error estimation This will be used to represent all spatial values...
void set_weights()
Set the weights.
double time() const
Return the global time, accessed via the time pointer.
static Steady< 0 > Default_TimeStepper
Default Steady Timestepper, to be used in default arguments to Mesh constructors. ...
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
unsigned N_element_in_period
Storage for number of elements in the period.
double omega()
Return the frequency.
Refineable version of the OneDMesh.
PeriodicOrbitTimeDiscretisation * Time_stepper_pt
Pointer to the timestepper.
double & time()
Return current value of continous time.
virtual void get_non_external_dofs(Vector< double > &u)
Interface to get the current value of all (internal and shared) unknowns.
Class to keep track of discrete/continous time. It is essential to have a single Time object when usi...
std::string Type
String that indicates the type of the timestepper (e.g. "BDF", "Newmark", etc.)
const double Pi
50 digits from maple
void output(std::ostream &outfile)
Function to return the number of values.
void operator=(const PeriodicOrbitTimeDiscretisation &)
Broken assignment operator.
LinearAlgebraDistribution * Dof_distribution_pt
The distribution of the DOFs in this problem. This object is created in the Problem constructor and s...
A general Finite Element class.
void build(const OomphCommunicator *const comm_pt, const unsigned &first_row, const unsigned &nrow_local, const unsigned &nrow=0)
Sets the distribution. Takes first_row, nrow_local and nrow as arguments. If nrow is not provided or ...
Vector< double > Previous_dofs
Storage for the previous solution.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
void fill_in_contribution_to_integrated_jacobian(PeriodicOrbitAssemblyHandlerBase *const &assembly_handler_pt, GeneralisedElement *const &elem_pt, Vector< double > &residuals, DenseMatrix< double > &jacobian)
Mesh *& mesh_pt()
Return a pointer to the global mesh.
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
OomphCommunicator * communicator_pt()
access function to the oomph-lib communicator
double Omega
Storage for the frequency of the orbit (scaled by 2pi)
void get_Z2_flux(const Vector< double > &s, Vector< double > &flux)
Get the fluxes for the recovert.
Time *& time_pt()
Retun the pointer to the global time.
unsigned long nelement() const
Return number of elements in the mesh.
double *& omega_pt()
Broken assignment operator.
void shift_time_values(Data *const &data_pt)
Broken shifting of time values.
virtual void get_non_external_ddofs_dt(Vector< double > &du_dt)
Node * vertex_node_pt(const unsigned &j) const
Pointer to the j-th vertex node in the element.
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
unsigned ndof(GeneralisedElement *const &elem_pt)
Return the number of degrees of freedom in the element elem_pt.
unsigned ndof() const
Return the number of equations/dofs in the element.
DenseMatrix< double > Weight
Storage for the weights associated with the timestepper.
void get_residuals(GeneralisedElement *const &elem_pt, Vector< double > &residuals)
Return the contribution to the residuals of the element elem_pt.
double & dof(const unsigned &i)
i-th dof in the problem
unsigned order() const
Return the actual order of the scheme.
double dshape_and_dtest_eulerian_orbit(const Vector< double > &s, Shape &psi, DShape &dpsidt, Shape &test, DShape &dtestdt) const
Shape, test functions & derivs. w.r.t. to global coords. Return Jacobian.
PeriodicOrbitEquations(const PeriodicOrbitEquations &dummy)
Broken copy constructor.
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
void discrete_times(Vector< double > &t)
Tell me the times at which you want the solution.
double(* InitialConditionFctPt)(const double &t)
Typedef for function that returns the (scalar) initial value at a given value of the continuous time ...
unsigned N_tstorage
Storage for the number of unknown time values.
PeriodicOrbitTemporalMesh< SpectralPeriodicOrbitElement< NNODE_1D > > * Time_mesh_pt
Storage for mesh of temporal elements.
unsigned ncont_interpolated_values() const
Number of continuously interpolated values (1)
void set_value(const unsigned &i, const double &value_)
Set the i-th stored data value to specified value. The only reason that we require an explicit set fu...
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
unsigned long eqn_number(const unsigned &ieqn_local) const
Return the global equation number corresponding to the ieqn_local-th local equation number...
void set_time_stepper(TimeStepper *const &time_stepper_pt, const bool &preserve_existing_data)
Set a new timestepper by resizing the appropriate storage. If already assigned the equation numbering...
Time * Time_pt
Pointer to discrete time storage scheme.
void assemble_residuals_and_jacobian(PeriodicOrbitAssemblyHandlerBase *const &assembly_handler_pt, GeneralisedElement *const &elem_pt, Vector< double > &residuals, DenseMatrix< double > &jacobian)
Time *& time_pt()
Return a pointer to the global time object.
A class that represents a collection of data; each Data object may contain many different individual ...
Data *const & variable_position_pt() const
Pointer to variable_position data (const version)
void assign_initial_values_impulsive(Data *const &data_pt)
Broken initialisation the time-history for the Data values corresponding to an impulsive start...
double & time()
Return the current value of the continuous time.
A special temporal mesh class.
unsigned nprev_values() const
Number of previous values available.
PeriodicOrbitTemporalMesh(const unsigned &n_element)
Constructor, create a 1D mesh from 0 to 1 that is periodic.
void get_interpolated_values(const Vector< double > &s, Vector< double > &value)
Return the dummy values.
A class that is used to define the functions used to assemble the elemental contributions to the resi...
void shape(const double &s, double *Psi)
Definition for 1D Lagrange shape functions. The value of all the shape functions at the local coordin...
void initialise(const _Tp &__value)
Iterate over all values and set to the desired value.
SpectralPeriodicOrbitElement()
Constructor: Call constructors for QElement and Poisson equations.
void set_ntstorage(const unsigned &n_tstorage)
Set the total number of time storage values.
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
Node *& node_pt(const unsigned long &n)
Return pointer to global node n.
PeriodicOrbitBaseElement()
unsigned long nnode() const
Return number of nodes in the mesh.
unsigned ntstorage() const
Return total number of doubles stored per value to record time history of each value (one for steady ...
virtual void spacetime_output(std::ostream &outilfe, const unsigned &Nplot, const double &time=0.0)
Time * Time_pt
Pointer to global time.
void get_dofs_for_element(GeneralisedElement *const elem_pt, Vector< double > &dofs)
unsigned ninternal_data() const
Return the number of internal data objects.
A Class for nodes that deform elastically (i.e. position is an unknown in the problem). The idea is that the Eulerian positions are stored in a Data object and the Lagrangian coordinates are stored in addition. The pointer that addresses the Eulerian positions is set to the pointer to Value in the Data object. Hence, SolidNode uses knowledge of the internal structure of Data and must be a friend of the Data class. In order to allow a mesh to deform via an elastic-style equation in deforming-domain problems, the positions are stored separately from the values, so that elastic problems may be combined with any other type of problem.
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
unsigned long eqn_number(GeneralisedElement *const &elem_pt, const unsigned &ieqn_local)
Return the global equation number of the local unknown ieqn_local in elem_pt.
Timestepper used to calculate periodic orbits directly. It's not really a "timestepper" per se...
Data *& global_data_pt(const unsigned &i)
Return a pointer to the the i-th global data object.
bool is_pinned(const unsigned &i) const
Test whether the i-th variable is pinned (1: true; 0: false).
void orbit_output(GeneralisedElement *const &elem_pt, std::ostream &outfile, const unsigned &n_plot)
unsigned nglobal_data() const
Return the number of global data values.
void set_timestepper_weights(const Shape &psi, const DShape &dpsidt)
Set the timestepper weights.
unsigned long assign_eqn_numbers(const bool &assign_local_eqn_numbers=true)
Assign all equation numbers for problem: Deals with global data (= data that isn't attached to any el...
Vector< double * > Dof_pt
Vector of pointers to dofs.
SpectralPeriodicOrbitElement(const SpectralPeriodicOrbitElement< NNODE_1D > &dummy)
Broken copy constructor.
void output(FILE *file_pt)
C-style output function: x,y,u or x,y,z,u.
unsigned ndt() const
Number of timestep increments that need to be stored by the scheme.
PeriodicOrbitAssemblyHandlerBase()
void assign_initial_data_values(Data *const &data_pt, Vector< InitialConditionFctPt > initial_value_fct)
Initialise the time-history for the Data values, corresponding to given time history, specified by Vector of function pointers.
unsigned nsub_mesh() const
Return number of submeshes.
unsigned nrecovery_order()
Order of recovery shape functions.
void get_jacobian(GeneralisedElement *const &elem_pt, Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the elemental Jacobian matrix "d equation / d variable" for elem_pt.
void orbit_output(std::ostream &outfile, const unsigned &n_plot)
Calculate all desired vectors and matrices provided by the element elem_pt.
Time *const & time_pt() const
Return the pointer to the global time (const version)
void output(std::ostream &outfile, const unsigned &n_plot)
Output function: x,y,u or x,y,z,u at n_plot^DIM plot points.
~PeriodicOrbitAssemblyHandler()
Destructor, destroy the time mesh.
unsigned nvertex_node() const
Number of vertex nodes in the element.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
unsigned Ndof
Store number of degrees of freedom in the original problem.
void assemble_residuals(PeriodicOrbitAssemblyHandlerBase *const &assembly_handler_pt, GeneralisedElement *const &elem_pt, Vector< double > &residuals)
double value(const unsigned &i) const
Return i-th value (dofs or pinned) at this node either directly or via hanging node representation...
void set_dofs_for_element(GeneralisedElement *const elem_pt, Vector< double > const &dofs)
void shift_time_positions(Node *const &node_pt)
Broken shifting of time positions.
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function: x,y,u or x,y,z,u at n_plot^DIM plot points.
PeriodicOrbitTimeDiscretisation(const PeriodicOrbitTimeDiscretisation &)
Broken copy constructor.