118 *
#
include "PhaseFieldSolver.h"
120 *
void InitialValues::vector_value(
const Point<2> &p,
129<a name=
"ann-PhaseFieldSolver.cpp"></a>
146 *
#
include "PhaseFieldSolver.h"
152 *
,
pcout(std::cout, (this_mpi_process == 0))
170<a name=
"ann-PhaseFieldSolver.h"></a>
247 *
double compute_residual();
265 *
const double theta;
295<a name=
"ann-applying_bc.cpp"></a>
315 *
#
include "PhaseFieldSolver.h"
355<a name=
"ann-assemble_system.cpp"></a>
372 *
#
include "PhaseFieldSolver.h"
389 *
const unsigned int dofs_per_cell = fe.n_dofs_per_cell();
415 *
std::vector<types::global_dof_index> local_dof_indices(dofs_per_cell);
419 *
for (
const auto &cell : dof_handler.active_cell_iterators()){
420 *
if (cell->subdomain_id() == this_mpi_process) {
424 *
fe_values.reinit(cell);
440 *
for (
unsigned int q = 0;
q < n_q_points; ++
q){
455 *
for (
unsigned int i = 0; i < dofs_per_cell; ++i){
465 *
for (
unsigned int j = 0;
j < dofs_per_cell; ++
j){
551 *
cell->get_dof_indices(local_dof_indices);
552 *
for (
unsigned int i = 0; i < dofs_per_cell; ++i)
554 *
for (
unsigned int j = 0;
j < dofs_per_cell; ++
j)
556 *
local_dof_indices[
j],
588<a name=
"ann-get_random_number.cpp"></a>
605 *
#
include "PhaseFieldSolver.h"
610 *
static std::default_random_engine
e;
611 *
static std::uniform_real_distribution<>
dis(-0.5, 0.5);
617<a name=
"ann-grid_dof.cpp"></a>
634 *
#
include "PhaseFieldSolver.h"
643 *
std::ifstream f(
"mesh/Kobayashi_mesh100x400.msh");
648 *
dof_handler.distribute_dofs(fe);
656 *
const IndexSet locally_owned_dofs =
659 *
locally_owned_dofs,
662 *
old_solution.reinit(locally_owned_dofs, mpi_communicator);
663 *
system_rhs.reinit(locally_owned_dofs, mpi_communicator);
664 *
conv_solution.reinit(locally_owned_dofs, mpi_communicator);
673<a name=
"ann-main.cpp"></a>
691 *
#
include "PhaseFieldSolver.h"
702<a name=
"ann-output_results.cpp"></a>
719 *
#
include "PhaseFieldSolver.h"
729 *
if (this_mpi_process == 0)
732 *
data_out.attach_dof_handler(dof_handler);
742 *
vtk_flags.compression_level =
744 *
data_out.set_flags(vtk_flags);
747 *
data_out.build_patches();
748 *
data_out.write_vtk(output);
754<a name=
"ann-run.cpp"></a>
771 *
#
include "PhaseFieldSolver.h"
774 *
void PhaseFieldSolver::run() {
777 *
pcout <<
" Number of degrees of freedom: " << dof_handler.n_dofs()
778 *
<<
" (by partition:";
780 *
pcout << (p == 0 ?
' ' :
'+')
783 *
pcout <<
")" << std::endl;
827 *
for (
unsigned int it = 1;
it <= 100; ++
it) {
828 *
pcout <<
"Newton iteration number:" <<
it << std::endl;
831 *
pcout <<
"Convergence Failure!!!!!!!!!!!!!!!" << std::endl;
870 *
pcout <<
"Nothing wrong till here!!!!!!" << std::endl;
875 *
pcout <<
"Solution Converged!" << std::endl;
898<a name=
"ann-solve.cpp"></a>
915 *
#
include "PhaseFieldSolver.h"
917 *
void PhaseFieldSolver::solve(){
std::conditional_t< rank_==1, std::array< Number, dim >, std::array< Tensor< rank_ - 1, dim, Number >, dim > > values
void make_sparsity_pattern(const DoFHandler< dim, spacedim > &dof_handler, SparsityPatternBase &sparsity_pattern, const AffineConstraints< number > &constraints={}, const bool keep_constrained_dofs=true, const types::subdomain_id subdomain_id=numbers::invalid_subdomain_id)
@ update_values
Shape function values.
@ update_JxW_values
Transformed quadrature weights.
@ update_gradients
Shape function gradients.
void subdomain_wise(DoFHandler< dim, spacedim > &dof_handler)
void random(DoFHandler< dim, spacedim > &dof_handler)
@ matrix
Contents is actually a matrix.
constexpr types::blas_int zero
constexpr types::blas_int one
void cell_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const FEValuesBase< dim > &fetest, const ArrayView< const std::vector< double > > &velocity, const double factor=1.)
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
SymmetricTensor< 2, dim, Number > epsilon(const Tensor< 2, dim, Number > &Grad_u)
void apply(const Kokkos::TeamPolicy< MemorySpace::Default::kokkos_space::execution_space >::member_type &team_member, const Kokkos::View< Number *, MemorySpace::Default::kokkos_space > shape_data, const ViewTypeIn in, ViewTypeOut out)
VectorType::value_type * begin(VectorType &V)
unsigned int n_mpi_processes(const MPI_Comm mpi_communicator)
unsigned int this_mpi_process(const MPI_Comm mpi_communicator)
std::string int_to_string(const unsigned int value, const unsigned int digits=numbers::invalid_unsigned_int)
void run(const Iterator &begin, const std_cxx20::type_identity_t< Iterator > &end, Worker worker, Copier copier, const ScratchData &sample_scratch_data, const CopyData &sample_copy_data, const unsigned int queue_length, const unsigned int chunk_size)
long double gamma(const unsigned int n)
void copy(const T *begin, const T *end, U *dest)
int(&) functions(const void *v1, const void *v2)
::VectorizedArray< Number, width > pow(const ::VectorizedArray< Number, width > &, const Number p)
inline ::VectorizedArray< Number, width > atan(const ::VectorizedArray< Number, width > &x)
const ::parallel::distributed::Triangulation< dim, spacedim > * triangulation