27 #ifndef OOMPH_FVK_VOLUME_CONSTRAINT_ELEMENT_HEADER
28 #define OOMPH_FVK_VOLUME_CONSTRAINT_ELEMENT_HEADER
31 #include <oomph-lib-config.h>
34 #include "../generic/elements.h"
35 #include "../meshes/triangle_mesh.h"
50 template<
class ELEMENT,
template<
class>
class MESH>
63 MESH<ELEMENT>* bounding_mesh_pt,
65 const double& pressure = 0.0)
92 double bounded_volume = 0.0;
96 for (
unsigned r = 0; r < n_contributing_regions; r++)
101 for (
unsigned e = 0;
e < n_inner_el;
e++)
104 ELEMENT* el_pt =
dynamic_cast<ELEMENT*
>(
106 bounded_volume += el_pt->get_bounded_volume();
109 return bounded_volume;
A class that represents a collection of data; each Data object may contain many different individual ...
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...
A class which allows the user to specify a prescribed volume (as opposed to a prescribed pressure) fo...
double get_bounded_volume()
Returns the volume "under the elements" in the constrained regions.
Data * pressure_data_pt() const
Access to Data object whose single value contains the pressure that has been "traded" for the volume ...
FoepplvonKarmanVolumeConstraintElement(const FoepplvonKarmanVolumeConstraintElement &)=delete
Broken copy constructor.
MESH< ELEMENT > * Bounding_mesh_pt
Pointer to mesh of Foeppl von Karman elements that bound the prescribed volume; NULL if the FvK eleme...
int Volume_control_local_eqn
Local equation number of volume constraint.
Data * Volume_control_pressure_pt
Data object whose single value contains the pressure that has been "traded" for the volume constraint...
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in contribution to elemental residual and Jacobian.
unsigned Pressure_data_index
Unsigned indicating which internal Data object stores the pressure.
double * Prescribed_volume_pt
Pointer to target volume.
~FoepplvonKarmanVolumeConstraintElement()
void operator=(const FoepplvonKarmanVolumeConstraintElement &)=delete
Broken assignment operator.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in residual: Difference between actual and prescribed bounded volume.
void set_prescribed_volume(double *volume_pt)
Set pointer to target volume.
Vector< unsigned > Contributing_region
Region IDs in the bounding mesh that contribute to the prescribed/controlled volume.
void assign_additional_local_eqn_numbers()
Assign the equation number for the new equation.
FoepplvonKarmanVolumeConstraintElement(MESH< ELEMENT > *bounding_mesh_pt, const Vector< unsigned > &contributing_region, const double &pressure=0.0)
Constructor. Takes pointer to mesh of Foeppl von Karman elements and a vector of unsigneds which iden...
A Generalised Element class.
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) internal data object to the element and return the index required to obtain it ...
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Return the local equation number corresponding to the j-th value stored at the i-th internal data.
//////////////////////////////////////////////////////////////////// ////////////////////////////////...