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

#include <ElasticProblem.hpp>

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

Public Member Functions

 DoubleTorsionElasticProblem (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 initial_solution (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const override
 
void initial_velocity (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const override
 
void initial_acceleration (const mesh::Mesh &mesh, const Eigen::MatrixXi &global_ids, const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) const override
 
bool has_exact_sol () const override
 
bool is_scalar () const override
 
bool is_constant_in_time () const override
 
bool is_time_dependent () 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 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
 
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 exact (const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const
 
virtual void exact_grad (const Eigen::MatrixXd &pts, const double t, Eigen::MatrixXd &val) const
 
virtual void clear ()
 
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 Attributes

double angular_v0_ = 0.5
 
double angular_v1_ = -0.5
 
std::array< int, 2 > coordiante_0_ = {{0, 1}}
 
std::array< int, 2 > coordiante_1_ = {{0, 1}}
 
RowVectorNd trans_0_
 
RowVectorNd trans_1_
 

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 50 of file ElasticProblem.hpp.

Constructor & Destructor Documentation

◆ DoubleTorsionElasticProblem()

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

Member Function Documentation

◆ dirichlet_bc()

void polyfem::problem::DoubleTorsionElasticProblem::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 145 of file ElasticProblem.cpp.

References angular_v0_, angular_v1_, polyfem::assembler::Problem::boundary_ids_, coordiante_0_, coordiante_1_, polyfem::mesh::Mesh::dimension(), polyfem::mesh::Mesh::get_boundary_id(), trans_0_, trans_1_, and val.

Here is the call graph for this function:

◆ has_exact_sol()

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

Implements polyfem::assembler::Problem.

Definition at line 64 of file ElasticProblem.hpp.

◆ initial_acceleration()

void polyfem::problem::DoubleTorsionElasticProblem::initial_acceleration ( const mesh::Mesh mesh,
const Eigen::MatrixXi &  global_ids,
const Eigen::MatrixXd &  pts,
Eigen::MatrixXd &  val 
) const
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 140 of file ElasticProblem.cpp.

References val.

◆ initial_solution()

void polyfem::problem::DoubleTorsionElasticProblem::initial_solution ( const mesh::Mesh mesh,
const Eigen::MatrixXi &  global_ids,
const Eigen::MatrixXd &  pts,
Eigen::MatrixXd &  val 
) const
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 132 of file ElasticProblem.cpp.

References val.

◆ initial_velocity()

void polyfem::problem::DoubleTorsionElasticProblem::initial_velocity ( const mesh::Mesh mesh,
const Eigen::MatrixXi &  global_ids,
const Eigen::MatrixXd &  pts,
Eigen::MatrixXd &  val 
) const
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 136 of file ElasticProblem.cpp.

References val.

◆ is_constant_in_time()

bool polyfem::problem::DoubleTorsionElasticProblem::is_constant_in_time ( ) const
inlineoverridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 66 of file ElasticProblem.hpp.

◆ is_rhs_zero()

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

Implements polyfem::assembler::Problem.

Definition at line 56 of file ElasticProblem.hpp.

◆ is_scalar()

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

Implements polyfem::assembler::Problem.

Definition at line 65 of file ElasticProblem.hpp.

◆ is_time_dependent()

bool polyfem::problem::DoubleTorsionElasticProblem::is_time_dependent ( ) const
inlineoverridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 67 of file ElasticProblem.hpp.

◆ rhs()

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

Implements polyfem::assembler::Problem.

Definition at line 127 of file ElasticProblem.cpp.

References val.

◆ set_parameters()

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

Member Data Documentation

◆ angular_v0_

double polyfem::problem::DoubleTorsionElasticProblem::angular_v0_ = 0.5
private

Definition at line 72 of file ElasticProblem.hpp.

Referenced by dirichlet_bc(), and set_parameters().

◆ angular_v1_

double polyfem::problem::DoubleTorsionElasticProblem::angular_v1_ = -0.5
private

Definition at line 73 of file ElasticProblem.hpp.

Referenced by dirichlet_bc(), and set_parameters().

◆ coordiante_0_

std::array<int, 2> polyfem::problem::DoubleTorsionElasticProblem::coordiante_0_ = {{0, 1}}
private

Definition at line 74 of file ElasticProblem.hpp.

Referenced by dirichlet_bc(), and set_parameters().

◆ coordiante_1_

std::array<int, 2> polyfem::problem::DoubleTorsionElasticProblem::coordiante_1_ = {{0, 1}}
private

Definition at line 75 of file ElasticProblem.hpp.

Referenced by dirichlet_bc(), and set_parameters().

◆ trans_0_

RowVectorNd polyfem::problem::DoubleTorsionElasticProblem::trans_0_
private

Definition at line 76 of file ElasticProblem.hpp.

Referenced by dirichlet_bc(), DoubleTorsionElasticProblem(), and set_parameters().

◆ trans_1_

RowVectorNd polyfem::problem::DoubleTorsionElasticProblem::trans_1_
private

Definition at line 77 of file ElasticProblem.hpp.

Referenced by dirichlet_bc(), DoubleTorsionElasticProblem(), and set_parameters().


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