v0.13.1
Public Member Functions | Public Attributes | List of all members
OpVolume Struct Reference

Inherits VolumeElementForcesAndSourcesCore::UserDataOperator, and VolumeElementForcesAndSourcesCore::UserDataOperator.

Public Member Functions

 OpVolume (const std::string &field_name, Vec vol)
 
MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 
MoFEMErrorCode doWork (int row_side, int col_side, EntityType row_type, EntityType col_type, EntitiesFieldData::EntData &row_data, EntitiesFieldData::EntData &col_data)
 
 OpVolume (const std::string &field_name)
 
MoFEMErrorCode doWork (int side, EntityType type, EntitiesFieldData::EntData &data)
 

Public Attributes

Vec vOl
 

Detailed Description

Examples
hello_world.cpp, and simple_interface.cpp.

Definition at line 18 of file simple_interface.cpp.

Constructor & Destructor Documentation

◆ OpVolume() [1/2]

OpVolume::OpVolume ( const std::string &  field_name,
Vec  vol 
)
Examples
hello_world.cpp, and simple_interface.cpp.

Definition at line 20 of file simple_interface.cpp.

22 vOl(vol) {}
ForcesAndSourcesCore::UserDataOperator UserDataOperator
constexpr auto field_name

◆ OpVolume() [2/2]

OpVolume::OpVolume ( const std::string &  field_name)

Member Function Documentation

◆ doWork() [1/3]

MoFEMErrorCode OpVolume::doWork ( int  row_side,
int  col_side,
EntityType  row_type,
EntityType  col_type,
EntitiesFieldData::EntData row_data,
EntitiesFieldData::EntData col_data 
)

Definition at line 41 of file simple_interface.cpp.

44 {
46 // PetscPrintf(PETSC_COMM_WORLD,"domain: calculate matrix\n");
48 }
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:447
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:440

◆ doWork() [2/3]

MoFEMErrorCode OpVolume::doWork ( int  side,
EntityType  type,
EntitiesFieldData::EntData data 
)
Examples
hello_world.cpp, and simple_interface.cpp.

Definition at line 23 of file simple_interface.cpp.

24 {
25
27 if (type != MBVERTEX)
29 const int nb_int_pts = getGaussPts().size2();
30 // cerr << nb_int_pts << endl;
31 auto t_w = getFTensor0IntegrationWeight();
32 double v = getMeasure();
33 double vol = 0;
34 for (int gg = 0; gg != nb_int_pts; gg++) {
35 vol += t_w * v;
36 ++t_w;
37 }
38 CHKERR VecSetValue(vOl, 0, vol, ADD_VALUES);
40 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
const double v
phase velocity of light in medium (cm/ns)

◆ doWork() [3/3]

MoFEMErrorCode OpVolume::doWork ( int  side,
EntityType  type,
EntitiesFieldData::EntData data 
)

Definition at line 70 of file hello_world.cpp.

71 {
73 if (type == MBVERTEX) {
74 MOFEM_LOG("SYNC", Sev::inform) << "Hello Operator OpVolume:"
75 << " volume " << getVolume();
76 }
78 }
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:301
#define HelloFunctionBegin
Definition: hello_world.cpp:18

Member Data Documentation

◆ vOl

Vec OpVolume::vOl
Examples
simple_interface.cpp.

Definition at line 19 of file simple_interface.cpp.


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