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

#include <PointBasedProblem.hpp>

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

Classes

class  BCValue
 

Public Member Functions

 PointBasedTensorProblem (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
 
bool is_scalar () const override
 
void set_parameters (const json &params) override
 
void add_constant (const int bc_tag, const Eigen::Vector3d &value)
 
void add_function (const int bc_tag, const Eigen::MatrixXd &func, const Eigen::MatrixXd &pts, const Eigen::MatrixXi &tri, const int coord)
 
void add_function (const int bc_tag, const Eigen::MatrixXd &func, const Eigen::MatrixXd &pts, const std::string &rbf, const double eps, const int coord)
 
void add_constant (const int bc_tag, const Eigen::Vector3d &value, const Eigen::Matrix< bool, 3, 1 > &dd, const bool is_neumann=false)
 
void add_function (const int bc_tag, const Eigen::MatrixXd &func, const Eigen::MatrixXd &pts, const Eigen::MatrixXi &tri, const int coord, const Eigen::Matrix< bool, 3, 1 > &dd, const bool is_neumann=false)
 
void add_function (const int bc_tag, const Eigen::MatrixXd &func, const Eigen::MatrixXd &pts, const std::string &rbf, const double eps, const int coord, const Eigen::Matrix< bool, 3, 1 > &dd, const bool is_neumann=false)
 
bool is_dimension_dirichet (const int tag, const int dim) const override
 
bool all_dimensions_dirichlet () const 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 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 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_nodal_dimension_dirichlet (const int n_id, const int tag, const int dim) 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

bool initialized_ = false
 
bool all_dimensions_dirichlet_ = true
 
double rhs_
 
double scaling_
 
Eigen::Vector3d translation_
 
std::vector< BCValuebc_
 
std::vector< BCValueneumann_bc_
 

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 16 of file PointBasedProblem.hpp.

Constructor & Destructor Documentation

◆ PointBasedTensorProblem()

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

Definition at line 109 of file PointBasedProblem.cpp.

References translation_.

Member Function Documentation

◆ add_constant() [1/2]

void polyfem::problem::PointBasedTensorProblem::add_constant ( const int  bc_tag,
const Eigen::Vector3d &  value 
)
inline

Definition at line 108 of file PointBasedProblem.hpp.

References add_constant().

Referenced by add_constant().

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

◆ add_constant() [2/2]

void polyfem::problem::PointBasedTensorProblem::add_constant ( const int  bc_tag,
const Eigen::Vector3d &  value,
const Eigen::Matrix< bool, 3, 1 > &  dd,
const bool  is_neumann = false 
)

◆ add_function() [1/4]

void polyfem::problem::PointBasedTensorProblem::add_function ( const int  bc_tag,
const Eigen::MatrixXd &  func,
const Eigen::MatrixXd &  pts,
const Eigen::MatrixXi &  tri,
const int  coord 
)
inline

Definition at line 115 of file PointBasedProblem.hpp.

References add_function().

Referenced by add_function(), and add_function().

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

◆ add_function() [2/4]

void polyfem::problem::PointBasedTensorProblem::add_function ( const int  bc_tag,
const Eigen::MatrixXd &  func,
const Eigen::MatrixXd &  pts,
const Eigen::MatrixXi &  tri,
const int  coord,
const Eigen::Matrix< bool, 3, 1 > &  dd,
const bool  is_neumann = false 
)

◆ add_function() [3/4]

void polyfem::problem::PointBasedTensorProblem::add_function ( const int  bc_tag,
const Eigen::MatrixXd &  func,
const Eigen::MatrixXd &  pts,
const std::string &  rbf,
const double  eps,
const int  coord 
)
inline

Definition at line 122 of file PointBasedProblem.hpp.

References add_function().

Here is the call graph for this function:

◆ add_function() [4/4]

void polyfem::problem::PointBasedTensorProblem::add_function ( const int  bc_tag,
const Eigen::MatrixXd &  func,
const Eigen::MatrixXd &  pts,
const std::string &  rbf,
const double  eps,
const int  coord,
const Eigen::Matrix< bool, 3, 1 > &  dd,
const bool  is_neumann = false 
)

◆ all_dimensions_dirichlet()

bool polyfem::problem::PointBasedTensorProblem::all_dimensions_dirichlet ( ) const
inlineoverridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 134 of file PointBasedProblem.hpp.

References all_dimensions_dirichlet_.

Referenced by polyfem::problem::PointBasedTensorProblem::BCValue::init(), and is_dimension_dirichet().

Here is the caller graph for this function:

◆ dirichlet_bc()

void polyfem::problem::PointBasedTensorProblem::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 120 of file PointBasedProblem.cpp.

References bc_, polyfem::assembler::Problem::boundary_ids_, polyfem::mesh::Mesh::dimension(), polyfem::mesh::Mesh::get_boundary_id(), scaling_, translation_, and val.

Here is the call graph for this function:

◆ has_exact_sol()

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

Implements polyfem::assembler::Problem.

Definition at line 103 of file PointBasedProblem.hpp.

◆ is_dimension_dirichet()

bool polyfem::problem::PointBasedTensorProblem::is_dimension_dirichet ( const int  tag,
const int  dim 
) const
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 217 of file PointBasedProblem.cpp.

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

Here is the call graph for this function:

◆ is_rhs_zero()

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

Implements polyfem::assembler::Problem.

Definition at line 98 of file PointBasedProblem.hpp.

References rhs_.

◆ is_scalar()

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

Implements polyfem::assembler::Problem.

Definition at line 104 of file PointBasedProblem.hpp.

◆ neumann_bc()

void polyfem::problem::PointBasedTensorProblem::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 139 of file PointBasedProblem.cpp.

References polyfem::mesh::Mesh::dimension(), polyfem::mesh::Mesh::get_boundary_id(), neumann_bc_, polyfem::assembler::Problem::neumann_boundary_ids_, scaling_, translation_, and val.

Here is the call graph for this function:

◆ rhs()

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

Implements polyfem::assembler::Problem.

Definition at line 115 of file PointBasedProblem.cpp.

References rhs_, and val.

◆ set_parameters()

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

Member Data Documentation

◆ all_dimensions_dirichlet_

bool polyfem::problem::PointBasedTensorProblem::all_dimensions_dirichlet_ = true
private

◆ bc_

std::vector<BCValue> polyfem::problem::PointBasedTensorProblem::bc_
private

◆ initialized_

bool polyfem::problem::PointBasedTensorProblem::initialized_ = false
private

Definition at line 137 of file PointBasedProblem.hpp.

Referenced by set_parameters().

◆ neumann_bc_

std::vector<BCValue> polyfem::problem::PointBasedTensorProblem::neumann_bc_
private

◆ rhs_

double polyfem::problem::PointBasedTensorProblem::rhs_
private

Definition at line 139 of file PointBasedProblem.hpp.

Referenced by is_rhs_zero(), rhs(), and set_parameters().

◆ scaling_

double polyfem::problem::PointBasedTensorProblem::scaling_
private

Definition at line 140 of file PointBasedProblem.hpp.

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

◆ translation_

Eigen::Vector3d polyfem::problem::PointBasedTensorProblem::translation_
private

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