muMECH  1.0
Friends | List of all members
mumech::Problem Class Reference

Problem description. More...

#include <problem.h>

Inheritance diagram for mumech::Problem:
mumech::Problems

Friends

class Inclusion
 
class InclusionRecord3D
 
class InclusionRecord2D
 
class printBenchmarkResultsVtk
 
class selfBalanceAlgorithm
 
class eshelbySoluUniformField
 
class eshelbySoluEllipticIntegrals
 
class MatrixRecord
 
class Homogenization
 
class Dilute
 
class DifferentialScheme
 
class RegGrid
 
class Mesh
 
class Point
 
class mNode
 
class mElement
 

*** PRIVATE VARIABLES ***

All variables are private.


bool data_set
 Input data given (direct input or vtk file read) - problem description. More...
 
bool data_equivalent
 Problem converted to equivalent one. More...
 
MatrixRecordmatrix
 matrix record More...
 
int noIncl
 number of inclusions More...
 
Inclusion ** inclusions
 inclusion records - 1d array of pointers to InclusionRecord More...
 
SBAtype SBA_type
 type of Self balancing algorithm (SBA) More...
 
bool SBA_optimized
 SBA optimized (FULL/_OPTIMIZED_) More...
 
int SBA_maxiters
 Number of iterations in SBA. More...
 
int SBA_reqiters
 Number of iterations in SBA. More...
 
int intFieldsShape
 Sets the internal fields shape. 0 = basic eshelby solution, 1 = polynomial - if available, 2 = constant, 3 = sum all without any recalculation. More...
 
int approximation
 Approximation of epsilon tau - 0 = constant, 1 = linear, ... More...
 
double approx_point_pos1
 
DiffTypes diffType
 the type of differentiation actually used. (just for testing purposes) More...
 
double problem_size_A [3]
 ? More...
 
double problem_size_B [3]
 ? More...
 
double node_dist
 ? More...
 
int verbose
 0 - no printing, 1 - basic printing, 3 - debug printing More...
 
double min_axes_diff
 The minimal relative difference of two inclusion semiaxes to guarantee numerical stability; relative to the first, i.g. longer, of two compared axes. More...
 
double max_axes_diff
 The maximal relative difference of two inclusion semiaxes to guarantee numerical stability; relative to the first, i.g. longer, of two compared axes. More...
 
bool min_axes_diff_change
 Permission to change the inclusion shape, when the minimal relative difference of two inclusion semiaxes is violated. More...
 
bool max_axes_diff_change
 Permission to change the inclusion shape, when the maximal relative difference of two inclusion semiaxes is violated. More...
 
double volumeOfIncls
 Volume of all inclusions. More...
 
int totalNoActingIncls
 Total number of acting inclusions, e.i. sum of inclusion[i]->noActingIncls. More...
 
int nmeshes
 Number of meshes. More...
 
Mesh ** meshes
 Meshes. More...
 
int nhomogs
 Number of homogenizations. More...
 
Homogenization ** homogs
 Homogenizations. More...
 

*** PUBLIC FUNCTIONS ***


 Problem (void)
 Constructor. More...
 
virtual ~Problem ()
 Destructor. More...
 
virtual classID give_classid () const
 Returns classID - class identification. More...
 
void read_input_file (const char *filename)
 Reads filename VTK input file containing inclusion geometry and topology. More...
 
void input_data_initialize_and_check_consistency (void)
 Initializes and checks consistency of all input data. This function has to be called after data input. More...
 
void convert_to_equivalent_problem (void)
 Converts the given heterogeneous problem to the equivalent problem. More...
 
void print_equivalent_problem (const char *filename)
 Prints the equivalent problem record into the VTK file. More...
 
long giveFieldsOfPoint (double **displc, double **strain, double **stress, const double *coords, char ptFlag, int rs, int nrs, PFCmode pfcMode=PFCM_OPTIMIZED, long reqIncl=-3, STRNotation tn=STRN_THEORETICAL_ROW) const
 Function gives the analytical solution of the perturbation or total fields (displacements, strains and stresses) of a point for given set of remote strains. More...
 
long giveFieldsOfPointOneRS (double *displc, double *strain, double *stress, const double *coords, char ptFlag, int rs, PFCmode pfcMode=PFCM_OPTIMIZED, long reqIncl=-3, STRNotation tn=STRN_THEORETICAL_ROW) const
 Function gives results for only one remote strain. See function giveFieldsOfPoint(). More...
 
void printFieldsOnMeshVTK (const char *mesh_file_out, const char *mesh_file, char ptFlag, int rs, int nrs, PFCmode pfcMode=PFCM_OPTIMIZED) const
 Function computes all fields (displacements, strains and stresses) in nodes a mesh given via VTK file, see giveFieldsOfPoint() for details about parameters. More...
 
void printFieldsOnMeshGrid (const char *mesh_file_out, const double *p1, const double *p2, const long *n, char ptFlag, int rs, int nrs, PFCmode pfcMode=PFCM_OPTIMIZED) const
 Function computes all fields (displacements, strains and stresses) in nodes a regular orthogonal mesh/grid, see giveFieldsOfPoint() for details about parameters. More...
 
void print_visualization (const char *filename, int n, int dim=0, bool refined=false)
 Triangulates inclusions surfaces and prints filename VTK file. More...
 
void check_overlap (void)
 Check that inclusions do not overlap. More...
 
void matrix_giveReducedStiffMatrix (double *m) const
 
void matrix_giveFullStiffMatrix (double *m) const
 
virtual int give_nLC (void) const
 Give number of load cases, e.i. number of load cases, i.e. number of Remote_strain fields, saved in matrix record. More...
 
DiffTypes give_diffType (void) const
 Give type of ... More...
 
Meshgive_new_mesh (void)
 Give verbose level. More...
 
Homogenizationgive_new_homogenization (HomogenizationType ht)
 
Problemread_inclusions_plus_initialize_and_print (const char *inclusion_file, const char *equiv_file, DiffTypes dt)
 

*** PUBLIC FUNCTIONS - obsolete debug ***

Public functions, obsolete or debugging functions.


void set_SBA_optimized (bool val)
 Set type of self-balancing algorithm. More...
 
void set_SBA_maximumNumberOfIterations (int val)
 
void set_SBA_requiredNumberOfIterations (int val)
 
void set_intFieldsShape (int val)
 
void set_SBAM (SBAtype val)
 
void set_approximation (int val)
 
void set_problem_size (double a1, double a2, double a3, double b1, double b2, double b3, double node_distance)
 
void set_semiaxes_min_difference (double val)
 Set the variable min_axes_diff. More...
 
void set_semiaxes_max_difference (double val)
 Set the variable max_axes_diff. More...
 
Inclusiongive_inclusion (long i) const
 debug, for one function in tools More...
 
long give_inclusion_with_point_inside (const double *coords, double epsilon=0.0) const
 Returns inclusion ID inside the point lays. More...
 
void give_ovlivneni (const double *coords, double *result)
 Funkce pro zkoumani ucinku inkluze na druhou v balancovacim algoritmu. Casem smazat, pac balancing se asi nebude pouzivat. More...
 
void compute_fields_and_cmp_with_FEM_on_mesh (const char *mesh_file, const char *fem_results, int lc, int nlc, PFCmode pfcMode)
 
double compute_supplement_energy (int lc)
 

*** DIRECT INPUT API - obligatory ***

Public functions for direct data input, obligatory for correct input.


void set_data_set (void)
 Function switches bool flag data_set on true. That indicates start of the process of data input. More...
 
void set_matrix_E_nu (double E, double nu)
 Sets problem dimension. More...
 
void set_numberOfRemoteStrains (int n)
 Sets number of remote strains. More...
 
void set_RemoteStrain (int id, const double *rs)
 Sets the id -th remote strain, rs is row-by-row matrix of dimensions 2x2 or 3x3 for 2d or 3d problem, respectively. More...
 
void set_number_of_inclusions (long n)
 Sets number of inclusions. More...
 
void set_inclusion_centroids (long id, double x, double y, double z=0.0)
 Sets the id -th inclusion centroids [x,y,z]. The z coordinate is ignored in the case of 2 dimensions. More...
 
void set_inclusion_E_nu (long id, double E, double nu)
 Sets the id -th inclusion material properties, Young's modulus E and Poissons ratio nu. More...
 
void set_inclusion_semiaxesDimensions (long id, double a1, double a2, double a3=0.0)
 Sets the id -th inclusion sorted semiaxes dimensions [a1,a2,a3]. The a3 dimension is ignored in the case of 2 dimensions. More...
 
void set_inclusion_EulerAnglesDEG (long id, double e1, double e2=0.0, double e3=0.0)
 Sets the id -th inclusion Euler angles [e1,e2,e3] given in degrees. The e2 and e3 angles are ignored in the case of 2 dimensions. More...
 

*** DIRECT INPUT API - voluntary ***

Public functions for direct input of the voluntary data, default values are used if not set.


void set_inclusion_shape (long id, InclusionGeometry shape)
 Sets the id -th inclusion shape. Default shape is detected automaticly. More...
 
void set_diffType (DiffTypes val)
 Sets type of differentiation, analytical by default. More...
 
void set_DataDimDiff (int dim, DiffTypes dt)
 Function agregates set_data_set, set_dimension and set_diffType functions. More...
 
void set_UnitRemoteStrains (void)
 Function sets a set of unit remote strains. More...
 
void set_inclusion_all (long id, double x, double y, double e, double n, double a1, double a2, double e1)
 Agregates ... More...
 
void set_inclusion_all (long id, double x, double y, double z, double e, double n, double a1, double a2, double a3, double e1, double e2, double e3)
 
void generate_equiv_1x2dI_2d (double Em, double num, const double *rs, double x, double y, double E, double nu, double a1, double a2, double ea, DiffTypes dt)
 

*** PRIVATE FUNCTIONS ***


virtual bool is_converted_to_equivalent (void) const
 Give type of ... More...
 
int is_twodim (void) const
 
int get_SBA_maxiters (void)
 
int get_SBA_reqiters (void)
 
void check_dim (int i) const
 
int give_verbose (void) const
 Give verbose level. More...
 
double give_semiaxes_min_difference (void) const
 Give the variable min_axes_diff. More...
 
double give_semiaxes_max_difference (void) const
 Give the variable max_axes_diff. More...
 
bool give_semiaxis_min_difference_change (void) const
 Give the variable min_axes_diff_change. More...
 
bool give_semiaxis_max_difference_change (void) const
 Give the variable max_axes_diff_change. More...
 
MatrixRecordgive_matrix (void) const
 
int ndisplc_all (void) const
 
int nstrain_all (void) const
 
bool file_type_s2e (const char *s)
 
int check_lc_nlc (int lc, int nlc) const
 
PointPositionFlag givePointPosition (const double loc_x[3], const double sort_a[3], InclusionGeometry shape) const
 
void printVtkFileCompleteInclRec (const char *rsltFileName)
 Function prints the complete inclusion record to a VTK file. More...
 
void findAffectedInclusions (void)
 For all inclusions function finds a set of affected inclusions which is given by magnitude of action radius. More...
 
void updateEigenstrainsBySBalgorithm (void)
 Function updates the actual and transformation (equivalent) eigenstrains by taking into account the mutual dependencies (interactions). More...
 
void updateEigenstrainsBySBalgorithm_2D (int strainID)
 Function updates the actual and transformation (equivalent) eigenstrains by taking into account the mutual dependencies (interactions). More...
 
void updateStrainsInInclRecord (int noUpdate)
 
long give_EshelbyPertFieldsOnePoint (const double *coords, double **disp, double **strain, double **stress, int rs, int nrs, PFCmode pfcMode, long reqIncl=-3) const
 
void give_EshelbyPertFieldsOnePoint_external (const double *coords, double **disp, double **strain, double **stress, int lc, int nlc, PFCmode pfcMode, long parent_incl) const
 The version of the function giveEshelbyPertFields_OnePoint. More...
 
long giveActingInclusions (long *actIncls, const double *coords) const
 Function gives a set of acting inclusions to a given point. More...
 
double updateEpsTauInSBal (int strainID, double **&last_eps_tau)
 
static int check_lc_nlc (int lc, int nlc, int nRS)
 

Additional Inherited Members

- Public Member Functions inherited from mumech::Problems
 Problems ()
 Constructor. More...
 
virtual ~Problems ()
 Destructor. More...
 
int give_twodim (void) const
 
int give_dimension (void) const
 
int ndisplc_one (void) const
 
int nstrain_one (void) const
 
int give_VECT_RANGE (void) const
 Gives vector range, same as dimension. More...
 
int give_EA_RANGE (void) const
 Gives vector range, same as dimension. More...
 
int give_TENS_RANGE (void) const
 Gives tensor range, same as dimension^2. Theoretical range of a second order tensor. More...
 
int give_VM_TENS_RANGE (void) const
 Gives range of a second order tensor in Voigt-Mandel notation. More...
 
int give_ISO_C_RANGE (void) const
 Gives range of ... More...
 
int give_EL_POT_RANGE (void) const
 Gives range of ... More...
 
int give_TRNSFM_MTRX_VEC_RANGE (void) const
 Gives range of ... More...
 
int give_TRNSFM_MTRX_TENS_RANGE (void) const
 Gives range of ... More...
 
void set_dimension (int d)
 
- Protected Attributes inherited from mumech::Problems
bool twodim
 2 dimension problem; 3d is default; twodim == true - 2d, twodim == false - 3d More...
 

Detailed Description

Problem description.

All information about the problem. General information. Inclusions description.

Definition at line 154 of file problem.h.

Constructor & Destructor Documentation

mumech::Problem::Problem ( void  )

Constructor.

Definition at line 67 of file problem.cpp.

mumech::Problem::~Problem ( )
virtual

Destructor.

Definition at line 115 of file problem.cpp.

References maxNumberOfMeshes.

Member Function Documentation

void mumech::Problem::check_dim ( int  i) const
inlineprivate
int mumech::Problem::check_lc_nlc ( int  lc,
int  nlc 
) const
inlineprivate
static int mumech::Problem::check_lc_nlc ( int  lc,
int  nlc,
int  nRS 
)
inlinestaticprivate

Definition at line 541 of file problem.h.

References _errorr.

void mumech::Problem::check_overlap ( void  )

Check that inclusions do not overlap.

Definition at line 2348 of file problem.cpp.

References _errorr.

void mumech::Problem::compute_fields_and_cmp_with_FEM_on_mesh ( const char *  mesh_file,
const char *  fem_results,
int  lc,
int  nlc,
PFCmode  pfcMode 
)
double mumech::Problem::compute_supplement_energy ( int  lc)

Definition at line 1379 of file problem.cpp.

void mumech::Problem::convert_to_equivalent_problem ( void  )
bool mumech::Problem::file_type_s2e ( const char *  s)
private

Definition at line 346 of file problem.cpp.

References _errorr2, and _STRCMP.

void mumech::Problem::findAffectedInclusions ( void  )
private

For all inclusions function finds a set of affected inclusions which is given by magnitude of action radius.

Definition at line 1327 of file problem.cpp.

References mumech::CopyVector().

void mumech::Problem::generate_equiv_1x2dI_2d ( double  Em,
double  num,
const double *  rs,
double  x,
double  y,
double  E,
double  nu,
double  a1,
double  a2,
double  ea,
DiffTypes  dt 
)

Definition at line 147 of file problem.cpp.

Referenced by mumech::Comparison::give_energy_MM().

int mumech::Problem::get_SBA_maxiters ( void  )
inlineprivate
int mumech::Problem::get_SBA_reqiters ( void  )
inlineprivate
virtual classID mumech::Problem::give_classid ( ) const
inlinevirtual

Returns classID - class identification.

Implements mumech::Problems.

Definition at line 239 of file problem.h.

References mumech::classProblem, mumech::PFCM_OPTIMIZED, and mumech::STRN_THEORETICAL_ROW.

DiffTypes mumech::Problem::give_diffType ( void  ) const
inline
long mumech::Problem::give_EshelbyPertFieldsOnePoint ( const double *  coords,
double **  disp,
double **  strain,
double **  stress,
int  rs,
int  nrs,
PFCmode  pfcMode,
long  reqIncl = -3 
) const
private
void mumech::Problem::give_EshelbyPertFieldsOnePoint_external ( const double *  coords,
double **  disp,
double **  strain,
double **  stress,
int  lc,
int  nlc,
PFCmode  pfcMode,
long  parent_incl 
) const
private
Inclusion* mumech::Problem::give_inclusion ( long  i) const
inline
long mumech::Problem::give_inclusion_with_point_inside ( const double *  coords,
double  epsilon = 0.0 
) const

Returns inclusion ID inside the point lays.

Definition at line 1647 of file problem.cpp.

Referenced by print_graf().

MatrixRecord* mumech::Problem::give_matrix ( void  ) const
inlineprivate
Homogenization * mumech::Problem::give_new_homogenization ( HomogenizationType  ht)
Mesh * mumech::Problem::give_new_mesh ( void  )

Give verbose level.

Definition at line 2076 of file problem.cpp.

Referenced by clanek_homog_grid(), and mumech::RegGrid::giveHomogenizedStiffnessMatrix().

virtual int mumech::Problem::give_nLC ( void  ) const
inlinevirtual
void mumech::Problem::give_ovlivneni ( const double *  coords,
double *  result 
)

Funkce pro zkoumani ucinku inkluze na druhou v balancovacim algoritmu. Casem smazat, pac balancing se asi nebude pouzivat.

Definition at line 1357 of file problem.cpp.

References mumech::CleanVector(), mumech::CopyVector(), mumech::Point::set_nlc(), and mumech::Point::x.

Referenced by ovlivneni().

double mumech::Problem::give_semiaxes_max_difference ( void  ) const
inlineprivate
double mumech::Problem::give_semiaxes_min_difference ( void  ) const
inlineprivate
bool mumech::Problem::give_semiaxis_max_difference_change ( void  ) const
inlineprivate

Give the variable max_axes_diff_change.

Definition at line 507 of file problem.h.

bool mumech::Problem::give_semiaxis_min_difference_change ( void  ) const
inlineprivate
int mumech::Problem::give_verbose ( void  ) const
inlineprivate

Give verbose level.

Definition at line 499 of file problem.h.

Referenced by mumech::selfBalanceAlgorithm::totalEigStrainInInclCentroidsUpdate().

long mumech::Problem::giveActingInclusions ( long *  actIncls,
const double *  coords 
) const
private

Function gives a set of acting inclusions to a given point.

na adaptivni siti se porovna mumech vypocet s FEM vypoctem porovnani:

Function returns the number of acting inclusions. Function is a clon of 'inclRecordInit::giveAffectedInclusions' method.

Definition at line 2165 of file problem.cpp.

long mumech::Problem::giveFieldsOfPoint ( double **  displc,
double **  strain,
double **  stress,
const double *  coords,
char  ptFlag,
int  rs,
int  nrs,
PFCmode  pfcMode = PFCM_OPTIMIZED,
long  reqIncl = -3,
STRNotation  tn = STRN_THEORETICAL_ROW 
) const

Function gives the analytical solution of the perturbation or total fields (displacements, strains and stresses) of a point for given set of remote strains.

The fields with NULL pointers are not computed. The resulting fields depend on the action region of surrounding inclusions of a given point if pfcMode == PFCM_OPTIMIZED. In case of one lc, send ukazatel, toto dodelej do vzorovych prikladu. termitovo

Parameters
coordsCoordinates of a point.
displcSet of nrs displacement vectors to be calculated (if displc!=NULL). Vectors are saved in rows.
strainSet of nrs strain tensors to be calculated (if strain!=NULL). Tensors are saved in vector form, one tensor in one row of strain array.
stressSet of nrs stress tensors to be calculated (if stress!=NULL). Tensors are saved in vector form, one tensor in one row of stress array.
ptFlagFlag defines the type of calculated fields, 'p' denotes 'perturbation' and 't' denotes 'total'.
rsThe first computed remote strain.
nrsNumber of computed remote strains.
pfcModeAlgorithm type of a point fields calculation (PFCM_FULL/PFCM_OPTIMIZED).
reqInclNumber of the inclusion the point is supposed to lay inside. Allowed values: -3 - no supposal; -2 - inside of some inclusion; -1 - outside of all inclusions; >= 0 - inside of the inclusion.
tnThe notation of the strain/stress tensor to vector reduction.

Definition at line 1706 of file problem.cpp.

References _errorr, mumech::AddVector(), mumech::convertTensorStrain(), mumech::convertTensorStress(), and mumech::STRN_THEORETICAL_FEEP.

Referenced by clanek_3d_vzor(), mumech::Mesh::compute_element_fields(), mumech::Mesh::compute_node_fields(), energyTest01(), speedtest2Dx3D(), test01(), test3D(), and twoInclTest().

long mumech::Problem::giveFieldsOfPointOneRS ( double *  displc,
double *  strain,
double *  stress,
const double *  coords,
char  ptFlag,
int  rs,
PFCmode  pfcMode = PFCM_OPTIMIZED,
long  reqIncl = -3,
STRNotation  tn = STRN_THEORETICAL_ROW 
) const

Function gives results for only one remote strain. See function giveFieldsOfPoint().

Definition at line 1699 of file problem.cpp.

Referenced by Ellipse(), Ellipsoid(), plstrain_2I_2d(), plstrain_2I_3d(), print_graf(), and x2Dx3D_rotation().

PointPositionFlag mumech::Problem::givePointPosition ( const double  loc_x[3],
const double  sort_a[3],
InclusionGeometry  shape 
) const
private
void mumech::Problem::input_data_initialize_and_check_consistency ( void  )
virtual bool mumech::Problem::is_converted_to_equivalent ( void  ) const
inlineprivatevirtual
int mumech::Problem::is_twodim ( void  ) const
inlineprivate
void mumech::Problem::matrix_giveFullStiffMatrix ( double *  m) const
inline
void mumech::Problem::matrix_giveReducedStiffMatrix ( double *  m) const
inline
int mumech::Problem::ndisplc_all ( void  ) const
inlineprivate

Definition at line 532 of file problem.h.

References mumech::Problems::give_VECT_RANGE(), and mumech::MatrixRecord::nRS.

int mumech::Problem::nstrain_all ( void  ) const
inlineprivate

Definition at line 533 of file problem.h.

References mumech::Problems::give_VM_TENS_RANGE(), and mumech::MatrixRecord::nRS.

void mumech::Problem::print_equivalent_problem ( const char *  filename)
void mumech::Problem::print_visualization ( const char *  filename,
int  n,
int  dim = 0,
bool  refined = false 
)

Triangulates inclusions surfaces and prints filename VTK file.

Parameters
filenameName of the output VTK file.
nNumber segments of a quater ellipse.
dimMesh dimension. In the case of 3d problem and dim=2, the 2d mesh is generated in the plane z=0.
refinedThe mesh density varies according to ellipse curvature. The process of triangulation is slower.

Definition at line 2237 of file problem.cpp.

References _errorr, mumech::Inclusion::a, mumech::Mesh::Elems, errol, mumech::Mesh::generate_regularSphereMesh_2d(), mumech::Mesh::generate_regularSphereMesh_3d(), mumech::Mesh::local2global(), mumech::mElement::M, mumech::mNode::M, mumech::Mesh::nElems, mumech::Mesh::nNodes, mumech::Mesh::Nodes, mumech::Inclusion::origin, mumech::Mesh::print_geometry_file_vtk(), mumech::Mesh::scale(), mumech::Mesh::set_coll(), mumech::Mesh::shift_id(), and mumech::Inclusion::TInv.

Referenced by clanek_3d_vzor(), eqiv_gener_1x2dI_2d(), eqiv_gener_gx2dI_2d(), Four_3d_inclusions(), grid_2d_3x3_3d(), intersection_2d_core(), intersection_3d_core(), visualization_197I_2d3d(), visualization_1I_2d(), visualization_1I_3d(), x2D_1I_Ellipse_direct_API(), and X3D_3incl().

void mumech::Problem::printFieldsOnMeshGrid ( const char *  mesh_file_out,
const double *  p1,
const double *  p2,
const long *  n,
char  ptFlag,
int  rs,
int  nrs,
PFCmode  pfcMode = PFCM_OPTIMIZED 
) const

Function computes all fields (displacements, strains and stresses) in nodes a regular orthogonal mesh/grid, see giveFieldsOfPoint() for details about parameters.

Grid is given by coordinates of two diagonally opposed corners p1 and p2 and by count of segments n. For every required remote strain (rs, nrs) a mesh with values in nodes is printed to VTK file mesh_file_out with remote strain id as suffix.

Parameters
mesh_file_outOutput file with mesh and computed fields in nodes.
p1Coordinates of grid corner point with lower coordinates.
p2Coordinates of grid corner point with upper coordinates.
nNumber of segments in the directions of particular axes. The grid is 2d when n[2]==0.
ptFlagFlag defines the type of calculated fields, 'p' denotes 'perturbation' and 't' denotes 'total'.
rsThe first computed remote strain.
nrsNumber of computed remote strains.
pfcModeAlgorithm type of a point fields calculation (PFCM_FULL/PFCM_OPTIMIZED).

Definition at line 2041 of file problem.cpp.

References mumech::Mesh::compute_node_fields(), mumech::Mesh::generate_regular_mesh(), and mumech::Mesh::print_geometry_file_vtk().

Referenced by clanek_3d_vzor(), compute_and_print_reg_mesh(), Four_3d_inclusions(), grid_2d_3x3_3d(), grid_2d_3x3_3d_F(), x2D_1I_Ellipse_direct_API(), x3D_1I_Ellipsoid(), and x3D_1I_Ellipsoid_direct_API().

void mumech::Problem::printFieldsOnMeshVTK ( const char *  mesh_file_out,
const char *  mesh_file,
char  ptFlag,
int  rs,
int  nrs,
PFCmode  pfcMode = PFCM_OPTIMIZED 
) const

Function computes all fields (displacements, strains and stresses) in nodes a mesh given via VTK file, see giveFieldsOfPoint() for details about parameters.

For every required remote strain (rs, nrs) a mesh with values in nodes is printed to VTK file mesh_file_out with remote strain id as suffix.

Parameters
mesh_file_outOutput file with mesh and computed fields in nodes.
mesh_fileInput file with mesh geometry.
ptFlagFlag defines the type of calculated fields, 'p' denotes 'perturbation' and 't' denotes 'total'.
rsThe first computed remote strain.
nrsNumber of computed remote strains.
pfcModeAlgorithm type of a point fields calculation (PFCM_FULL/PFCM_OPTIMIZED).

Definition at line 2028 of file problem.cpp.

References mumech::Mesh::compute_node_fields(), mumech::Mesh::print_geometry_file_vtk(), and mumech::Mesh::read_geometry_file_vtk().

Referenced by clanek_3d_vzor(), X2D_3incl(), and X3D_3incl().

void mumech::Problem::printVtkFileCompleteInclRec ( const char *  rsltFileName)
private
Problem * mumech::Problem::read_inclusions_plus_initialize_and_print ( const char *  inclusion_file,
const char *  equiv_file,
DiffTypes  dt 
)
  1. Set set_diffType. See this->set_diffType().
  2. Read VTK input file containing inclusion geometry and topology. See this->read_input_file().
  3. Initializing of inclusion record (i.e. selfbalancing), if not initialized yet. See this->input_data_initialize_and_check_consistency() and this->convert_to_equivalent_problem().
  4. Print the VTK file of with initialized inclusion records, if the 'equiv_file' is not NULL. See this->print_equivalent_problem().

Definition at line 2059 of file problem.cpp.

Referenced by mumech::Comparison::cmp_mm_ansys_total_energy(), compute_and_print_reg_mesh(), Four_3d_inclusions(), print_graf(), visualization_197I_2d3d(), visualization_1I_2d(), visualization_1I_3d(), X2D_3incl(), x3D_1I_Ellipsoid(), and X3D_3incl().

void mumech::Problem::read_input_file ( const char *  filename)

Reads filename VTK input file containing inclusion geometry and topology.

Definition at line 357 of file problem.cpp.

References _errorr, _errorr2, _errorr3, _errorr4, _STRCMP, _STRNCMP, tinyxml2::XMLElement::Attribute(), CASE, gelibspace::Stream::close(), tinyxml2::XMLNode::DeleteChild(), mumech::e(), errol, gelibspace::Stream::file(), tinyxml2::XMLNode::FirstChild(), gelibspace::FP_scan_array(), FP_scan_expected_number_exit, FP_scan_expected_word_exit, gelibspace::FP_scan_word(), gelibspace::FP_skip_line(), tinyxml2::XMLElement::GetText(), gelibspace::Stream::isFile(), tinyxml2::XMLNode::NextSibling(), gelibspace::Stream::open(), tinyxml2::XMLElement::QueryLongAttribute(), gelibspace::Stream::relink_downF(), gelibspace::Stream::relink_next(), gelibspace::Stream::relink_up(), mumech::scan_DATA_field_head(), mumech::scan_FIELD_head(), SP_scan_expected_number_exit, SP_scan_expected_word2_exit, SP_scan_expected_word_exit, gelibspace::SP_scan_number(), gelibspace::SP_scan_word(), gelibspace::SP_skip_word(), gelibspace::ST_scan_array(), gelibspace::ST_scan_number(), gelibspace::STRM_void, gelibspace::Stream::tixel(), gelibspace::Stream::tixnod(), tinyxml2::XMLNode::ToComment(), tinyxml2::XMLNode::ToDeclaration(), tinyxml2::XMLNode::ToElement(), tinyxml2::XMLElement::ToElement(), tinyxml2::XMLNode::Value(), gelibspace::VTKR_cd, gelibspace::VTKR_cells, gelibspace::VTKR_data, gelibspace::VTKR_fields, gelibspace::VTKR_pd, gelibspace::VTKR_points, gelibspace::VTKR_void, gelibspace::XP_check_expected_attribute(), gelibspace::XP_give_unique_expected_elem(), and gelibspace::XP_giveDAtext().

Referenced by clanek_3d_vzor(), clanek_homog_grid(), Ellipse(), Ellipsoid(), energyTest01(), Four_3d_inclusions(), plstrain_2I_2d(), plstrain_2I_3d(), test01(), and twoInclTest().

void mumech::Problem::set_approximation ( int  val)

Definition at line 178 of file problem.cpp.

References _errorr, mumech::AllocateArray2D(), and mumech::CleanArray2d().

Referenced by energyTest01(), test01(), and twoInclTest().

void mumech::Problem::set_data_set ( void  )
inline
void mumech::Problem::set_DataDimDiff ( int  dim,
DiffTypes  dt 
)
inline

Function agregates set_data_set, set_dimension and set_diffType functions.

Definition at line 457 of file problem.h.

References mumech::Problems::set_dimension().

Referenced by grid_2d_3x3_3d(), grid_2d_3x3_3d_F(), x2D_1I_Ellipse_homog(), and x3D_1I_Ellipsoid_homog().

void mumech::Problem::set_diffType ( DiffTypes  val)
inline
void mumech::Problem::set_inclusion_all ( long  id,
double  x,
double  y,
double  e,
double  n,
double  a1,
double  a2,
double  e1 
)
inline
void mumech::Problem::set_inclusion_all ( long  id,
double  x,
double  y,
double  z,
double  e,
double  n,
double  a1,
double  a2,
double  a3,
double  e1,
double  e2,
double  e3 
)
inline

Definition at line 466 of file problem.h.

References mumech::Inclusion::set_all_3d().

void mumech::Problem::set_inclusion_centroids ( long  id,
double  x,
double  y,
double  z = 0.0 
)
inline
void mumech::Problem::set_inclusion_E_nu ( long  id,
double  E,
double  nu 
)
inline
void mumech::Problem::set_inclusion_EulerAnglesDEG ( long  id,
double  e1,
double  e2 = 0.0,
double  e3 = 0.0 
)
inline

Sets the id -th inclusion Euler angles [e1,e2,e3] given in degrees. The e2 and e3 angles are ignored in the case of 2 dimensions.

Definition at line 442 of file problem.h.

References mumech::Inclusion::set_Euller_angles_deg(), and mumech::Problems::twodim.

Referenced by eqiv_gener_1x2dI_2d(), eqiv_gener_1x2dI_3d(), eqiv_gener_1x3dI(), eqiv_gener_2x2dI_2d(), eqiv_gener_2x2dI_3d(), eqiv_gener_gx2dI_2d(), eqiv_gener_gx2dI_3d(), plstrain_2I_2d(), plstrain_2I_3d(), speedtest2Dx3D(), x2D_1I_Ellipse_direct_API(), and x3D_1I_Ellipsoid_direct_API().

void mumech::Problem::set_inclusion_semiaxesDimensions ( long  id,
double  a1,
double  a2,
double  a3 = 0.0 
)
inline
void mumech::Problem::set_inclusion_shape ( long  id,
InclusionGeometry  shape 
)
inline

Sets the id -th inclusion shape. Default shape is detected automaticly.

Definition at line 453 of file problem.h.

References mumech::Inclusion::set_Inclusion_shape().

Referenced by speedtest2Dx3D(), and test3D().

void mumech::Problem::set_intFieldsShape ( int  val)
inline
void mumech::Problem::set_matrix_E_nu ( double  E,
double  nu 
)
inline
void mumech::Problem::set_number_of_inclusions ( long  n)
void mumech::Problem::set_numberOfRemoteStrains ( int  n)
inline
void mumech::Problem::set_problem_size ( double  a1,
double  a2,
double  a3,
double  b1,
double  b2,
double  b3,
double  node_distance 
)
inline

Definition at line 376 of file problem.h.

Referenced by energyTest01(), eqiv_gener_gx2dI_2d(), and twoInclTest().

void mumech::Problem::set_RemoteStrain ( int  id,
const double *  rs 
)
inline
void mumech::Problem::set_SBA_maximumNumberOfIterations ( int  val)
inline

Definition at line 369 of file problem.h.

void mumech::Problem::set_SBA_optimized ( bool  val)
inline
void mumech::Problem::set_SBA_requiredNumberOfIterations ( int  val)
inline

Definition at line 370 of file problem.h.

void mumech::Problem::set_SBAM ( SBAtype  val)
inline
void mumech::Problem::set_semiaxes_max_difference ( double  val)
inline

Set the variable max_axes_diff.

Definition at line 399 of file problem.h.

References _errorr2, and INFTY.

void mumech::Problem::set_semiaxes_min_difference ( double  val)
inline

Set the variable min_axes_diff.

Definition at line 397 of file problem.h.

void mumech::Problem::set_UnitRemoteStrains ( void  )
inline

Function sets a set of unit remote strains.

There are 3 unit remote strains in 2d (6 in 3d), in row notation {eps_xx, eps_xy, eps_yx, eps_yy}: rs1 = {1.0, 0.0, 0.0, 0.0} rs2 = {0.0, 0.5, 0.5, 0.0} rs3 = {0.0, 0.0, 0.0, 1.0}

Definition at line 462 of file problem.h.

References mumech::MatrixRecord::set_unit_remote_strain().

Referenced by eqiv_gener_1x2dI_2d(), eqiv_gener_1x2dI_3d(), eqiv_gener_gx2dI_2d(), eqiv_gener_gx2dI_3d(), x2D_1I_Ellipse_homog(), and x3D_1I_Ellipsoid_homog().

void mumech::Problem::updateEigenstrainsBySBalgorithm ( void  )
private

Function updates the actual and transformation (equivalent) eigenstrains by taking into account the mutual dependencies (interactions).

The self-balance (SB) algorithm is employed to do that.

Definition at line 814 of file problem.cpp.

void mumech::Problem::updateEigenstrainsBySBalgorithm_2D ( int  strainID)
private

Function updates the actual and transformation (equivalent) eigenstrains by taking into account the mutual dependencies (interactions).

The self-balance (SB) algorithm is employed to do that.

Definition at line 848 of file problem.cpp.

References _errorr, _SELF_BALANCE_NORM_LIMIT_, mumech::AddVector(), mumech::e(), mumech::matice::g(), mumech::gaussovaEliminace(), mumech::vektor::pricist(), mumech::vektor::print(), mumech::SBAT_MESHLESS, mumech::SBAT_ORIGINAL, mumech::SBAT_STANDA, mumech::SBAT_VOID, and mumech::vektor::v.

double mumech::Problem::updateEpsTauInSBal ( int  strainID,
double **&  last_eps_tau 
)
private
void mumech::Problem::updateStrainsInInclRecord ( int  noUpdate)
private

Friends And Related Function Documentation

friend class DifferentialScheme
friend

Definition at line 166 of file problem.h.

friend class Dilute
friend

Definition at line 165 of file problem.h.

friend class eshelbySoluEllipticIntegrals
friend

Definition at line 162 of file problem.h.

friend class eshelbySoluUniformField
friend

Definition at line 161 of file problem.h.

friend class Homogenization
friend

Definition at line 164 of file problem.h.

friend class Inclusion
friend

Definition at line 156 of file problem.h.

friend class InclusionRecord2D
friend

Definition at line 158 of file problem.h.

friend class InclusionRecord3D
friend

Definition at line 157 of file problem.h.

friend class MatrixRecord
friend

Definition at line 163 of file problem.h.

friend class mElement
friend

Definition at line 171 of file problem.h.

friend class Mesh
friend

Definition at line 168 of file problem.h.

friend class mNode
friend

Definition at line 170 of file problem.h.

friend class Point
friend

Definition at line 169 of file problem.h.

friend class printBenchmarkResultsVtk
friend

Definition at line 159 of file problem.h.

friend class RegGrid
friend

Definition at line 167 of file problem.h.

friend class selfBalanceAlgorithm
friend

Definition at line 160 of file problem.h.

Member Data Documentation

double mumech::Problem::approx_point_pos1
private

Definition at line 198 of file problem.h.

Referenced by mumech::Inclusion::update_approximations().

int mumech::Problem::approximation
private

Approximation of epsilon tau - 0 = constant, 1 = linear, ...

Definition at line 197 of file problem.h.

Referenced by mumech::InclusionRecord2D::giveExtStrainPert(), and mumech::Inclusion::update_approximations().

bool mumech::Problem::data_equivalent
private

Problem converted to equivalent one.

Definition at line 182 of file problem.h.

bool mumech::Problem::data_set
private

Input data given (direct input or vtk file read) - problem description.

Definition at line 181 of file problem.h.

DiffTypes mumech::Problem::diffType
private

the type of differentiation actually used. (just for testing purposes)

Definition at line 200 of file problem.h.

Referenced by mumech::InclusionRecord2D::dI().

Homogenization** mumech::Problem::homogs
private

Homogenizations.

Definition at line 224 of file problem.h.

Inclusion** mumech::Problem::inclusions
private

inclusion records - 1d array of pointers to InclusionRecord

Definition at line 189 of file problem.h.

Referenced by mumech::Homogenization::giveTotalVolumeFractionOfInclusions(), and mumech::selfBalanceAlgorithm::totalEigStrainInInclCentroidsUpdate().

int mumech::Problem::intFieldsShape
private

Sets the internal fields shape. 0 = basic eshelby solution, 1 = polynomial - if available, 2 = constant, 3 = sum all without any recalculation.

Definition at line 196 of file problem.h.

MatrixRecord* mumech::Problem::matrix
private
double mumech::Problem::max_axes_diff
private

The maximal relative difference of two inclusion semiaxes to guarantee numerical stability; relative to the first, i.g. longer, of two compared axes.

Definition at line 209 of file problem.h.

bool mumech::Problem::max_axes_diff_change
private

Permission to change the inclusion shape, when the maximal relative difference of two inclusion semiaxes is violated.

Definition at line 212 of file problem.h.

Mesh** mumech::Problem::meshes
private

Meshes.

Definition at line 221 of file problem.h.

double mumech::Problem::min_axes_diff
private

The minimal relative difference of two inclusion semiaxes to guarantee numerical stability; relative to the first, i.g. longer, of two compared axes.

Definition at line 208 of file problem.h.

bool mumech::Problem::min_axes_diff_change
private

Permission to change the inclusion shape, when the minimal relative difference of two inclusion semiaxes is violated.

Definition at line 211 of file problem.h.

int mumech::Problem::nhomogs
private

Number of homogenizations.

Definition at line 223 of file problem.h.

int mumech::Problem::nmeshes
private

Number of meshes.

Definition at line 220 of file problem.h.

double mumech::Problem::node_dist
private

?

Definition at line 204 of file problem.h.

int mumech::Problem::noIncl
private
double mumech::Problem::problem_size_A[3]
private

?

Definition at line 202 of file problem.h.

double mumech::Problem::problem_size_B[3]
private

?

Definition at line 203 of file problem.h.

int mumech::Problem::SBA_maxiters
private

Number of iterations in SBA.

Definition at line 193 of file problem.h.

bool mumech::Problem::SBA_optimized
private

SBA optimized (FULL/_OPTIMIZED_)

Definition at line 192 of file problem.h.

Referenced by mumech::selfBalanceAlgorithm::totalEigStrainInInclCentroidsUpdate().

int mumech::Problem::SBA_reqiters
private

Number of iterations in SBA.

Definition at line 194 of file problem.h.

SBAtype mumech::Problem::SBA_type
private

type of Self balancing algorithm (SBA)

Definition at line 191 of file problem.h.

Referenced by mumech::selfBalanceAlgorithm::totalEigStrainInInclCentroidsUpdate().

int mumech::Problem::totalNoActingIncls
private

Total number of acting inclusions, e.i. sum of inclusion[i]->noActingIncls.

Definition at line 217 of file problem.h.

int mumech::Problem::verbose
private

0 - no printing, 1 - basic printing, 3 - debug printing

Definition at line 206 of file problem.h.

Referenced by mumech::selfBalanceAlgorithm::totalEigStrainInInclCentroidsUpdate().

double mumech::Problem::volumeOfIncls
private

Volume of all inclusions.

Definition at line 216 of file problem.h.


The documentation for this class was generated from the following files: