#include <tutorials/scl-12/src/electrostatics.hpp>
Definition at line 135 of file electrostatics.hpp.
◆ OpTotalEnergy()
OpTotalEnergy::OpTotalEnergy |
( |
const std::string & |
field_name, |
|
|
boost::shared_ptr< MatrixDouble > |
grad_u_negative, |
|
|
boost::shared_ptr< std::map< int, BlockData >> |
perm_block_sets_ptr, |
|
|
boost::shared_ptr< std::map< int, BlockData >> |
int_domain_block_sets_ptr, |
|
|
boost::shared_ptr< DataAtIntegrationPts > |
common_data_ptr, |
|
|
SmartPetscObj< Vec > |
petsc_vec_energy |
|
) |
| |
|
inline |
Definition at line 136 of file electrostatics.hpp.
147 std::fill(&doEntities[MBVERTEX], &doEntities[MBMAXTYPE],
false);
148 doEntities[MBVERTEX] =
true;
◆ doWork()
Definition at line 150 of file electrostatics.hpp.
153 auto t_negative_grad_u = getFTensor1FromMat<SPACE_DIM>(*
gradUNegative);
155 double area = getMeasure();
156 auto t_w = getFTensor0IntegrationWeight();
157 auto nb_gauss_pts = getGaussPts().size2();
158 double totalEnergy = 0.0;
163 double blockPermittivity = 0.0;
165 if (
m.second.internalDomainEnts.find(getFEEntityHandle()) !=
166 m.second.internalDomainEnts.end()) {
168 if (
n.second.domainEnts.find(getFEEntityHandle()) !=
169 n.second.domainEnts.end()) {
170 blockPermittivity =
n.second.epsPermit;
174 for (
int gg = 0; gg != nb_gauss_pts; gg++) {
175 totalEnergy += 0.5 * t_negative_grad_u(
I) * t_negative_grad_u(
I) *
176 blockPermittivity * t_w * area;
◆ commonDataPtr
◆ gradUNegative
boost::shared_ptr<MatrixDouble> OpTotalEnergy::gradUNegative |
|
private |
◆ intDomainBlocksetsPtr
boost::shared_ptr<std::map<int, BlockData> > OpTotalEnergy::intDomainBlocksetsPtr |
|
private |
◆ permBlockSetsPtr
boost::shared_ptr<std::map<int, BlockData> > OpTotalEnergy::permBlockSetsPtr |
|
private |
◆ petscTotalEnergy
The documentation for this struct was generated from the following file: