Skip to content

Commit

Permalink
(M) Postprocessing output
Browse files Browse the repository at this point in the history
  • Loading branch information
j507 committed Sep 16, 2024
1 parent 2e03e19 commit c3ccd5b
Show file tree
Hide file tree
Showing 4 changed files with 186 additions and 283 deletions.
5 changes: 4 additions & 1 deletion applications/simple_shear.cc
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,10 @@ homogenization(
mapping),
postprocessor(
fe_field,
crystals_data),
crystals_data,
parameters.solver_parameters.dimensionless_form_parameters,
false,
parameters.output.flag_output_dimensionless_quantities),
simple_shear(
fe_field,
mapping,
Expand Down
34 changes: 20 additions & 14 deletions include/gCP/postprocessing.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ class Postprocessor : public dealii::DataPostprocessor<dim>
{
public:
Postprocessor(
std::shared_ptr<FEField<dim>> &fe_field,
std::shared_ptr<CrystalsData<dim>> &crystals_data,
const bool flag_light_output = false,
const bool flag_output_fluctuations = false);
std::shared_ptr<FEField<dim>> &fe_field,
std::shared_ptr<CrystalsData<dim>> &crystals_data,
const RunTimeParameters::DimensionlessForm &parameters,
const bool flag_light_output = false,
const bool flag_output_dimensionless_quantities = false,
const bool flag_output_fluctuations = false);

virtual void evaluate_vector_field(
const dealii::DataPostprocessorInputs::Vector<dim> &inputs,
Expand All @@ -57,25 +59,29 @@ class Postprocessor : public dealii::DataPostprocessor<dim>
const dealii::SymmetricTensor<2,dim> macroscopic_strain);

private:
std::shared_ptr<const FEField<dim>> fe_field;
std::shared_ptr<const FEField<dim>> fe_field;

std::shared_ptr<const CrystalsData<dim>> crystals_data;
std::shared_ptr<const CrystalsData<dim>> crystals_data;

std::shared_ptr<const ConstitutiveLaws::HookeLaw<dim>> hooke_law;
std::shared_ptr<const ConstitutiveLaws::HookeLaw<dim>> hooke_law;

std::vector<std::pair<unsigned int, unsigned int>> voigt_indices;
std::vector<std::pair<unsigned int, unsigned int>> voigt_indices;

dealii::SymmetricTensor<2,dim> macroscopic_strain;
dealii::SymmetricTensor<2,dim> macroscopic_strain;

const dealii::SymmetricTensor<4,dim> deviatoric_projector;
const dealii::SymmetricTensor<4,dim> deviatoric_projector;

const dealii::SymmetricTensor<4,3> deviatoric_projector_3d;
const dealii::SymmetricTensor<4,3> deviatoric_projector_3d;

bool flag_light_output;
RunTimeParameters::DimensionlessForm parameters;

bool flag_output_fluctuations;
bool flag_light_output;

bool flag_init_was_called;
bool flag_output_dimensionless_quantities;

bool flag_output_fluctuations;

bool flag_init_was_called;

dealii::SymmetricTensor<2,3> convert_2d_to_3d(
dealii::SymmetricTensor<2,dim> symmetric_tensor) const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ nonlinear_solver_logger(
postprocessor(
fe_field,
crystals_data,
parameters.dimensionless_form_parameters,
true,
true),
flag_init_was_called(false)
{
Expand Down
Loading

0 comments on commit c3ccd5b

Please sign in to comment.