PolyFEM
Loading...
Searching...
No Matches
polyfem::assembler::GenericTensorProblem Class Reference

#include <GenericProblem.hpp>

Inheritance diagram for polyfem::assembler::GenericTensorProblem:
[legend]
Collaboration diagram for polyfem::assembler::GenericTensorProblem:
[legend]

Public Member Functions

 GenericTensorProblem (const std::string &name)
 
void set_units (const assembler::Assembler &assembler, const Units &units) override
 
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
 
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 override
 
double pressure_cavity_bc (const int boundary_id, const double t) const override
 
void dirichlet_nodal_value (const mesh::Mesh &mesh, const int node_id, const RowVectorNd &pt, const double t, Eigen::MatrixXd &val) const override
 
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 override
 
bool is_nodal_dirichlet_boundary (const int n_id, const int tag) override
 
bool is_nodal_neumann_boundary (const int n_id, const int tag) override
 
bool has_nodal_dirichlet () override
 
bool has_nodal_neumann () override
 
bool is_nodal_dimension_dirichlet (const int n_id, const int tag, const int dim) const override
 
void update_nodes (const Eigen::VectorXi &in_node_to_node) override
 
bool has_exact_sol () const override
 
bool is_scalar () const override
 
bool is_time_dependent () const override
 
void set_time_dependent (const bool val)
 
bool is_constant_in_time () const override
 
bool might_have_no_dirichlet () 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
 
void set_parameters (const json &params) override
 
bool is_dimension_dirichet (const int tag, const int dim) const override
 
bool all_dimensions_dirichlet () 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
 
void add_dirichlet_boundary (const int id, const Eigen::RowVector3d &val, const bool isx, const bool isy, const bool isz, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >())
 
void add_neumann_boundary (const int id, const Eigen::RowVector3d &val, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >())
 
void add_pressure_boundary (const int id, const double val, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >())
 
void update_dirichlet_boundary (const int id, const Eigen::RowVector3d &val, const bool isx, const bool isy, const bool isz, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >())
 
void update_neumann_boundary (const int id, const Eigen::RowVector3d &val, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >())
 
void update_pressure_boundary (const int id, const double val, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >())
 
void add_dirichlet_boundary (const int id, const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> &func, const bool isx, const bool isy, const bool isz, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >())
 
void add_neumann_boundary (const int id, const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> &func, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >())
 
void add_pressure_boundary (const int id, const std::function< double(double x, double y, double z, double t)> &func, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >())
 
void update_dirichlet_boundary (const int id, const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> &func, const bool isx, const bool isy, const bool isz, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >())
 
void update_neumann_boundary (const int id, const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> &func, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >())
 
void update_pressure_boundary (const int id, const std::function< double(double x, double y, double z, double t)> &func, const std::shared_ptr< utils::Interpolation > &interp=std::make_shared< utils::NoInterpolation >())
 
void add_dirichlet_boundary (const int id, const json &val, const bool isx, const bool isy, const bool isz, const std::string &interpolation="")
 
void add_neumann_boundary (const int id, const json &val, const std::string &interpolation="")
 
void add_pressure_boundary (const int id, json val, const std::string &interpolation="")
 
void update_dirichlet_boundary (const int id, const json &val, const bool isx, const bool isy, const bool isz, const std::string &interpolation="")
 
void update_neumann_boundary (const int id, const json &val, const std::string &interpolation="")
 
void update_pressure_boundary (const int id, json val, const std::string &interpolation="")
 
void set_rhs (double x, double y, double z)
 
void clear () override
 
- Public Member Functions inherited from polyfem::assembler::Problem
 Problem (const std::string &name)
 
virtual ~Problem ()
 
virtual void init (const mesh::Mesh &mesh)
 
const std::string & name () const
 
virtual bool is_boundary_pressure (const int boundary_id) const
 
virtual void initial_density (const Eigen::MatrixXd &pts, Eigen::MatrixXd &val) 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)
 

Private Attributes

bool all_dimensions_dirichlet_ = true
 
bool has_exact_ = false
 
bool has_exact_grad_ = false
 
bool is_time_dept_ = false
 
std::vector< TensorBCValueforces_
 
std::vector< TensorBCValuedisplacements_
 
std::vector< ScalarBCValuenormal_aligned_forces_
 
std::vector< ScalarBCValuepressures_
 
std::unordered_map< int, ScalarBCValuecavity_pressures_
 
std::vector< std::pair< int, std::array< utils::ExpressionValue, 3 > > > initial_position_
 
std::vector< std::pair< int, std::array< utils::ExpressionValue, 3 > > > initial_velocity_
 
std::vector< std::pair< int, std::array< utils::ExpressionValue, 3 > > > initial_acceleration_
 
std::array< utils::ExpressionValue, 3 > rhs_
 
std::array< utils::ExpressionValue, 3 > exact_
 
std::array< utils::ExpressionValue, 9 > exact_grad_
 
std::map< int, TensorBCValuenodal_dirichlet_
 
std::map< int, TensorBCValuenodal_neumann_
 
std::vector< Eigen::MatrixXd > nodal_dirichlet_mat_
 
bool is_all_
 

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 39 of file GenericProblem.hpp.

Constructor & Destructor Documentation

◆ GenericTensorProblem()

polyfem::assembler::GenericTensorProblem::GenericTensorProblem ( const std::string &  name)

Definition at line 80 of file GenericProblem.cpp.

Member Function Documentation

◆ add_dirichlet_boundary() [1/3]

void polyfem::assembler::GenericTensorProblem::add_dirichlet_boundary ( const int  id,
const Eigen::RowVector3d &  val,
const bool  isx,
const bool  isy,
const bool  isz,
const std::shared_ptr< utils::Interpolation > &  interp = std::make_shared< utils::NoInterpolation >() 
)

◆ add_dirichlet_boundary() [2/3]

void polyfem::assembler::GenericTensorProblem::add_dirichlet_boundary ( const int  id,
const json val,
const bool  isx,
const bool  isy,
const bool  isz,
const std::string &  interpolation = "" 
)

Definition at line 511 of file GenericProblem.cpp.

References all_dimensions_dirichlet_, polyfem::assembler::Problem::boundary_ids_, polyfem::utils::Interpolation::build(), displacements_, and val.

Here is the call graph for this function:

◆ add_dirichlet_boundary() [3/3]

void polyfem::assembler::GenericTensorProblem::add_dirichlet_boundary ( const int  id,
const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> &  func,
const bool  isx,
const bool  isy,
const bool  isz,
const std::shared_ptr< utils::Interpolation > &  interp = std::make_shared< utils::NoInterpolation >() 
)

◆ add_neumann_boundary() [1/3]

void polyfem::assembler::GenericTensorProblem::add_neumann_boundary ( const int  id,
const Eigen::RowVector3d &  val,
const std::shared_ptr< utils::Interpolation > &  interp = std::make_shared< utils::NoInterpolation >() 
)

◆ add_neumann_boundary() [2/3]

void polyfem::assembler::GenericTensorProblem::add_neumann_boundary ( const int  id,
const json val,
const std::string &  interpolation = "" 
)

Definition at line 530 of file GenericProblem.cpp.

References polyfem::utils::Interpolation::build(), forces_, polyfem::assembler::Problem::neumann_boundary_ids_, and val.

Here is the call graph for this function:

◆ add_neumann_boundary() [3/3]

void polyfem::assembler::GenericTensorProblem::add_neumann_boundary ( const int  id,
const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> &  func,
const std::shared_ptr< utils::Interpolation > &  interp = std::make_shared< utils::NoInterpolation >() 
)

◆ add_pressure_boundary() [1/3]

void polyfem::assembler::GenericTensorProblem::add_pressure_boundary ( const int  id,
const double  val,
const std::shared_ptr< utils::Interpolation > &  interp = std::make_shared< utils::NoInterpolation >() 
)

◆ add_pressure_boundary() [2/3]

void polyfem::assembler::GenericTensorProblem::add_pressure_boundary ( const int  id,
const std::function< double(double x, double y, double z, double t)> &  func,
const std::shared_ptr< utils::Interpolation > &  interp = std::make_shared< utils::NoInterpolation >() 
)

◆ add_pressure_boundary() [3/3]

void polyfem::assembler::GenericTensorProblem::add_pressure_boundary ( const int  id,
json  val,
const std::string &  interpolation = "" 
)

Definition at line 545 of file GenericProblem.cpp.

References polyfem::utils::Interpolation::build(), polyfem::assembler::Problem::pressure_boundary_ids_, pressures_, and val.

Here is the call graph for this function:

◆ all_dimensions_dirichlet()

bool polyfem::assembler::GenericTensorProblem::all_dimensions_dirichlet ( ) const
inlineoverridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 84 of file GenericProblem.hpp.

References all_dimensions_dirichlet_.

Referenced by is_dimension_dirichet().

Here is the caller graph for this function:

◆ clear()

void polyfem::assembler::GenericTensorProblem::clear ( )
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 1153 of file GenericProblem.cpp.

References all_dimensions_dirichlet_, cavity_pressures_, clear(), displacements_, exact_, exact_grad_, forces_, has_exact_, has_exact_grad_, initial_acceleration_, initial_position_, initial_velocity_, is_all_, is_time_dept_, nodal_dirichlet_, nodal_dirichlet_mat_, nodal_neumann_, normal_aligned_forces_, pressures_, and rhs_.

Referenced by clear().

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

◆ dirichlet_bc()

void polyfem::assembler::GenericTensorProblem::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 182 of file GenericProblem.cpp.

References polyfem::assembler::Problem::boundary_ids_, polyfem::mesh::Mesh::dimension(), displacements_, polyfem::mesh::Mesh::get_boundary_id(), is_all_, and val.

Here is the call graph for this function:

◆ dirichlet_nodal_value()

void polyfem::assembler::GenericTensorProblem::dirichlet_nodal_value ( const mesh::Mesh mesh,
const int  node_id,
const RowVectorNd pt,
const double  t,
Eigen::MatrixXd &  val 
) const
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 644 of file GenericProblem.cpp.

References polyfem::mesh::Mesh::dimension(), polyfem::mesh::Mesh::get_node_id(), is_all_, nodal_dirichlet_, nodal_dirichlet_mat_, and val.

Here is the call graph for this function:

◆ exact()

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

Reimplemented from polyfem::assembler::Problem.

Definition at line 276 of file GenericProblem.cpp.

References exact_, has_exact_sol(), val, x, y, and z.

Here is the call graph for this function:

◆ exact_grad()

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

Reimplemented from polyfem::assembler::Problem.

Definition at line 292 of file GenericProblem.cpp.

References exact_grad_, has_exact_grad_, val, x, y, and z.

◆ has_exact_sol()

bool polyfem::assembler::GenericTensorProblem::has_exact_sol ( ) const
inlineoverridevirtual

Implements polyfem::assembler::Problem.

Definition at line 70 of file GenericProblem.hpp.

References has_exact_.

Referenced by exact().

Here is the caller graph for this function:

◆ has_nodal_dirichlet()

bool polyfem::assembler::GenericTensorProblem::has_nodal_dirichlet ( )
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 720 of file GenericProblem.cpp.

References nodal_dirichlet_mat_.

◆ has_nodal_neumann()

bool polyfem::assembler::GenericTensorProblem::has_nodal_neumann ( )
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 725 of file GenericProblem.cpp.

◆ initial_acceleration()

void polyfem::assembler::GenericTensorProblem::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 1120 of file GenericProblem.cpp.

References polyfem::mesh::Mesh::get_body_id(), initial_acceleration_, and val.

Here is the call graph for this function:

◆ initial_solution()

void polyfem::assembler::GenericTensorProblem::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 1054 of file GenericProblem.cpp.

References polyfem::mesh::Mesh::get_body_id(), initial_position_, and val.

Here is the call graph for this function:

◆ initial_velocity()

void polyfem::assembler::GenericTensorProblem::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 1087 of file GenericProblem.cpp.

References polyfem::mesh::Mesh::get_body_id(), initial_velocity_, and val.

Here is the call graph for this function:

◆ is_constant_in_time()

bool polyfem::assembler::GenericTensorProblem::is_constant_in_time ( ) const
inlineoverridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 74 of file GenericProblem.hpp.

References is_time_dept_.

◆ is_dimension_dirichet()

bool polyfem::assembler::GenericTensorProblem::is_dimension_dirichet ( const int  tag,
const int  dim 
) const
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 158 of file GenericProblem.cpp.

References all_dimensions_dirichlet(), polyfem::assembler::Problem::boundary_ids_, displacements_, and is_all_.

Here is the call graph for this function:

◆ is_nodal_dimension_dirichlet()

bool polyfem::assembler::GenericTensorProblem::is_nodal_dimension_dirichlet ( const int  n_id,
const int  tag,
const int  dim 
) const
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 730 of file GenericProblem.cpp.

References nodal_dirichlet_, and nodal_dirichlet_mat_.

◆ is_nodal_dirichlet_boundary()

bool polyfem::assembler::GenericTensorProblem::is_nodal_dirichlet_boundary ( const int  n_id,
const int  tag 
)
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 698 of file GenericProblem.cpp.

References nodal_dirichlet_, and nodal_dirichlet_mat_.

◆ is_nodal_neumann_boundary()

bool polyfem::assembler::GenericTensorProblem::is_nodal_neumann_boundary ( const int  n_id,
const int  tag 
)
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 715 of file GenericProblem.cpp.

References nodal_neumann_.

◆ is_rhs_zero()

bool polyfem::assembler::GenericTensorProblem::is_rhs_zero ( ) const
inlineoverridevirtual

Implements polyfem::assembler::Problem.

Definition at line 46 of file GenericProblem.hpp.

References rhs_.

Referenced by rhs().

Here is the caller graph for this function:

◆ is_scalar()

bool polyfem::assembler::GenericTensorProblem::is_scalar ( ) const
inlineoverridevirtual

Implements polyfem::assembler::Problem.

Definition at line 71 of file GenericProblem.hpp.

◆ is_time_dependent()

bool polyfem::assembler::GenericTensorProblem::is_time_dependent ( ) const
inlineoverridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 72 of file GenericProblem.hpp.

References is_time_dept_.

◆ might_have_no_dirichlet()

bool polyfem::assembler::GenericTensorProblem::might_have_no_dirichlet ( )
inlineoverridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 75 of file GenericProblem.hpp.

References is_all_.

◆ neumann_bc()

void polyfem::assembler::GenericTensorProblem::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 215 of file GenericProblem.cpp.

References polyfem::mesh::Mesh::dimension(), forces_, polyfem::mesh::Mesh::get_boundary_id(), polyfem::assembler::Problem::neumann_boundary_ids_, normal_aligned_forces_, polyfem::assembler::Problem::normal_aligned_neumann_boundary_ids_, and val.

Here is the call graph for this function:

◆ neumann_nodal_value()

void polyfem::assembler::GenericTensorProblem::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
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 692 of file GenericProblem.cpp.

References polyfem::log_and_throw_error().

Here is the call graph for this function:

◆ pressure_bc()

void polyfem::assembler::GenericTensorProblem::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
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 250 of file GenericProblem.cpp.

References polyfem::mesh::Mesh::get_boundary_id(), polyfem::assembler::Problem::pressure_boundary_ids_, pressures_, and val.

Here is the call graph for this function:

◆ pressure_cavity_bc()

double polyfem::assembler::GenericTensorProblem::pressure_cavity_bc ( const int  boundary_id,
const double  t 
) const
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 269 of file GenericProblem.cpp.

References cavity_pressures_.

◆ rhs()

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

Implements polyfem::assembler::Problem.

Definition at line 137 of file GenericProblem.cpp.

References is_rhs_zero(), rhs_, val, x, y, and z.

Here is the call graph for this function:

◆ set_parameters()

◆ set_rhs()

void polyfem::assembler::GenericTensorProblem::set_rhs ( double  x,
double  y,
double  z 
)

Definition at line 637 of file GenericProblem.cpp.

References rhs_, x, y, and z.

◆ set_time_dependent()

void polyfem::assembler::GenericTensorProblem::set_time_dependent ( const bool  val)
inline

Definition at line 73 of file GenericProblem.hpp.

References is_time_dept_, and val.

◆ set_units()

void polyfem::assembler::GenericTensorProblem::set_units ( const assembler::Assembler assembler,
const Units units 
)
overridevirtual

◆ update_dirichlet_boundary() [1/3]

void polyfem::assembler::GenericTensorProblem::update_dirichlet_boundary ( const int  id,
const Eigen::RowVector3d &  val,
const bool  isx,
const bool  isy,
const bool  isz,
const std::shared_ptr< utils::Interpolation > &  interp = std::make_shared< utils::NoInterpolation >() 
)

◆ update_dirichlet_boundary() [2/3]

void polyfem::assembler::GenericTensorProblem::update_dirichlet_boundary ( const int  id,
const json val,
const bool  isx,
const bool  isy,
const bool  isz,
const std::string &  interpolation = "" 
)

Definition at line 557 of file GenericProblem.cpp.

References all_dimensions_dirichlet_, polyfem::assembler::Problem::boundary_ids_, polyfem::utils::Interpolation::build(), displacements_, polyfem::assembler::Problem::init(), and val.

Here is the call graph for this function:

◆ update_dirichlet_boundary() [3/3]

void polyfem::assembler::GenericTensorProblem::update_dirichlet_boundary ( const int  id,
const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> &  func,
const bool  isx,
const bool  isy,
const bool  isz,
const std::shared_ptr< utils::Interpolation > &  interp = std::make_shared< utils::NoInterpolation >() 
)

◆ update_neumann_boundary() [1/3]

void polyfem::assembler::GenericTensorProblem::update_neumann_boundary ( const int  id,
const Eigen::RowVector3d &  val,
const std::shared_ptr< utils::Interpolation > &  interp = std::make_shared< utils::NoInterpolation >() 
)

◆ update_neumann_boundary() [2/3]

void polyfem::assembler::GenericTensorProblem::update_neumann_boundary ( const int  id,
const json val,
const std::string &  interpolation = "" 
)

Definition at line 588 of file GenericProblem.cpp.

References polyfem::utils::Interpolation::build(), forces_, polyfem::assembler::Problem::init(), polyfem::assembler::Problem::neumann_boundary_ids_, and val.

Here is the call graph for this function:

◆ update_neumann_boundary() [3/3]

void polyfem::assembler::GenericTensorProblem::update_neumann_boundary ( const int  id,
const std::function< Eigen::MatrixXd(double x, double y, double z, double t)> &  func,
const std::shared_ptr< utils::Interpolation > &  interp = std::make_shared< utils::NoInterpolation >() 
)

◆ update_nodes()

void polyfem::assembler::GenericTensorProblem::update_nodes ( const Eigen::VectorXi &  in_node_to_node)
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 753 of file GenericProblem.cpp.

References nodal_dirichlet_mat_.

◆ update_pressure_boundary() [1/3]

void polyfem::assembler::GenericTensorProblem::update_pressure_boundary ( const int  id,
const double  val,
const std::shared_ptr< utils::Interpolation > &  interp = std::make_shared< utils::NoInterpolation >() 
)

◆ update_pressure_boundary() [2/3]

void polyfem::assembler::GenericTensorProblem::update_pressure_boundary ( const int  id,
const std::function< double(double x, double y, double z, double t)> &  func,
const std::shared_ptr< utils::Interpolation > &  interp = std::make_shared< utils::NoInterpolation >() 
)

◆ update_pressure_boundary() [3/3]

void polyfem::assembler::GenericTensorProblem::update_pressure_boundary ( const int  id,
json  val,
const std::string &  interpolation = "" 
)

Definition at line 614 of file GenericProblem.cpp.

References polyfem::utils::Interpolation::build(), polyfem::assembler::Problem::pressure_boundary_ids_, pressures_, and val.

Here is the call graph for this function:

Member Data Documentation

◆ all_dimensions_dirichlet_

bool polyfem::assembler::GenericTensorProblem::all_dimensions_dirichlet_ = true
private

◆ cavity_pressures_

std::unordered_map<int, ScalarBCValue> polyfem::assembler::GenericTensorProblem::cavity_pressures_
private

Definition at line 134 of file GenericProblem.hpp.

Referenced by clear(), pressure_cavity_bc(), set_parameters(), and set_units().

◆ displacements_

std::vector<TensorBCValue> polyfem::assembler::GenericTensorProblem::displacements_
private

◆ exact_

std::array<utils::ExpressionValue, 3> polyfem::assembler::GenericTensorProblem::exact_
private

Definition at line 141 of file GenericProblem.hpp.

Referenced by clear(), exact(), set_parameters(), and set_units().

◆ exact_grad_

std::array<utils::ExpressionValue, 9> polyfem::assembler::GenericTensorProblem::exact_grad_
private

Definition at line 142 of file GenericProblem.hpp.

Referenced by clear(), exact_grad(), set_parameters(), and set_units().

◆ forces_

std::vector<TensorBCValue> polyfem::assembler::GenericTensorProblem::forces_
private

◆ has_exact_

bool polyfem::assembler::GenericTensorProblem::has_exact_ = false
private

Definition at line 125 of file GenericProblem.hpp.

Referenced by clear(), has_exact_sol(), and set_parameters().

◆ has_exact_grad_

bool polyfem::assembler::GenericTensorProblem::has_exact_grad_ = false
private

Definition at line 126 of file GenericProblem.hpp.

Referenced by clear(), exact_grad(), and set_parameters().

◆ initial_acceleration_

std::vector<std::pair<int, std::array<utils::ExpressionValue, 3> > > polyfem::assembler::GenericTensorProblem::initial_acceleration_
private

Definition at line 138 of file GenericProblem.hpp.

Referenced by clear(), initial_acceleration(), set_parameters(), and set_units().

◆ initial_position_

std::vector<std::pair<int, std::array<utils::ExpressionValue, 3> > > polyfem::assembler::GenericTensorProblem::initial_position_
private

Definition at line 136 of file GenericProblem.hpp.

Referenced by clear(), initial_solution(), set_parameters(), and set_units().

◆ initial_velocity_

std::vector<std::pair<int, std::array<utils::ExpressionValue, 3> > > polyfem::assembler::GenericTensorProblem::initial_velocity_
private

Definition at line 137 of file GenericProblem.hpp.

Referenced by clear(), initial_velocity(), set_parameters(), and set_units().

◆ is_all_

bool polyfem::assembler::GenericTensorProblem::is_all_
private

◆ is_time_dept_

bool polyfem::assembler::GenericTensorProblem::is_time_dept_ = false
private

◆ nodal_dirichlet_

std::map<int, TensorBCValue> polyfem::assembler::GenericTensorProblem::nodal_dirichlet_
private

◆ nodal_dirichlet_mat_

std::vector<Eigen::MatrixXd> polyfem::assembler::GenericTensorProblem::nodal_dirichlet_mat_
private

◆ nodal_neumann_

std::map<int, TensorBCValue> polyfem::assembler::GenericTensorProblem::nodal_neumann_
private

Definition at line 145 of file GenericProblem.hpp.

Referenced by clear(), is_nodal_neumann_boundary(), and set_units().

◆ normal_aligned_forces_

std::vector<ScalarBCValue> polyfem::assembler::GenericTensorProblem::normal_aligned_forces_
private

Definition at line 132 of file GenericProblem.hpp.

Referenced by clear(), neumann_bc(), set_parameters(), and set_units().

◆ pressures_

std::vector<ScalarBCValue> polyfem::assembler::GenericTensorProblem::pressures_
private

◆ rhs_

std::array<utils::ExpressionValue, 3> polyfem::assembler::GenericTensorProblem::rhs_
private

Definition at line 140 of file GenericProblem.hpp.

Referenced by clear(), is_rhs_zero(), rhs(), set_parameters(), set_rhs(), and set_units().


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