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

#include <NodeProblem.hpp>

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

Public Member Functions

 NodeProblem (const std::string &name)
 
void init (const mesh::Mesh &mesh) 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
 
bool has_exact_sol () const override
 
bool is_scalar () 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
 
- 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 ()
 
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 all_dimensions_dirichlet_ = true
 
std::vector< Eigen::Matrix< bool, 1, 3, Eigen::RowMajor > > dirichlet_dimensions_
 
double rhs_
 
NodeValues values_
 
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 42 of file NodeProblem.hpp.

Constructor & Destructor Documentation

◆ NodeProblem()

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

Definition at line 89 of file NodeProblem.cpp.

Member Function Documentation

◆ all_dimensions_dirichlet()

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

Reimplemented from polyfem::assembler::Problem.

Definition at line 60 of file NodeProblem.hpp.

References all_dimensions_dirichlet_.

Referenced by is_dimension_dirichet().

Here is the caller graph for this function:

◆ dirichlet_bc()

void polyfem::problem::NodeProblem::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 104 of file NodeProblem.cpp.

References polyfem::assembler::Problem::boundary_ids_, polyfem::problem::NodeValues::dirichlet_interpolate(), polyfem::mesh::Mesh::get_boundary_id(), is_all_, val, and values_.

Here is the call graph for this function:

◆ has_exact_sol()

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

Implements polyfem::assembler::Problem.

Definition at line 54 of file NodeProblem.hpp.

◆ init()

void polyfem::problem::NodeProblem::init ( const mesh::Mesh mesh)
overridevirtual

Reimplemented from polyfem::assembler::Problem.

Definition at line 94 of file NodeProblem.cpp.

References polyfem::problem::NodeValues::init(), and values_.

Here is the call graph for this function:

◆ is_dimension_dirichet()

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

Reimplemented from polyfem::assembler::Problem.

Definition at line 149 of file NodeProblem.cpp.

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

Here is the call graph for this function:

◆ is_rhs_zero()

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

Implements polyfem::assembler::Problem.

Definition at line 49 of file NodeProblem.hpp.

References rhs_.

◆ is_scalar()

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

Implements polyfem::assembler::Problem.

Definition at line 55 of file NodeProblem.hpp.

◆ neumann_bc()

void polyfem::problem::NodeProblem::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 130 of file NodeProblem.cpp.

References polyfem::assembler::Problem::boundary_ids_, polyfem::mesh::Mesh::get_boundary_id(), polyfem::problem::NodeValues::neumann_interpolate(), val, and values_.

Here is the call graph for this function:

◆ rhs()

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

Implements polyfem::assembler::Problem.

Definition at line 99 of file NodeProblem.cpp.

References rhs_, and val.

◆ set_parameters()

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

Reimplemented from polyfem::assembler::Problem.

Definition at line 172 of file NodeProblem.cpp.

References all_dimensions_dirichlet_, polyfem::assembler::Problem::boundary_ids_, dirichlet_dimensions_, is_all_, polyfem::utils::json_as_array(), polyfem::problem::NodeValues::load(), polyfem::assembler::Problem::neumann_boundary_ids_, rhs_, and values_.

Here is the call graph for this function:

Member Data Documentation

◆ all_dimensions_dirichlet_

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

Definition at line 63 of file NodeProblem.hpp.

Referenced by all_dimensions_dirichlet(), and set_parameters().

◆ dirichlet_dimensions_

std::vector<Eigen::Matrix<bool, 1, 3, Eigen::RowMajor> > polyfem::problem::NodeProblem::dirichlet_dimensions_
private

Definition at line 64 of file NodeProblem.hpp.

Referenced by is_dimension_dirichet(), and set_parameters().

◆ is_all_

bool polyfem::problem::NodeProblem::is_all_
private

Definition at line 67 of file NodeProblem.hpp.

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

◆ rhs_

double polyfem::problem::NodeProblem::rhs_
private

Definition at line 65 of file NodeProblem.hpp.

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

◆ values_

NodeValues polyfem::problem::NodeProblem::values_
private

Definition at line 66 of file NodeProblem.hpp.

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


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