![]() |
v0.15.0 |
Public Member Functions | |
ObjectiveFunctionDataImpl ()=default | |
virtual | ~ObjectiveFunctionDataImpl ()=default |
MoFEMErrorCode | initPython (const std::string py_file) |
MoFEMErrorCode | evalObjectiveFunction (MatrixDouble &coords, boost::shared_ptr< MatrixDouble > u_ptr, boost::shared_ptr< MatrixDouble > stress_ptr, boost::shared_ptr< MatrixDouble > strain_ptr, boost::shared_ptr< VectorDouble > o_ptr) |
MoFEMErrorCode | evalObjectiveGradientStress (MatrixDouble &coords, boost::shared_ptr< MatrixDouble > u_ptr, boost::shared_ptr< MatrixDouble > stress_ptr, boost::shared_ptr< MatrixDouble > strain_ptr, boost::shared_ptr< MatrixDouble > o_ptr) |
MoFEMErrorCode | evalObjectiveGradientStrain (MatrixDouble &coords, boost::shared_ptr< MatrixDouble > u_ptr, boost::shared_ptr< MatrixDouble > stress_ptr, boost::shared_ptr< MatrixDouble > strain_ptr, boost::shared_ptr< MatrixDouble > o_ptr) |
MoFEMErrorCode | evalObjectiveGradientU (MatrixDouble &coords, boost::shared_ptr< MatrixDouble > u_ptr, boost::shared_ptr< MatrixDouble > stress_ptr, boost::shared_ptr< MatrixDouble > strain_ptr, boost::shared_ptr< MatrixDouble > o_ptr) |
MoFEMErrorCode | numberOfModes (int block_id, int &modes) |
MoFEMErrorCode | blockModes (int block_id, MatrixDouble &coords, std::array< double, 3 > ¢roid, std::array< double, 6 > &bbodx, MatrixDouble &o_ptr) |
![]() | |
virtual | ~ObjectiveFunctionData ()=default |
Private Member Functions | |
MoFEMErrorCode | objectiveFunctionImpl (np::ndarray coords, np::ndarray u, np::ndarray stress, np::ndarray strain, np::ndarray &o) |
MoFEMErrorCode | objectiveGradientStressImpl (np::ndarray coords, np::ndarray u, np::ndarray stress, np::ndarray strain, np::ndarray &o) |
MoFEMErrorCode | objectiveGradientStrainImpl (np::ndarray coords, np::ndarray u, np::ndarray stress, np::ndarray strain, np::ndarray &o) |
MoFEMErrorCode | objectiveGradientUImpl (np::ndarray coords, np::ndarray u, np::ndarray stress, np::ndarray strain, np::ndarray &o) |
MoFEMErrorCode | blockModesImpl (int block_id, np::ndarray coords, np::ndarray centroid, np::ndarray bbodx, np::ndarray &o_ptr) |
np::ndarray | convertToNumPy (std::vector< double > &data, int rows, int nb_gauss_pts) |
Converts a std::vector<double> to a NumPy ndarray. | |
np::ndarray | convertToNumPy (double *ptr, int s) |
MatrixDouble | copyToFull (MatrixDouble &s) |
void | copyToSymmetric (double *ptr, MatrixDouble &s) |
Private Attributes | |
bp::object | mainNamespace |
bp::object | objectiveFunction |
bp::object | objectiveGradientStress |
bp::object | objectiveGradientStrain |
bp::object | objectiveGradientU |
bp::object | objectNumberOfModes |
bp::object | objectBlockModes |
Definition at line 2087 of file adjoint.cpp.
|
default |
|
virtualdefault |
|
virtual |
Implements ObjectiveFunctionData.
Definition at line 2391 of file adjoint.cpp.
|
private |
Definition at line 2524 of file adjoint.cpp.
|
inlineprivate |
Definition at line 2571 of file adjoint.cpp.
|
inlineprivate |
Converts a std::vector<double> to a NumPy ndarray.
This function wraps the given vector data into a NumPy array with the specified number of rows and Gauss points. The resulting ndarray shares memory with the input vector, so changes to one will affect the other.
data | Reference to the vector containing double values to be converted. |
rows | Number of rows in the resulting NumPy array. |
nb_gauss_pts | Number of Gauss points (columns) in the resulting NumPy array. |
size
specifies the shape of the resulting ndarray as a tuple (rows, nb_gauss_pts).stride
specifies the step size in bytes to move to the next element in memory. Here, it is set to sizeof(double), indicating contiguous storage for each element. Definition at line 2563 of file adjoint.cpp.
|
private |
Definition at line 2216 of file adjoint.cpp.
|
private |
Definition at line 2231 of file adjoint.cpp.
|
virtual |
Implements ObjectiveFunctionData.
Definition at line 2251 of file adjoint.cpp.
|
virtual |
Implements ObjectiveFunctionData.
Definition at line 2320 of file adjoint.cpp.
|
virtual |
Implements ObjectiveFunctionData.
Definition at line 2285 of file adjoint.cpp.
MoFEMErrorCode ObjectiveFunctionDataImpl::evalObjectiveGradientU | ( | MatrixDouble & | coords, |
boost::shared_ptr< MatrixDouble > | u_ptr, | ||
boost::shared_ptr< MatrixDouble > | stress_ptr, | ||
boost::shared_ptr< MatrixDouble > | strain_ptr, | ||
boost::shared_ptr< MatrixDouble > | o_ptr ) |
Definition at line 2355 of file adjoint.cpp.
MoFEMErrorCode ObjectiveFunctionDataImpl::initPython | ( | const std::string | py_file | ) |
Definition at line 2192 of file adjoint.cpp.
|
virtual |
Implements ObjectiveFunctionData.
Definition at line 2509 of file adjoint.cpp.
|
private |
Definition at line 2423 of file adjoint.cpp.
|
private |
Definition at line 2466 of file adjoint.cpp.
|
private |
Definition at line 2444 of file adjoint.cpp.
|
private |
Definition at line 2488 of file adjoint.cpp.
|
private |
Definition at line 2128 of file adjoint.cpp.
|
private |
Definition at line 2134 of file adjoint.cpp.
|
private |
Definition at line 2129 of file adjoint.cpp.
|
private |
Definition at line 2131 of file adjoint.cpp.
|
private |
Definition at line 2130 of file adjoint.cpp.
|
private |
Definition at line 2132 of file adjoint.cpp.
|
private |
Definition at line 2133 of file adjoint.cpp.