39 #include "libmesh/nonlinear_solver.h" 40 #include "libmesh/numeric_vector.h" 41 #include "libmesh/sparse_matrix.h" 42 #include "libmesh/dof_map.h" 49 _enable_dof_handler (enable_dof_handler),
50 _evaluate_output_on_negative_phi (false),
53 _intersection (nullptr),
54 _dof_handler (nullptr),
55 _void_solution_monitor (nullptr),
178 #if MAST_ENABLE_PLPLOT == 1 181 #include "plplot/plplot.h" 183 void plot_elem(
const libMesh::Elem& e) {
189 x = RealVectorX::Zero(n+1),
190 y = RealVectorX::Zero(n+1);
192 for (
unsigned int i=0; i<n+1; i++) {
193 x(i) = e.point(i%n)(0);
194 y(i) = e.point(i%n)(1);
197 plline(n+1, x.data(), y.data());
202 void plot_points(
const std::vector<libMesh::Point>& pts) {
208 x = RealVectorX::Zero(n),
209 y = RealVectorX::Zero(n);
211 for (
unsigned int i=0; i<n; i++) {
216 plpoin(n, x.data(), y.data(), -1);
222 MAST::LevelSetNonlinearImplicitAssembly::plot_sub_elems(
bool plot_reference_elem,
223 bool plot_low_phi_elem,
224 bool plot_high_phi_elem) {
233 libMesh::MeshBase::const_element_iterator el =
234 nonlin_sys.get_mesh().active_local_elements_begin();
235 const libMesh::MeshBase::const_element_iterator end_el =
236 nonlin_sys.get_mesh().active_local_elements_end();
241 plenv(0,.3,0,.3,0,0);
244 for ( ; el != end_el; ++el) {
246 const libMesh::Elem* elem = *el;
251 const std::vector<Real>& JxW = fe.
get_JxW();
252 std::cout <<
"==== original JxW: " << std::accumulate(JxW.begin(),
253 JxW.end(), 0.) << std::endl;
257 if (plot_reference_elem) {
265 const std::vector<const libMesh::Elem *> &
270 if (plot_low_phi_elem) {
272 for (
unsigned int i = 0; i < elems_low.size(); i++) {
275 plot_elem(*elems_low[i]);
279 fe->init(*elems_low[i]);
280 const std::vector<Real>& JxW = fe->get_JxW();
281 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
282 std::cout <<
"low: JxW: " << std::accumulate(JxW.begin(),
283 JxW.end(), 0.) << std::endl;
289 if (plot_high_phi_elem) {
291 for (
unsigned int i=0; i<elems_hi.size(); i++) {
294 plot_elem(*elems_hi[i]);
298 fe->init(*elems_hi[i]);
299 const std::vector<Real>& JxW = fe->get_JxW();
300 const std::vector<libMesh::Point>& xyz = fe->get_xyz();
301 std::cout <<
"hi: JxW: " << std::accumulate(JxW.begin(),
302 JxW.end(), 0.) << std::endl;
315 #endif // HAVE_PLPLOT 323 libMesh::NumericVector<Real>* R,
324 libMesh::SparseMatrix<Real>* J,
325 libMesh::NonlinearImplicitSystem& S) {
336 libmesh_assert_equal_to(&S, &(nonlin_sys));
351 nd_indicator = RealVectorX::Ones(1),
352 indicator = RealVectorX::Zero(1);
358 std::vector<libMesh::dof_id_type>
361 const libMesh::DofMap& dof_map =
_system->
system().get_dof_map();
364 std::unique_ptr<libMesh::NumericVector<Real> > localized_solution;
374 libMesh::MeshBase::const_element_iterator el =
375 nonlin_sys.get_mesh().active_local_elements_begin();
376 const libMesh::MeshBase::const_element_iterator end_el =
377 nonlin_sys.get_mesh().active_local_elements_end();
382 for ( ; el != end_el; ++el) {
384 const libMesh::Elem* elem = *el;
387 nonlin_sys.get_mesh().max_elem_id(),
388 nonlin_sys.get_mesh().max_node_id());
389 dof_map.dof_indices (elem, dof_indices);
394 nd_indicator.setZero(elem->n_nodes());
395 for (
unsigned int i=0; i<elem->n_nodes(); i++) {
396 (*_indicator)(elem->node_ref(i), nonlin_sys.time, indicator);
397 nd_indicator(i) = indicator(0);
401 unsigned int ndofs = (
unsigned int)dof_indices.size();
408 nd_indicator.maxCoeff() < tol) && J) {
412 for (
unsigned int i=0; i<ndofs; i++)
414 dof_map.constrain_element_matrix(m, dof_indices);
415 J->add_matrix(m, dof_indices);
419 if (nd_indicator.maxCoeff() > tol &&
425 sub_elem_vec.setZero(ndofs);
426 mat.setZero(ndofs, ndofs);
427 sub_elem_mat.setZero(ndofs, ndofs);
429 for (
unsigned int i=0; i<dof_indices.size(); i++)
430 sol(i) = (*localized_solution)(dof_indices[i]);
467 mat.setIdentity(); mat *= 1.e-6;
470 for (
unsigned int i=0; i<material_rows.size(); i++) {
472 vec(material_rows[i]) = res_factored_u(i);
474 for (
unsigned int j=0; j<material_rows.size(); j++)
475 mat(material_rows[i], material_rows[j]) = jac_factored_uu(i,j);
484 const std::vector<const libMesh::Elem *> &
487 std::vector<const libMesh::Elem*>::const_iterator
488 hi_sub_elem_it = elems_hi.begin(),
489 hi_sub_elem_end = elems_hi.end();
491 for (; hi_sub_elem_it != hi_sub_elem_end; hi_sub_elem_it++ ) {
493 const libMesh::Elem* sub_elem = *hi_sub_elem_it;
522 dof_map.constrain_element_matrix_and_vector(m, v, dof_indices);
524 dof_map.constrain_element_vector(v, dof_indices);
526 dof_map.constrain_element_matrix(m, dof_indices);
529 if (R) R->add_vector(v, dof_indices);
530 if (J) J->add_matrix(m, dof_indices);
554 bool if_localize_sol,
556 libMesh::NumericVector<Real>& sensitivity_rhs,
575 sensitivity_rhs.zero();
588 nd_indicator = RealVectorX::Ones(1),
589 indicator = RealVectorX::Zero(1);
594 std::vector<libMesh::dof_id_type>
597 const libMesh::DofMap& dof_map = nonlin_sys.get_dof_map();
599 const libMesh::NumericVector<Real>
602 std::unique_ptr<libMesh::NumericVector<Real> > localized_solution;
604 if (if_localize_sol) {
606 sol_vec = localized_solution.get();
615 libMesh::MeshBase::const_element_iterator el =
616 nonlin_sys.get_mesh().active_local_elements_begin();
617 const libMesh::MeshBase::const_element_iterator end_el =
618 nonlin_sys.get_mesh().active_local_elements_end();
623 for ( ; el != end_el; ++el) {
625 const libMesh::Elem* elem = *el;
634 nonlin_sys.get_mesh().max_elem_id(),
635 nonlin_sys.get_mesh().max_node_id());
637 dof_map.dof_indices (elem, dof_indices);
642 nd_indicator.setZero(elem->n_nodes());
643 for (
unsigned int i=0; i<elem->n_nodes(); i++) {
644 (*_indicator)(elem->node_ref(i), nonlin_sys.time, indicator);
645 nd_indicator(i) = indicator(0);
649 if (nd_indicator.maxCoeff() > tol &&
653 unsigned int ndofs = (
unsigned int)dof_indices.size();
655 vec_total.setZero(ndofs);
659 for (
unsigned int i=0; i<dof_indices.size(); i++)
660 sol(i) = (*sol_vec)(dof_indices[i]);
667 const std::vector<const libMesh::Elem *> &
670 std::vector<const libMesh::Elem*>::const_iterator
671 hi_sub_elem_it = elems_hi.begin(),
672 hi_sub_elem_end = elems_hi.end();
674 for (; hi_sub_elem_it != hi_sub_elem_end; hi_sub_elem_it++ ) {
676 const libMesh::Elem* sub_elem = *hi_sub_elem_it;
709 mat.setZero(ndofs, ndofs);
730 for (
unsigned int i=0; i<material_rows.size(); i++)
731 vec1(material_rows[i]) = res_factored_u(i);
747 dof_map.constrain_element_vector(v, dof_indices);
750 sensitivity_rhs.add_vector(v, dof_indices);
762 sensitivity_rhs.close();
773 bool if_localize_sol,
790 nd_indicator = RealVectorX::Ones(1),
791 indicator = RealVectorX::Zero(1);
793 std::vector<libMesh::dof_id_type> dof_indices;
794 const libMesh::DofMap& dof_map =
_system->
system().get_dof_map();
796 const libMesh::NumericVector<Real>
799 std::unique_ptr<libMesh::NumericVector<Real> > localized_solution;
801 if (if_localize_sol) {
803 sol_vec = localized_solution.get();
814 libMesh::MeshBase::const_element_iterator el =
815 nonlin_sys.get_mesh().active_local_elements_begin();
816 const libMesh::MeshBase::const_element_iterator end_el =
817 nonlin_sys.get_mesh().active_local_elements_end();
820 for ( ; el != end_el; ++el) {
822 const libMesh::Elem* elem = *el;
827 nd_indicator.setZero(elem->n_nodes());
828 for (
unsigned int i=0; i<elem->n_nodes(); i++) {
829 (*_indicator)(elem->node_ref(i), nonlin_sys.time, indicator);
830 nd_indicator(i) = indicator(0);
835 nonlin_sys.get_mesh().max_elem_id(),
836 nonlin_sys.get_mesh().max_node_id());
841 dof_map.dof_indices (elem, dof_indices);
844 unsigned int ndofs = (
unsigned int)dof_indices.size();
847 for (
unsigned int i=0; i<dof_indices.size(); i++)
848 sol(i) = (*sol_vec)(dof_indices[i]);
855 const std::vector<const libMesh::Elem *> &
858 std::vector<const libMesh::Elem*>::const_iterator
859 low_sub_elem_it = elems_low.begin(),
860 low_sub_elem_end = elems_low.end();
862 for (; low_sub_elem_it != low_sub_elem_end; low_sub_elem_it++ ) {
864 const libMesh::Elem* sub_elem = *low_sub_elem_it;
872 output.
init(geom_elem);
879 if (nd_indicator.maxCoeff() > tol &&
882 dof_map.dof_indices (elem, dof_indices);
885 unsigned int ndofs = (
unsigned int)dof_indices.size();
888 for (
unsigned int i=0; i<dof_indices.size(); i++)
889 sol(i) = (*sol_vec)(dof_indices[i]);
896 const std::vector<const libMesh::Elem *> &
900 std::vector<const libMesh::Elem*>::const_iterator
901 hi_sub_elem_it = elems_hi.begin(),
902 hi_sub_elem_end = elems_hi.end();
904 for (; hi_sub_elem_it != hi_sub_elem_end; hi_sub_elem_it++ ) {
906 const libMesh::Elem* sub_elem = *hi_sub_elem_it;
914 output.
init(geom_elem);
936 bool if_localize_sol,
938 libMesh::NumericVector<Real>& dq_dX) {
961 nd_indicator = RealVectorX::Ones(1),
962 indicator = RealVectorX::Zero(1);
967 std::vector<libMesh::dof_id_type>
970 const libMesh::DofMap& dof_map =
_system->
system().get_dof_map();
975 const libMesh::NumericVector<Real>
978 std::unique_ptr<libMesh::NumericVector<Real> > localized_solution;
980 if (if_localize_sol) {
982 sol_vec = localized_solution.get();
993 libMesh::MeshBase::const_element_iterator el =
994 nonlin_sys.get_mesh().active_local_elements_begin();
995 const libMesh::MeshBase::const_element_iterator end_el =
996 nonlin_sys.get_mesh().active_local_elements_end();
999 for ( ; el != end_el; ++el) {
1001 const libMesh::Elem* elem = *el;
1004 nonlin_sys.get_mesh().max_elem_id(),
1005 nonlin_sys.get_mesh().max_node_id());
1010 nd_indicator.setZero(elem->n_nodes());
1011 for (
unsigned int i=0; i<elem->n_nodes(); i++) {
1012 (*_indicator)(elem->node_ref(i), nonlin_sys.time, indicator);
1013 nd_indicator(i) = indicator(0);
1021 dof_map.dof_indices (elem, dof_indices);
1024 unsigned int ndofs = (
unsigned int)dof_indices.size();
1026 vec1.setZero(ndofs);
1027 vec2.setZero(ndofs);
1028 vec_total.setZero(ndofs);
1030 for (
unsigned int i=0; i<dof_indices.size(); i++)
1031 sol(i) = (*sol_vec)(dof_indices[i]);
1038 const std::vector<const libMesh::Elem *> &
1041 std::vector<const libMesh::Elem*>::const_iterator
1042 low_sub_elem_it = elems_low.begin(),
1043 low_sub_elem_end = elems_low.end();
1045 for (; low_sub_elem_it != low_sub_elem_end; low_sub_elem_it++ ) {
1047 const libMesh::Elem* sub_elem = *low_sub_elem_it;
1055 output.
init(geom_sub_elem);
1065 dof_map.constrain_element_vector(v, dof_indices);
1066 dq_dX.add_vector(v, dof_indices);
1067 dof_indices.clear();
1071 if (nd_indicator.maxCoeff() > tol &&
1074 dof_map.dof_indices (elem, dof_indices);
1077 unsigned int ndofs = (
unsigned int)dof_indices.size();
1079 vec1.setZero(ndofs);
1080 vec2.setZero(ndofs);
1081 vec_total.setZero(ndofs);
1083 for (
unsigned int i=0; i<dof_indices.size(); i++)
1084 sol(i) = (*sol_vec)(dof_indices[i]);
1091 const std::vector<const libMesh::Elem *> &
1094 std::vector<const libMesh::Elem*>::const_iterator
1095 hi_sub_elem_it = elems_hi.begin(),
1096 hi_sub_elem_end = elems_hi.end();
1098 for (; hi_sub_elem_it != hi_sub_elem_end; hi_sub_elem_it++ ) {
1100 const libMesh::Elem* sub_elem = *hi_sub_elem_it;
1108 output.
init(geom_sub_elem);
1115 vec2.setZero(ndofs);
1116 mat.setZero(ndofs, ndofs);
1122 ops.
init(geom_elem);
1137 for (
unsigned int i=0; i<material_rows.size(); i++)
1138 vec1(material_rows[i]) = res_factored_u(i);
1146 dof_map.constrain_element_vector(v, dof_indices);
1147 dq_dX.add_vector(v, dof_indices);
1148 dof_indices.clear();
1168 bool if_localize_sol,
1169 const libMesh::NumericVector<Real>* dXdp,
1170 bool if_localize_sol_sens,
1199 nd_indicator = RealVectorX::Ones(1),
1200 indicator = RealVectorX::Zero(1);
1202 std::vector<libMesh::dof_id_type> dof_indices;
1203 const libMesh::DofMap& dof_map =
_system->
system().get_dof_map();
1206 const libMesh::NumericVector<Real>
1208 *dsol_vec =
nullptr;
1210 std::unique_ptr<libMesh::NumericVector<Real> >
1212 localized_perturbed_solution;
1214 if (if_localize_sol) {
1216 sol_vec = localized_solution.get();
1221 if (if_localize_sol_sens) {
1223 dsol_vec = localized_perturbed_solution.get();
1234 libMesh::MeshBase::const_element_iterator el =
1235 nonlin_sys.get_mesh().active_local_elements_begin();
1236 const libMesh::MeshBase::const_element_iterator end_el =
1237 nonlin_sys.get_mesh().active_local_elements_end();
1240 for ( ; el != end_el; ++el) {
1242 const libMesh::Elem* elem = *el;
1257 nd_indicator.setZero(elem->n_nodes());
1258 for (
unsigned int i=0; i<elem->n_nodes(); i++) {
1259 (*_indicator)(elem->node_ref(i), nonlin_sys.time, indicator);
1260 nd_indicator(i) = indicator(0);
1265 nonlin_sys.get_mesh().max_elem_id(),
1266 nonlin_sys.get_mesh().max_node_id());
1271 dof_map.dof_indices (elem, dof_indices);
1275 unsigned int ndofs = (
unsigned int)dof_indices.size();
1277 dsol.setZero(ndofs);
1279 for (
unsigned int i=0; i<dof_indices.size(); i++) {
1280 sol(i) = (*sol_vec)(dof_indices[i]);
1282 dsol(i) = (*dsol_vec)(dof_indices[i]);
1290 const std::vector<const libMesh::Elem *> &
1293 std::vector<const libMesh::Elem*>::const_iterator
1294 low_sub_elem_it = elems_low.begin(),
1295 low_sub_elem_end = elems_low.end();
1297 for (; low_sub_elem_it != low_sub_elem_end; low_sub_elem_it++ ) {
1299 const libMesh::Elem* sub_elem = *low_sub_elem_it;
1307 output.
init(geom_elem);
1319 if (nd_indicator.maxCoeff() > tol &&
1322 dof_map.dof_indices (elem, dof_indices);
1326 unsigned int ndofs = (
unsigned int)dof_indices.size();
1328 dsol.setZero(ndofs);
1330 for (
unsigned int i=0; i<dof_indices.size(); i++) {
1331 sol(i) = (*sol_vec)(dof_indices[i]);
1333 dsol(i) = (*dsol_vec)(dof_indices[i]);
1341 const std::vector<const libMesh::Elem *> &
1345 std::vector<const libMesh::Elem*>::const_iterator
1346 hi_sub_elem_it = elems_hi.begin(),
1347 hi_sub_elem_end = elems_hi.end();
1349 for (; hi_sub_elem_it != hi_sub_elem_end; hi_sub_elem_it++ ) {
1351 const libMesh::Elem* sub_elem = *hi_sub_elem_it;
1359 output.
init(geom_elem);
MAST::AssemblyElemOperations * _elem_ops
provides assembly elem operations for use by this class
MAST::NonlinearSystem & system()
const std::vector< const libMesh::Elem * > & get_sub_elems_positive_phi() const
bool _evaluate_output_on_negative_phi
bool if_elem_has_positive_phi_region() const
void init(const libMesh::NumericVector< Real > &sol, bool reuse_vector)
initializes the data structures to perform the interpolation function of sol.
virtual bool if_elem_depends_on_parameter(const libMesh::Elem &e, const MAST::FunctionBase &p) const =0
libMesh::DenseMatrix< Real > DenseRealMatrix
virtual void init(MAST::AssemblyBase &assembly)
MAST::LevelSetIntersection & get_intersection()
This class implements a system for solution of nonlinear systems.
This defines a parameter that is a level set function and stores a pointer to the node in the level-s...
MAST::FieldFunction< RealVectorX > * _indicator
bool override_flag
if true, assume zero solution sensitivity when elem does not dependent on parameter.
void solution_of_factored_element(const libMesh::Elem &elem, RealVectorX &elem_sol)
updates the components of the solution vector in elem_sol for the void domain using the stored soluti...
bool if_elem_on_negative_phi() const
bool if_factor_element(const libMesh::Elem &elem) const
virtual void set_elem_solution_sensitivity(const RealVectorX &sol)
sets the element solution sensitivity
virtual void set_assembly(MAST::AssemblyBase &assembly)
sets the assembly object
virtual void init(const libMesh::Elem &elem, const MAST::SystemInitialization &sys_init)
This method should not get called for this class.
This provides the base class for definitin of element level contribution of output quantity in an ana...
LevelSetNonlinearImplicitAssembly(bool enable_dof_handler)
constructor associates this assembly object with the system
virtual void zero_for_sensitivity()=0
zeroes the output quantity values stored inside this object so that assembly process can begin...
bool close_matrix
flag to control the closing fo the Jacobian after assembly
virtual void set_indicator_function(MAST::FieldFunction< RealVectorX > &indicator)
attaches indicator function to this.
virtual void calculate_output_direct_sensitivity(const libMesh::NumericVector< Real > &X, bool if_localize_sol, const libMesh::NumericVector< Real > *dXdp, bool if_localize_sol_sens, const MAST::FunctionBase &p, MAST::OutputAssemblyElemOperations &output)
evaluates the sensitivity of the outputs in the attached discipline with respect to the parametrs in ...
const MAST::FilterBase * _filter
virtual void set_elem_solution(const RealVectorX &sol)
sets the element solution
virtual void evaluate()=0
this is the abstract interface to be implemented by derived classes.
virtual void calculate_output(const libMesh::NumericVector< Real > &X, bool if_localize_sol, MAST::OutputAssemblyElemOperations &output)
calculates the value of quantity .
MAST::LevelSetInterfaceDofHandler * _dof_handler
void init(const MAST::FieldFunction< Real > &phi, const libMesh::Elem &e, const Real t, unsigned int max_elem_id, unsigned int max_node_id)
MAST::SystemInitialization * _system
System for which this assembly is performed.
virtual void elem_sensitivity_calculations(const MAST::FunctionBase &f, RealVectorX &vec)=0
performs the element sensitivity calculations over elem, and returns the element residual sensitivity...
virtual bool is_topology_parameter() const
MAST::FieldFunction< RealVectorX > * _velocity
virtual void clear_level_set_function()
clears association with level set function
virtual void residual_and_jacobian(const libMesh::NumericVector< Real > &X, libMesh::NumericVector< Real > *R, libMesh::SparseMatrix< Real > *J, libMesh::NonlinearImplicitSystem &S)
function that assembles the matrices and vectors quantities for nonlinear solution ...
virtual void elem_calculations(bool if_jac, RealVectorX &vec, RealMatrixX &mat)=0
performs the element calculations over elem, and returns the element vector and matrix quantities in ...
MAST::PhysicsDisciplineBase * _discipline
PhysicsDisciplineBase object for which this class is assembling.
MAST::FieldFunction< Real > * _level_set
virtual void set_elem_data(unsigned int dim, const libMesh::Elem &ref_elem, MAST::GeomElem &elem) const =0
some analyses may want to set additional element data before initialization of the GeomElem...
virtual void post_assembly(const libMesh::NumericVector< Real > &X, libMesh::NumericVector< Real > *R, libMesh::SparseMatrix< Real > *J, libMesh::NonlinearImplicitSystem &S)=0
libMesh::DenseVector< Real > DenseRealVector
Real get_positive_phi_volume_fraction() const
MAST::NonlinearImplicitAssembly::PostAssemblyOperation * _post_assembly
this object, if non-NULL is user-provided to perform actions after assembly and before returning to t...
Matrix< Real, Dynamic, Dynamic > RealMatrixX
std::unique_ptr< libMesh::NumericVector< Real > > build_localized_vector(const libMesh::System &sys, const libMesh::NumericVector< Real > &global) const
localizes the parallel vector so that the local copy stores all values necessary for calculation of t...
bool if_use_dof_handler() const
virtual void clear_assembly()
clears the assembly object
void copy(DenseRealMatrix &m1, const RealMatrixX &m2)
This will compute the solution at the interface under the assumption of zero surface normal flux...
Creates a geometric filter for the level-set design variables.
void element_factored_residual_and_jacobian(const libMesh::Elem &elem, const RealMatrixX &jac, const RealVectorX &res, std::vector< libMesh::dof_id_type > &material_dof_ids, RealMatrixX &jac_factored_uu, RealVectorX &res_factored_u)
factorizes the residual and jacobian into the components for the dofs on material nodes...
virtual void elem_topology_sensitivity_calculations(const MAST::FunctionBase &f, RealVectorX &vec)=0
performs the element topology sensitivity calculations over elem, and returns the element residual se...
void clear()
clear the solution
This class inherits from MAST::GeomElem and provides an interface to initialize FE objects on sub-ele...
Matrix< Real, Dynamic, 1 > RealVectorX
MAST::LevelSetInterfaceDofHandler & get_dof_handler()
virtual void init(const MAST::GeomElem &elem)=0
initializes the object for calculation of element quantities for the specified elem.
virtual void output_derivative_for_elem(RealVectorX &dq_dX)=0
returns the output quantity derivative with respect to state vector in dq_dX.
virtual void set_level_set_function(MAST::FieldFunction< Real > &level_set, const MAST::FilterBase &filter)
attaches level set function to this
const std::vector< const libMesh::Elem * > & get_sub_elems_negative_phi() const
virtual bool sensitivity_assemble(const libMesh::NumericVector< Real > &X, bool if_localize_sol, const MAST::FunctionBase &f, libMesh::NumericVector< Real > &sensitivity_rhs, bool close_vector=true)
Assembly function.
virtual void clear_level_set_velocity_function()
clears the velocity function
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
virtual void init(const MAST::GeomElem &elem, bool init_grads, const std::vector< libMesh::Point > *pts=nullptr)
Initializes the quadrature and finite element for element volume integration.
MAST::LevelSetVoidSolution * _void_solution_monitor
virtual void calculate_output_derivative(const libMesh::NumericVector< Real > &X, bool if_localize_sol, MAST::OutputAssemblyElemOperations &output, libMesh::NumericVector< Real > &dq_dX)
calculates
virtual void zero_for_analysis()=0
zeroes the output quantity values stored inside this object so that assembly process can begin...
MAST::LevelSetIntersection * _intersection
void init(const MAST::SystemInitialization &sys_init, MAST::LevelSetIntersection &intersection, MAST::FieldFunction< Real > &phi)
MAST::AssemblyBase::ElemParameterDependence * _param_dependence
If provided by user, this object is used by sensitiivty analysis to check for whether or the current ...
virtual void clear_elem()
clears the element initialization
virtual const std::vector< Real > & get_JxW() const
virtual void init(const libMesh::Elem &elem, const MAST::SystemInitialization &sys_init)
initialize the object for the specified reference elem.
virtual void evaluate_topology_sensitivity(const MAST::FunctionBase &f)=0
this evaluates all relevant topological sensitivity components on the element.
virtual ~LevelSetNonlinearImplicitAssembly()
destructor resets the association of this assembly object with the system
This class specializes the MAST::FEBase class for level-set applications where integration is to be p...
virtual void set_level_set_velocity_function(MAST::FieldFunction< RealVectorX > &velocity)
the velocity function used to calculate topology sensitivity
void set_evaluate_output_on_negative_phi(bool f)
sets the flag on whether or not to evaluate the output on negative level set function ...
virtual void evaluate_sensitivity(const MAST::FunctionBase &f)=0
this evaluates all relevant sensitivity components on the element.
void clear()
clears the data structures
MAST::MeshFieldFunction * _sol_function
system solution that will be initialized before each solution