46 std::string(equation_name),
47 "FEM for linear elasticity.")
50 "Settings for computing balance.")
52 "Parameters of output stream.")
54 "Linear solver for elasticity.")
57 .make_field_descriptor_type(equation_name)),
59 "Input fields of the equation.")
61 EqData().output_fields.make_output_type(equation_name,
""),
63 "Setting of the field output.")
75 FEObjects::FEObjects(
Mesh *mesh_,
unsigned int fe_order)
76 : q_(
QGauss::make_array(2))
86 xprintf(
PrgErr,
"Unsupported polynomial order %d for finite elements in Elasticity", fe_order);
91 ds_ = std::make_shared<EqualOrderDiscreteSpace>(mesh_,
fe_);
92 dh_ = std::make_shared<DOFHandlerMultiDim>(*mesh_);
94 dh_->distribute_dofs(
ds_);
98 dh_scalar_ = make_shared<DOFHandlerMultiDim>(*mesh_);
99 std::shared_ptr<DiscreteSpace> ds = std::make_shared<EqualOrderDiscreteSpace>( mesh_, fe_p);
104 dh_tensor_ = make_shared<DOFHandlerMultiDim>(*mesh_);
105 std::shared_ptr<DiscreteSpace> dst = std::make_shared<EqualOrderDiscreteSpace>( mesh_, fe_t);
114 template<> std::shared_ptr<FiniteElement<0>> FEObjects::fe<0>() {
return fe_[0_d]; }
115 template<> std::shared_ptr<FiniteElement<1>> FEObjects::fe<1>() {
return fe_[1_d]; }
116 template<> std::shared_ptr<FiniteElement<2>> FEObjects::fe<2>() {
return fe_[2_d]; }
117 template<> std::shared_ptr<FiniteElement<3>> FEObjects::fe<3>() {
return fe_[3_d]; }
130 return young*0.5/(poisson+1.);
136 return young*poisson/((poisson+1.)*(1.-2.*poisson));
145 return Selection(
"Elasticity_BC_Type",
"Types of boundary conditions for mechanics.")
146 .
add_value(bc_type_displacement,
"displacement",
147 "Prescribed displacement.")
148 .
add_value(bc_type_displacement_normal,
"displacement_n",
149 "Prescribed displacement in the normal direction to the boundary.")
151 "Prescribed traction.")
153 "Prescribed stress tensor.")
163 "Type of boundary condition.")
165 .input_default(
"\"traction\"")
166 .input_selection( get_bc_type_selection() )
169 *
this+=bc_displacement
170 .name(
"bc_displacement")
171 .description(
"Prescribed displacement on boundary.")
173 .input_default(
"0.0")
178 .description(
"Prescribed traction on boundary.")
180 .input_default(
"0.0")
185 .description(
"Prescribed stress on boundary.")
187 .input_default(
"0.0")
192 .description(
"Prescribed bulk load.")
193 .units(
UnitSI().N().m(-3) )
194 .input_default(
"0.0")
198 .name(
"young_modulus")
199 .description(
"Young's modulus.")
201 .input_default(
"0.0")
202 .flags_add(in_main_matrix & in_rhs);
205 .name(
"poisson_ratio")
206 .description(
"Poisson's ratio.")
207 .units(
UnitSI().dimensionless() )
208 .input_default(
"0.0")
209 .flags_add(in_main_matrix & in_rhs);
211 *
this+=fracture_sigma
212 .name(
"fracture_sigma")
214 "Coefficient of transfer of forces through fractures.")
216 .input_default(
"1.0")
217 .flags_add(in_main_matrix & in_rhs);
219 *
this += region_id.name(
"region_id")
223 *
this += subdomain.name(
"subdomain")
228 .name(
"cross_section")
229 .units(
UnitSI().m(3).md() )
230 .flags(input_copy & in_time_term & in_main_matrix & in_rhs);
232 *
this+=potential_load
233 .name(
"potential_load")
235 .flags(input_copy & in_rhs);
238 .name(
"displacement")
239 .description(
"Displacement vector field output.")
241 .flags(equation_result);
243 *
this += output_stress
245 .description(
"Stress tensor output.")
247 .flags(equation_result);
249 *
this += output_von_mises_stress
250 .name(
"von_mises_stress")
251 .description(
"von Mises stress output.")
253 .flags(equation_result);
255 *
this += output_cross_section
256 .name(
"cross_section_updated")
257 .description(
"Cross-section after deformation - output.")
259 .flags(equation_result);
261 *
this += output_divergence
262 .name(
"displacement_divergence")
263 .description(
"Displacement divergence output.")
264 .units(
UnitSI().dimensionless() )
265 .flags(equation_result);
268 output_fields += *
this;
275 allocation_done(false)
291 ASSERT( time_from_rec.
is_default() ).error(
"Duplicate key 'time', time in elasticity is already initialized from parent class!");
303 DebugOut().fmt(
"Mechanics: solution size {}\n",
feo->
dh()->n_global_dofs());
351 std::string petsc_default_opts;
352 petsc_default_opts =
"-ksp_type cg -pc_type hypre -pc_hypre_type boomeramg";
389 compute_output_fields<1>();
390 compute_output_fields<2>();
391 compute_output_fields<3>();
412 std::stringstream ss;
429 MatSetOption(*
ls->
get_matrix(), MAT_KEEP_NONZERO_PATTERN, PETSC_TRUE);
436 MessageOut().fmt(
"[mech solver] lin. it: {}, reason: {}, residual: {}\n",
492 DebugOut() <<
"Mechanics: Assembling matrix.\n";
508 DebugOut() <<
"Mechanics: Assembling right hand side.\n";
520 MessageOut().fmt(
"[mech solver] lin. it: {}, reason: {}, residual: {}\n",
550 template<
unsigned int dim>
553 QGauss q(dim, 0), q_sub(dim-1, 0);
558 const unsigned int ndofs =
feo->
fe<dim>()->n_dofs();
569 for (
auto cell :
feo->
dh()->own_range())
571 if (cell.dim() == dim)
573 auto elm = cell.elm();
577 double mu =
lame_mu(young, poisson);
581 LocDofVec dof_indices = cell.get_loc_dof_indices();
587 for (
unsigned int i=0; i<ndofs; i++)
589 stress += (2*mu*
vec.sym_grad(i,0) + lambda*
vec.divergence(i,0)*arma::eye(3,3))*output_vec[dof_indices[i]];
590 div +=
vec.divergence(i,0)*output_vec[dof_indices[i]];
593 arma::mat33 stress_dev = stress - arma::trace(stress)/3*arma::eye(3,3);
594 double von_mises_stress = sqrt(1.5*arma::dot(stress_dev, stress_dev));
595 output_div_vec[dof_indices_scalar[0]] += div;
597 for (
unsigned int i=0; i<3; i++)
598 for (
unsigned int j=0; j<3; j++)
599 output_stress_vec[dof_indices_tensor[i*3+j]] += stress(i,j);
600 output_von_mises_stress_vec[dof_indices_scalar[0]] = von_mises_stress;
604 else if (cell.dim() == dim-1)
606 auto elm = cell.elm();
607 double normal_displacement = 0;
613 double mu =
lame_mu(young, poisson);
616 for (
unsigned int inb=0; inb<elm->n_neighs_vb(); inb++)
618 auto side = elm->neigh_vb[inb]->side();
619 auto cell_side = side->element();
622 feo->
dh()->cell_accessor_from_element(cell_side.idx()).get_loc_dof_indices();
624 for (
unsigned int i=0; i<ndofs; i++)
626 normal_displacement -= arma::dot(vec_side.value(i,0)*output_vec[side_dof_indices[i]], fsv.
normal_vector(0));
627 arma::mat33 grad = -arma::kron(vec_side.value(i,0)*output_vec[side_dof_indices[i]], fsv.
normal_vector(0).t()) / csection;
628 normal_stress += mu*(grad+grad.t()) + lambda*arma::trace(grad)*arma::eye(3,3);
633 for (
unsigned int i=0; i<3; i++)
634 for (
unsigned int j=0; j<3; j++)
635 output_stress_vec[dof_indices_tensor[i*3+j]] += normal_stress(i,j);
636 output_cross_sec_vec[dof_indices_scalar[0]] += normal_displacement;
637 output_div_vec[dof_indices_scalar[0]] += normal_displacement / csection;
667 assemble_volume_integrals<1>();
668 assemble_volume_integrals<2>();
669 assemble_volume_integrals<3>();
673 assemble_fluxes_boundary<1>();
674 assemble_fluxes_boundary<2>();
675 assemble_fluxes_boundary<3>();
679 assemble_matrix_element_side<1>();
680 assemble_matrix_element_side<2>();
681 assemble_matrix_element_side<3>();
688 template<
unsigned int dim>
693 const unsigned int ndofs =
feo->
fe<dim>()->n_dofs(), qsize =
feo->
q<dim>()->size();
697 PetscScalar local_matrix[ndofs*ndofs];
701 for (
auto cell :
feo->
dh()->own_range())
703 if (cell.dim() != dim)
continue;
706 fe_values.
reinit(elm_acc);
707 cell.get_dof_indices(dof_indices);
714 for (
unsigned int i=0; i<ndofs; i++)
715 for (
unsigned int j=0; j<ndofs; j++)
716 local_matrix[i*ndofs+j] = 0;
718 for (
unsigned int k=0; k<qsize; k++)
720 double mu =
lame_mu(young[k], poisson[k]);
722 for (
unsigned int i=0; i<ndofs; i++)
724 for (
unsigned int j=0; j<ndofs; j++)
725 local_matrix[i*ndofs+j] += csection[k]*(
726 2*mu*arma::dot(
vec.sym_grad(j,k),
vec.sym_grad(i,k))
727 + lambda*
vec.divergence(j,k)*
vec.divergence(i,k)
742 assemble_sources<1>();
743 assemble_sources<2>();
744 assemble_sources<3>();
745 assemble_rhs_element_side<1>();
746 assemble_rhs_element_side<2>();
747 assemble_rhs_element_side<3>();
748 assemble_boundary_conditions<1>();
749 assemble_boundary_conditions<2>();
750 assemble_boundary_conditions<3>();
757 template<
unsigned int dim>
762 const unsigned int ndofs =
feo->
fe<dim>()->n_dofs(), qsize =
feo->
q<dim>()->size();
766 PetscScalar local_rhs[ndofs];
771 for (
auto cell :
feo->
dh()->own_range())
773 if (cell.dim() != dim)
continue;
776 fe_values.
reinit(elm_acc);
777 cell.get_dof_indices(dof_indices);
780 fill_n(local_rhs, ndofs, 0);
781 local_source_balance_vector.assign(ndofs, 0);
782 local_source_balance_rhs.assign(ndofs, 0);
789 for (
unsigned int k=0; k<qsize; k++)
791 for (
unsigned int i=0; i<ndofs; i++)
793 arma::dot(load[k],
vec.value(i,k))
794 -potential[k]*
vec.divergence(i,k)
795 )*csection[k]*fe_values.
JxW(k);
822 template<
unsigned int dim>
827 const unsigned int ndofs =
feo->
fe<dim>()->n_dofs(), qsize =
feo->
q<dim-1>()->size();
829 PetscScalar local_matrix[ndofs*ndofs];
833 for (
unsigned int iedg=0; iedg<
feo->
dh()->n_loc_edges(); iedg++)
836 if (edg.
n_sides() > 1)
continue;
838 if (edg.
side(0)->
dim() != dim-1)
continue;
848 fe_values_side.
reinit(*side);
850 for (
unsigned int i=0; i<ndofs; i++)
851 for (
unsigned int j=0; j<ndofs; j++)
852 local_matrix[i*ndofs+j] = 0;
856 for (
unsigned int k=0; k<qsize; k++)
857 for (
unsigned int i=0; i<ndofs; i++)
858 for (
unsigned int j=0; j<ndofs; j++)
863 for (
unsigned int k=0; k<qsize; k++)
864 for (
unsigned int i=0; i<ndofs; i++)
865 for (
unsigned int j=0; j<ndofs; j++)
881 template<
unsigned int dim>
884 if (dim == 1)
return;
890 const unsigned int ndofs_side =
feo->
fe<dim>()->n_dofs();
891 const unsigned int ndofs_sub =
feo->
fe<dim-1>()->n_dofs();
892 const unsigned int qsize =
feo->
q<dim-1>()->size();
896 vector<double> csection_lower(qsize), csection_higher(qsize), young(qsize), poisson(qsize), alpha(qsize);
897 PetscScalar local_matrix[2][2][(ndofs_side)*(ndofs_side)];
903 side_dof_indices[0].resize(ndofs_sub);
904 side_dof_indices[1].resize(ndofs_side);
907 for (
unsigned int inb=0; inb<
feo->
dh()->n_loc_nb(); inb++)
916 fe_values_sub.
reinit(cell_sub);
922 fe_values_side.
reinit(dh_side.side());
925 bool own_element_id[2];
926 own_element_id[0] =
feo->
dh()->cell_accessor_from_element(cell_sub.
idx()).is_own();
927 own_element_id[1] =
feo->
dh()->cell_accessor_from_element(cell.
idx()).is_own();
935 for (
unsigned int n=0; n<2; ++n)
936 for (
unsigned int i=0; i<ndofs_side; i++)
937 for (
unsigned int m=0; m<2; ++m)
938 for (
unsigned int j=0; j<ndofs_side; j++)
939 local_matrix[n][m][i*(ndofs_side)+j] = 0;
942 for (
unsigned int k=0; k<qsize; k++)
945 double mu =
lame_mu(young[k], poisson[k]);
948 for (
int n=0; n<2; n++)
950 if (!own_element_id[n])
continue;
952 for (
unsigned int i=0; i<n_dofs[n]; i++)
954 arma::vec3 vi = (n==0)?arma::zeros(3):vec_side.value(i,k);
955 arma::vec3 vf = (n==1)?arma::zeros(3):vec_sub.value(i,k);
956 arma::mat33 gvft = (n==0)?vec_sub.grad(i,k):arma::zeros(3,3);
958 for (
int m=0; m<2; m++)
959 for (
unsigned int j=0; j<n_dofs[m]; j++) {
960 arma::vec3 ui = (m==0)?arma::zeros(3):vec_side.value(j,k);
961 arma::vec3 uf = (m==1)?arma::zeros(3):vec_sub.value(j,k);
963 double divuit = (m==1)?arma::trace(guit):0;
965 local_matrix[n][m][i*n_dofs[m] + j] +=
966 frac_sigma[k]*csection_higher[k]*(
968 2*csection_higher[k]/csection_lower[k]*(mu*(uf-ui)+(mu+lambda)*(arma::dot(uf-ui,nv)*nv))
969 + mu*arma::trans(guit)*nv
972 - arma::dot(gvft, mu*arma::kron(nv,ui.t()) + lambda*arma::dot(ui,nv)*arma::eye(3,3))
973 )*fe_values_sub.
JxW(k);
980 for (
unsigned int n=0; n<2; ++n)
981 for (
unsigned int m=0; m<2; ++m)
982 ls->
mat_set_values(n_dofs[n], side_dof_indices[n].
data(), n_dofs[m], side_dof_indices[m].
data(), local_matrix[n][m]);
988 template<
unsigned int dim>
991 if (dim == 1)
return;
997 const unsigned int ndofs_side =
feo->
fe<dim>()->n_dofs();
998 const unsigned int ndofs_sub =
feo->
fe<dim-1>()->n_dofs();
999 const unsigned int qsize =
feo->
q<dim-1>()->size();
1002 vector<double> frac_sigma(qsize), potential(qsize), csection_higher(qsize);
1003 PetscScalar local_rhs[2][ndofs_side];
1009 side_dof_indices[0].resize(ndofs_sub);
1010 side_dof_indices[1].resize(ndofs_side);
1013 for (
unsigned int inb=0; inb<
feo->
dh()->n_loc_nb(); inb++)
1020 feo->
dh()->cell_accessor_from_element(cell_sub.
idx()).get_dof_indices(side_dof_indices[0]);
1021 fe_values_sub.
reinit(cell_sub);
1024 feo->
dh()->cell_accessor_from_element(cell.
idx()).get_dof_indices(side_dof_indices[1]);
1028 bool own_element_id[2];
1029 own_element_id[0] =
feo->
dh()->cell_accessor_from_element(cell_sub.
idx()).is_own();
1030 own_element_id[1] =
feo->
dh()->cell_accessor_from_element(cell.
idx()).is_own();
1036 for (
unsigned int n=0; n<2; ++n)
1037 for (
unsigned int i=0; i<ndofs_side; i++)
1038 local_rhs[n][i] = 0;
1041 for (
unsigned int k=0; k<qsize; k++)
1045 for (
int n=0; n<2; n++)
1047 if (!own_element_id[n])
continue;
1049 for (
unsigned int i=0; i<n_dofs[n]; i++)
1051 arma::vec3 vi = (n==0)?arma::zeros(3):vec_side.value(i,k);
1052 arma::vec3 vf = (n==1)?arma::zeros(3):vec_sub.value(i,k);
1054 local_rhs[n][i] -= frac_sigma[k]*csection_higher[k]*arma::dot(vf-vi,potential[k]*nv)*fe_values_sub.
JxW(k);
1059 for (
unsigned int n=0; n<2; ++n)
1068 template<
unsigned int dim>
1073 const unsigned int ndofs =
feo->
fe<dim>()->n_dofs(), qsize =
feo->
q<dim-1>()->size();
1076 double local_rhs[ndofs];
1089 for (
unsigned int si=0; si<elm->
n_sides(); ++si)
1092 Side side = *cell.elm().side(si);
1094 if (edg.
n_sides() > 1)
continue;
1098 if (side.
dim() != dim-1)
1107 fe_values_side.
reinit(side);
1117 cell.get_dof_indices(side_dof_indices);
1119 fill_n(local_rhs, ndofs, 0);
1120 local_flux_balance_vector.assign(ndofs, 0);
1125 for (
unsigned int k=0; k<qsize; k++)
1126 for (
unsigned int i=0; i<ndofs; i++)
1131 for (
unsigned int k=0; k<qsize; k++)
1132 for (
unsigned int i=0; i<ndofs; i++)
1137 for (
unsigned int k=0; k<qsize; k++)
1139 for (
unsigned int i=0; i<ndofs; i++)
1140 local_rhs[i] += csection[k]*arma::dot(
vec.value(i,k),bc_traction[k] + bc_potential[k]*fe_values_side.
normal_vector(k))*fe_values_side.
JxW(k);
1145 for (
unsigned int k=0; k<qsize; k++)
1147 for (
unsigned int i=0; i<ndofs; i++)
1149 local_rhs[i] += csection[k]*arma::dot(
vec.value(i,k),-bc_stress[k]*fe_values_side.
normal_vector(k) + bc_potential[k]*fe_values_side.
normal_vector(k))*fe_values_side.
JxW(k);
BCField< 3, FieldValue< 3 >::Enum > bc_type
std::shared_ptr< DiscreteSpace > ds_
BCField< 3, FieldValue< 3 >::VectorFixed > bc_displacement
Field< 3, FieldValue< 3 >::TensorFixed > output_stress
unsigned int n_sides() const
Returns number of sides aligned with the edge.
Field< 3, FieldValue< 3 >::Scalar > young_modulus
static const Input::Type::Record & get_input_type()
Main balance input record type.
static auto subdomain(Mesh &mesh) -> IndexField
static constexpr const char * name()
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > output_von_mises_stress_ptr
Field< 3, FieldValue< 3 >::Scalar > output_von_mises_stress
Transformed quadrature weight for cell sides.
RegionSet get_region_set(const std::string &set_name) const
const FEValuesViews::Vector< spacedim > & vector_view(unsigned int i) const
Accessor to vector values of multicomponent FE.
arma::Col< IntIdx > LocDofVec
unsigned int * boundary_idx_
void assemble_matrix_element_side()
Assembles the fluxes between elements of different dimensions depending on displacement.
static constexpr Mask in_main_matrix
A field is part of main "stiffness matrix" of the equation.
Solver based on the original PETSc solver using MPIAIJ matrix and succesive Schur complement construc...
void inc()
Iterates to next local element.
Field< 3, FieldValue< 3 >::Scalar > region_id
unsigned int side_idx() const
Returns local index of the side on the element.
Field< 3, FieldValue< 3 >::Scalar > output_cross_section
static const Input::Type::Record & get_input_type()
The specification of output stream.
unsigned int get_dof_indices(std::vector< LongIdx > &indices) const
Fill vector of the global indices of dofs associated to the cell.
Edge edge() const
Returns pointer to the edge connected to the side.
void set_from_input(const Input::Record in_rec) override
#define MessageOut()
Macro defining 'message' record of log.
virtual void start_add_assembly()
void output(TimeStep step)
virtual PetscErrorCode mat_zero_entries()
virtual void rhs_set_values(int nrow, int *rows, double *vals)=0
void next_time()
Proceed to the next time according to current estimated time step.
static const Input::Type::Record & get_input_type()
Declare input record type for the equation TransportDG.
void assemble_rhs()
Assembles the right hand side (forces, boundary conditions, tractions).
arma::vec3 centre() const
Centre of side.
static std::shared_ptr< OutputTime > create_output_stream(const std::string &equation_name, const Input::Record &in_rec, std::string unit_str)
This method delete all object instances of class OutputTime stored in output_streams vector...
LinSys * ls
Linear algebra system for the transport equation.
Fields computed from the mesh data.
virtual void start_allocation()
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::TensorFixed > > output_stress_ptr
Cell accessor allow iterate over DOF handler cells.
Class FEValues calculates finite element data on the actual cells such as shape function values...
virtual void finish_assembly()=0
Field< 3, FieldValue< 3 >::Scalar > cross_section
Pointer to DarcyFlow field cross_section.
Class FESystem for compound finite elements.
LocDofVec get_loc_dof_indices() const
Returns the local indices of dofs associated to the cell on the local process.
SideIter side(const unsigned int loc_index)
double lame_mu(double young, double poisson)
const RegionDB & region_db() const
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library...
const Armor::array & point_list() const
Return coordinates of all quadrature points in the actual cell system.
const TimeStep & step(int index=-1) const
void update_solution() override
Computes the solution in one time instant.
std::shared_ptr< DOFHandlerMultiDim > dh()
arma::mat33 mat_t(const arma::mat33 &m, const arma::vec3 &n)
Basic time management functionality for unsteady (and steady) solvers (class Equation).
void assemble_rhs_element_side()
Assemble fluxes between different dimensions that are independent of displacement.
ElementAccessor< 3 > element() const
Returns iterator to the element of the side.
void reinit(const ElementAccessor< spacedim > &cell)
Update cell-dependent data (gradients, Jacobians etc.)
void compute_output_fields()
Input::Record input_rec
Record with input specification.
Field< 3, FieldValue< 3 >::Scalar > potential_load
Potential of an additional (external) load.
Vec rhs
Vector of right hand side.
void view(const char *name="") const
Symmetric Gauss-Legendre quadrature formulae on simplices.
static Input::Type::Record & record_template()
Template Record with common keys for derived equations.
FEM for linear elasticity.
bool allocation_done
Indicates whether matrices have been preallocated.
ElementAccessor< 3 > element()
Transformed quadrature points.
unsigned int dim() const
Returns dimension of the side, that is dimension of the element minus one.
BCField< 3, FieldValue< 3 >::VectorFixed > bc_traction
bool is_boundary() const
Returns true for side on the boundary.
void solve_linear_system()
Solve without updating time step and without output.
void assemble_sources()
Assembles the right hand side vector due to volume sources.
Definitions of basic Lagrangean finite elements with polynomial shape functions.
static constexpr Mask equation_external_output
Match an output field, that can be also copy of other field.
void update_output_fields()
unsigned int n_sides() const
MixedPtr< FiniteElement > fe_
Finite elements for the solution of the mechanics equation.
static auto region_id(Mesh &mesh) -> IndexField
#define START_TIMER(tag)
Starts a timer with specified tag.
virtual Value::return_type const & value(const Point &p, const ElementAccessor< spacedim > &elm) const
Field< 3, FieldValue< 3 >::Scalar > output_divergence
void zero_time_step() override
Initialize solution in the zero time.
static constexpr Mask in_rhs
A field is part of the right hand side of the equation.
Shape function gradients.
void output_data()
Postprocesses the solution and writes to output file.
Mat stiffness_matrix
The stiffness matrix.
std::shared_ptr< FiniteElement< dim > > fe()
virtual void value_list(const Armor::array &point_list, const ElementAccessor< spacedim > &elm, std::vector< typename Value::return_type > &value_list) const
double measure() const
Calculate metrics of the side.
virtual const Vec * get_rhs()
virtual PetscErrorCode rhs_zero_entries()
Field< 3, FieldValue< 3 >::VectorFixed > load
void set_solution(Vec sol_vec)
Field< 3, FieldValue< 3 >::Scalar > fracture_sigma
Transition parameter for diffusive transfer on fractures.
void assemble_fluxes_boundary()
Assembles the fluxes on the boundary.
void mark_input_times(const TimeGovernor &tg)
vector< Neighbour > vb_neighbours_
void assemble_boundary_conditions()
Assembles the r.h.s. components corresponding to the Dirichlet boundary conditions for a given space ...
void set_input_list(Input::Array input_list, const TimeGovernor &tg)
Field< 3, FieldValue< 3 >::Scalar > poisson_ratio
void initialize(std::shared_ptr< OutputTime > stream, Mesh *mesh, Input::Record in_rec, const TimeGovernor &tg)
std::shared_ptr< DOFHandlerMultiDim > dh_tensor_
void set_components(const std::vector< string > &names)
BCField< 3, FieldValue< 3 >::TensorFixed > bc_stress
EquationOutput output_fields
static const int registrar
Registrar of class to factory.
void set_field(const RegionSet &domain, FieldBasePtr field, double time=0.0)
void next_time()
Pass to next time and update equation data.
bool set_time(const TimeStep &time, LimitSide limit_side)
void initialize() override
EqData data_
Field data for model parameters.
double lame_lambda(double young, double poisson)
static const Input::Type::Selection & get_bc_type_selection()
MixedPtr< FESystem > mixed_fe_system(MixedPtr< FiniteElement > fe, Args &&...args)
Definitions of particular quadrature rules on simplices.
#define WarningOut()
Macro defining 'warning' record of log.
virtual SolveInfo solve()=0
#define END_TIMER(tag)
Ends a timer with specified tag.
static string default_output_field()
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::VectorFixed > > output_field_ptr
static const Input::Type::Record & get_input_type()
Edge edge(uint edge_idx) const
std::shared_ptr< DOFHandlerMultiDim > dh_
Object for distribution of dofs.
void set_mesh(const Mesh &mesh)
void assemble_stiffness_matrix()
Assembles the stiffness matrix.
std::shared_ptr< DOFHandlerMultiDim > dh_scalar()
virtual void mat_set_values(int nrow, int *rows, int ncol, int *cols, double *vals)=0
double JxW(const unsigned int point_no)
Return the product of Jacobian determinant and the quadrature weight at given quadrature point...
Class for representation SI units of Fields.
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > output_div_ptr
std::shared_ptr< DOFHandlerMultiDim > dh_tensor()
void assemble_volume_integrals()
Assembles the volume integrals into the stiffness matrix.
virtual const Mat * get_matrix()
void calculate_cumulative_balance()
Elasticity(Mesh &init_mesh, const Input::Record in_rec, TimeGovernor *tm=nullptr)
Constructor.
std::shared_ptr< FieldFE< 3, FieldValue< 3 >::Scalar > > output_cross_section_ptr
arma::vec::fixed< spacedim > point(const unsigned int point_no)
Return coordinates of the quadrature point in the actual cell system.
static UnitSI & dimensionless()
Returns dimensionless unit.
#define DebugOut()
Macro defining 'debug' record of log.
static bool print_message_table(ostream &stream, std::string equation_name)
unsigned int idx() const
Return local idx of element in boundary / bulk part of element vector.
virtual double compute_residual()=0
Field< 3, FieldValue< 3 >::VectorFixed > output_field
std::shared_ptr< DOFHandlerMultiDim > dh_scalar_
SideIter side(const unsigned int i) const
Gets side iterator of the i -th side.
Field< 3, FieldValue< 3 >::Scalar > subdomain
Definitions of Raviart-Thomas finite elements.
Side accessor allows to iterate over sides of DOF handler cell.
FieldCommon & output_type(OutputTime::DiscreteSpace rt)
ElementAccessor< 3 > element_accessor()
std::shared_ptr< OutputTime > output_stream_
Mechanics::FEObjects * feo
Finite element objects.
double dirichlet_penalty(SideIter side)
Penalty to enforce boundary value in weak sense.
Transformed quadrature weights.
arma::vec::fixed< spacedim > normal_vector(unsigned int point_no)
Returns the normal vector to a side at given quadrature point.