void
MAST::FirstOrderNewmarkTransientSolver::solve() {

    // make sure that the system has been specified
    libmesh_assert_msg(_system, "System pointer is NULL.");

    // ask the Newton solver to solve for the system solution
    _system->solve();

}
예제 #2
0
void MeshBase::set_elem_dimensions(const std::set<unsigned char> & elem_dims)
{
#ifdef DEBUG
  // In debug mode, we call cache_elem_dims() and then make sure
  // the result actually agrees with what the user specified.
  parallel_object_only();

  this->cache_elem_dims();
  libmesh_assert_msg(_elem_dims == elem_dims, \
                     "Specified element dimensions does not match true element dimensions!");
#endif

  _elem_dims = elem_dims;
}
void
MAST::EigenproblemAssembly::
attach_discipline_and_system(MAST::PhysicsDisciplineBase &discipline,
                             MAST::SystemInitialization &system) {
    
    libmesh_assert_msg(!_discipline && !_system,
                       "Error: Assembly should be cleared before attaching System.");
    
    _discipline = &discipline;
    _system     = &system;
    
    // now attach this to the system
    libMesh::EigenSystem& eigen_sys =
    dynamic_cast<libMesh::EigenSystem&>(system.system());
    eigen_sys.attach_assemble_object(*this);
    eigen_sys.attach_eigenproblem_sensitivity_assemble_object(*this);
}
void
MAST::NonlinearImplicitAssembly::
attach_discipline_and_system(MAST::PhysicsDisciplineBase &discipline,
                             MAST::SystemInitialization &system) {
    
    libmesh_assert_msg(!_discipline && !_system,
                       "Error: Assembly should be cleared before attaching System.");
    
    _discipline = &discipline;
    _system     = &system;
    
    libMesh::NonlinearImplicitSystem& nonlin_sys =
    dynamic_cast<libMesh::NonlinearImplicitSystem&>(system.system());
    
    nonlin_sys.nonlinear_solver->residual_and_jacobian_object = this;
    nonlin_sys.attach_sensitivity_assemble_object(*this);
}