PolyFEM
Loading...
Searching...
No Matches
polyfem::problem::ElasticCantileverExact Class Reference

#include <ElasticProblem.hpp>

Inheritance diagram for polyfem::problem::ElasticCantileverExact:
[legend]
Collaboration diagram for polyfem::problem::ElasticCantileverExact:
[legend]

Public Member Functions

 ElasticCantileverExact (const std::string &name)
 
void rhs (const assembler::Assembler &assembler, const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override
 
bool is_rhs_zero () const override
 
void dirichlet_bc (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &uv, const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override
 
void neumann_bc (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &uv, const Eigen::MatrixXd &pts, const Eigen::MatrixXd &normals, const double t, Eigen::MatrixXd &val) const override
 
bool has_exact_sol () const override
 
void exact (const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override
 
void exact_grad (const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const override
 
bool is_scalar () const override
 
void set_parameters (const json &params) override
 
- Public Member Functions inherited from polyfem::assembler::Problem
 Problem (const std::string &name)
 
virtual void set_units (const assembler::Assembler &assembler, const Units &units)
 
virtual ~Problem ()
 
virtual void init (const mesh::Mesh &mesh)
 
const std::string & name () const
 
virtual void pressure_bc (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &uv, const Eigen::MatrixXd &pts, const Eigen::MatrixXd &normals, const double t, Eigen::MatrixXd &val) const
 
virtual double pressure_cavity_bc (const int boundary_id, const double t) const
 
virtual bool is_boundary_pressure (const int boundary_id) const
 
virtual void dirichlet_nodal_value (const mesh::Mesh &mesh, const int node_id, const RowVectorNd &pt, const double t, Eigen::MatrixXd &val) const
 
virtual void neumann_nodal_value (const mesh::Mesh &mesh, const int node_id, const RowVectorNd &pt, const Eigen::MatrixXd &normal, const double t, Eigen::MatrixXd &val) const
 
virtual bool is_nodal_dirichlet_boundary (const int n_id, const int tag)
 
virtual bool is_nodal_neumann_boundary (const int n_id, const int tag)
 
virtual bool has_nodal_dirichlet ()
 
virtual bool has_nodal_neumann ()
 
virtual void clear ()
 
virtual bool is_time_dependent () const
 
virtual bool is_constant_in_time () const
 
virtual void initial_solution (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const
 
virtual void initial_velocity (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const
 
virtual void initial_acceleration (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const
 
virtual void initial_density (const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const
 
virtual bool might_have_no_dirichlet ()
 
virtual bool is_dimension_dirichet (const int tag, const int dim) const
 
virtual bool is_nodal_dimension_dirichlet (const int n_id, const int tag, const int dim) const
 
virtual bool all_dimensions_dirichlet () const
 
void setup_bc (const mesh::Mesh &mesh, const int n_bases, const std::vector< basis::ElementBases > &bases, const std::vector< basis::ElementBases > &geom_bases, const std::vector< basis::ElementBases > &pressure_bases, std::vector< mesh::LocalBoundary > &local_boundary, std::vector< int > &boundary_nodes, std::vector< mesh::LocalBoundary > &local_neumann_boundary, std::vector< mesh::LocalBoundary > &local_pressure_boundary, std::unordered_map< int, std::vector< mesh::LocalBoundary > > &local_pressure_cavity, std::vector< int > &pressure_boundary_nodes, std::vector< int > &dirichlet_nodes, std::vector< int > &neumann_nodes)
 
virtual void update_nodes (const Eigen::VectorXi &in_node_to_node)
 

Private Member Functions

VectorNd eval_fun (const VectorNd &pt, const double t) const
 
AutodiffGradPt eval_fun (const AutodiffGradPt &pt, const double t) const
 
AutodiffHessianPt eval_fun (const AutodiffHessianPt &pt, const double t) const
 
int size_for (const Eigen::MatrixXd &pts) const
 

Private Attributes

double singular_point_displacement
 
double E
 
double nu
 
std::string formulation
 
double length
 
double width
 

Additional Inherited Members

- Protected Attributes inherited from polyfem::assembler::Problem
std::vector< int > boundary_ids_
 
std::vector< int > neumann_boundary_ids_
 
std::vector< int > normal_aligned_neumann_boundary_ids_
 
std::vector< int > pressure_boundary_ids_
 
std::vector< int > pressure_cavity_ids_
 
std::vector< int > splitting_pressure_boundary_ids_
 

Detailed Description

Definition at line 185 of file ElasticProblem.hpp.

Constructor & Destructor Documentation

◆ ElasticCantileverExact()

polyfem::problem::ElasticCantileverExact::ElasticCantileverExact ( const std::string &  name)

Definition at line 634 of file ElasticProblem.cpp.

References polyfem::assembler::Problem::boundary_ids_, polyfem::assembler::Problem::clear(), E, formulation, length, polyfem::assembler::Problem::neumann_boundary_ids_, nu, singular_point_displacement, and width.

Here is the call graph for this function:

Member Function Documentation

◆ dirichlet_bc()

void polyfem::problem::ElasticCantileverExact::dirichlet_bc ( const mesh::Mesh mesh,
const Eigen::MatrixXi &  global_ids,
const Eigen::MatrixXd &  uv,
const Eigen::MatrixXd &  pts,
const double  t,
Eigen::MatrixXd &  val 
) const
overridevirtual

Implements polyfem::assembler::Problem.

Definition at line 708 of file ElasticProblem.cpp.

References exact(), and val.

Here is the call graph for this function:

◆ eval_fun() [1/3]

AutodiffGradPt polyfem::problem::ElasticCantileverExact::eval_fun ( const AutodiffGradPt pt,
const double  t 
) const
private

Definition at line 800 of file ElasticProblem.cpp.

References E, length, nu, singular_point_displacement, and width.

◆ eval_fun() [2/3]

AutodiffHessianPt polyfem::problem::ElasticCantileverExact::eval_fun ( const AutodiffHessianPt pt,
const double  t 
) const
private

Definition at line 805 of file ElasticProblem.cpp.

References E, length, nu, singular_point_displacement, and width.

◆ eval_fun() [3/3]

VectorNd polyfem::problem::ElasticCantileverExact::eval_fun ( const VectorNd pt,
const double  t 
) const
private

Definition at line 795 of file ElasticProblem.cpp.

References E, length, nu, singular_point_displacement, and width.

Referenced by exact(), exact_grad(), neumann_bc(), and rhs().

Here is the caller graph for this function:

◆ exact()

void polyfem::problem::ElasticCantileverExact::exact ( const Eigen::MatrixXd &  pts,
const double  t,
Eigen::MatrixXd &  val 
) const
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 713 of file ElasticProblem.cpp.

References eval_fun(), size_for(), and val.

Referenced by dirichlet_bc().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exact_grad()

void polyfem::problem::ElasticCantileverExact::exact_grad ( const Eigen::MatrixXd &  pts,
const double  t,
Eigen::MatrixXd &  val 
) const
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 723 of file ElasticProblem.cpp.

References eval_fun(), DiffScalarBase::setVariableCount(), size_for(), and val.

Here is the call graph for this function:

◆ has_exact_sol()

bool polyfem::problem::ElasticCantileverExact::has_exact_sol ( ) const
inlineoverridevirtual

Implements polyfem::assembler::Problem.

Definition at line 196 of file ElasticProblem.hpp.

◆ is_rhs_zero()

bool polyfem::problem::ElasticCantileverExact::is_rhs_zero ( ) const
inlineoverridevirtual

Implements polyfem::assembler::Problem.

Definition at line 191 of file ElasticProblem.hpp.

◆ is_scalar()

bool polyfem::problem::ElasticCantileverExact::is_scalar ( ) const
inlineoverridevirtual

Implements polyfem::assembler::Problem.

Definition at line 199 of file ElasticProblem.hpp.

Referenced by size_for().

Here is the caller graph for this function:

◆ neumann_bc()

void polyfem::problem::ElasticCantileverExact::neumann_bc ( const mesh::Mesh mesh,
const Eigen::MatrixXi &  global_ids,
const Eigen::MatrixXd &  uv,
const Eigen::MatrixXd &  pts,
const Eigen::MatrixXd &  normals,
const double  t,
Eigen::MatrixXd &  val 
) const
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 746 of file ElasticProblem.cpp.

References polyfem::mesh::Mesh::dimension(), E, eval_fun(), formulation, polyfem::mesh::Mesh::get_boundary_id(), nu, DiffScalarBase::setVariableCount(), and val.

Here is the call graph for this function:

◆ rhs()

void polyfem::problem::ElasticCantileverExact::rhs ( const assembler::Assembler assembler,
const Eigen::MatrixXd &  pts,
const double  t,
Eigen::MatrixXd &  val 
) const
overridevirtual

Implements polyfem::assembler::Problem.

Definition at line 684 of file ElasticProblem.cpp.

References polyfem::assembler::Assembler::compute_rhs(), E, eval_fun(), nu, DiffScalarBase::setVariableCount(), size_for(), and val.

Here is the call graph for this function:

◆ set_parameters()

void polyfem::problem::ElasticCantileverExact::set_parameters ( const json params)
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 651 of file ElasticProblem.cpp.

References E, formulation, length, nu, singular_point_displacement, and width.

◆ size_for()

int polyfem::problem::ElasticCantileverExact::size_for ( const Eigen::MatrixXd &  pts) const
inlineprivate

Definition at line 207 of file ElasticProblem.hpp.

References is_scalar().

Referenced by exact(), exact_grad(), and rhs().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ E

double polyfem::problem::ElasticCantileverExact::E
private

◆ formulation

std::string polyfem::problem::ElasticCantileverExact::formulation
private

Definition at line 212 of file ElasticProblem.hpp.

Referenced by ElasticCantileverExact(), neumann_bc(), and set_parameters().

◆ length

double polyfem::problem::ElasticCantileverExact::length
private

◆ nu

double polyfem::problem::ElasticCantileverExact::nu
private

◆ singular_point_displacement

double polyfem::problem::ElasticCantileverExact::singular_point_displacement
private

◆ width

double polyfem::problem::ElasticCantileverExact::width
private

The documentation for this class was generated from the following files: