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

#include <MatParams.hpp>

Inheritance diagram for polyfem::assembler::Density:
[legend]

Public Member Functions

 Density ()
 
virtual ~Density ()=default
 
virtual void add_multimaterial (const int index, const json &params, const std::string &density_unit)
 
virtual double operator() (double px, double py, double pz, double x, double y, double z, double t, int el_id) const
 
double operator() (const Eigen::MatrixXd &param, const Eigen::MatrixXd &p, double t, int el_id) const
 

Private Member Functions

void set_rho (const json &rho)
 

Private Attributes

std::vector< utils::ExpressionValuerho_
 

Detailed Description

Definition at line 96 of file MatParams.hpp.

Constructor & Destructor Documentation

◆ Density()

polyfem::assembler::Density::Density ( )

Definition at line 402 of file MatParams.cpp.

References rho_.

◆ ~Density()

virtual polyfem::assembler::Density::~Density ( )
virtualdefault

Member Function Documentation

◆ add_multimaterial()

void polyfem::assembler::Density::add_multimaterial ( const int  index,
const json params,
const std::string &  density_unit 
)
virtual

Reimplemented in polyfem::assembler::NoDensity.

Definition at line 419 of file MatParams.cpp.

References rho_.

Referenced by polyfem::assembler::Mass::add_multimaterial().

Here is the caller graph for this function:

◆ operator()() [1/2]

double polyfem::assembler::Density::operator() ( const Eigen::MatrixXd &  param,
const Eigen::MatrixXd &  p,
double  t,
int  el_id 
) const
inline

Definition at line 105 of file MatParams.hpp.

◆ operator()() [2/2]

double polyfem::assembler::Density::operator() ( double  px,
double  py,
double  pz,
double  x,
double  y,
double  z,
double  t,
int  el_id 
) const
virtual

Reimplemented in polyfem::assembler::NoDensity.

Definition at line 408 of file MatParams.cpp.

References rho_, x, y, and z.

◆ set_rho()

void polyfem::assembler::Density::set_rho ( const json rho)
private

Member Data Documentation

◆ rho_

std::vector<utils::ExpressionValue> polyfem::assembler::Density::rho_
private

Definition at line 117 of file MatParams.hpp.

Referenced by add_multimaterial(), Density(), and operator()().


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