Chaste Commit::675f9facbe008c5eacb9006feaeb6423206579ea
VtkNonlinearElasticitySolutionWriter< DIM > Class Template Reference

#include <VtkNonlinearElasticitySolutionWriter.hpp>

+ Collaboration diagram for VtkNonlinearElasticitySolutionWriter< DIM >:

Public Member Functions

 VtkNonlinearElasticitySolutionWriter (AbstractNonlinearElasticitySolver< DIM > &rSolver)
 
void SetWriteElementWiseStrains (StrainType strainType)
 
void CalculateDisplacements (std::vector< c_vector< double, DIM > > &rDisplacements)
 
void CalculateStrains (std::string &name, std::vector< c_matrix< double, DIM, DIM > > &rStrains)
 
void Write ()
 

Private Attributes

AbstractNonlinearElasticitySolver< DIM > * mpSolver
 
bool mWriteElementWiseStrains
 
StrainType mElementWiseStrainType
 
std::vector< c_matrix< double, DIM, DIM > > mTensorStrainData
 
std::vector< c_vector< double, DIM > > mDisplacements
 

Friends

class TestVtkNonlinearElasticitySolutionWriter
 

Detailed Description

template<unsigned DIM>
class VtkNonlinearElasticitySolutionWriter< DIM >

Class for write mechanics solutions to .vtu file (for visualisation in Paraview), including displacement, pressure if incompressible simulation, different strains, and (in future) stresses.

Definition at line 46 of file VtkNonlinearElasticitySolutionWriter.hpp.

Constructor & Destructor Documentation

◆ VtkNonlinearElasticitySolutionWriter()

Member Function Documentation

◆ CalculateDisplacements()

template<unsigned DIM>
void VtkNonlinearElasticitySolutionWriter< DIM >::CalculateDisplacements ( std::vector< c_vector< double, DIM > > &  rDisplacements)

Stores the displacements in rDisplacements. Memory for rDisplacements must be alloctaed before calling this method, which will check if rDisplacements is of the same size as the number of nodes in the quadratic mesh

Parameters
rDisplacementsthe vector that wil be filled in with displacement values

Definition at line 95 of file VtkNonlinearElasticitySolutionWriter.cpp.

◆ CalculateStrains()

template<unsigned DIM>
void VtkNonlinearElasticitySolutionWriter< DIM >::CalculateStrains ( std::string &  name,
std::vector< c_matrix< double, DIM, DIM > > &  rStrains 
)

Stores the strains in the rStrains vector. The type of strain depends on the most recent call to SetWriteElementWiseStrains. Memory for rStrains must be allocated before calling this method, which will check if rStresses is of the same size as the number of elements in the quadratic mesh

Parameters
namethe name of the displacements, based on the most recent call to SetWriteElementWiseStrains
rStrainsthe vector that will be filled with corresponding strain values

Definition at line 109 of file VtkNonlinearElasticitySolutionWriter.cpp.

References NEVER_REACHED.

◆ SetWriteElementWiseStrains()

template<unsigned DIM>
void VtkNonlinearElasticitySolutionWriter< DIM >::SetWriteElementWiseStrains ( StrainType  strainType)

Set write strains for each element. Can write any of: F = dx/dX, C = F^T F, E = 1/2 (C-I)

Parameters
strainTypeWhich strain to write, choose one of: DEFORMATION_GRADIENT_F, DEFORMATION_TENSOR_C, LAGRANGE_STRAIN_E

Definition at line 144 of file VtkNonlinearElasticitySolutionWriter.cpp.

◆ Write()

Friends And Related Symbol Documentation

◆ TestVtkNonlinearElasticitySolutionWriter

template<unsigned DIM>
friend class TestVtkNonlinearElasticitySolutionWriter
friend

Definition at line 48 of file VtkNonlinearElasticitySolutionWriter.hpp.

Member Data Documentation

◆ mDisplacements

template<unsigned DIM>
std::vector<c_vector<double,DIM> > VtkNonlinearElasticitySolutionWriter< DIM >::mDisplacements
private

◆ mElementWiseStrainType

template<unsigned DIM>
StrainType VtkNonlinearElasticitySolutionWriter< DIM >::mElementWiseStrainType
private

What type of strain to write for each element, from: F = dx/dX, C = F^T F, E = 1/2 (C-I)

Definition at line 57 of file VtkNonlinearElasticitySolutionWriter.hpp.

◆ mpSolver

Pointer to the mechanics solver which performed the calculation

Definition at line 52 of file VtkNonlinearElasticitySolutionWriter.hpp.

Referenced by VtkNonlinearElasticitySolutionWriter< DIM >::VtkNonlinearElasticitySolutionWriter().

◆ mTensorStrainData

template<unsigned DIM>
std::vector<c_matrix<double,DIM,DIM> > VtkNonlinearElasticitySolutionWriter< DIM >::mTensorStrainData
private

Tensor data to be written to the .vtu file. Used also for testing

Definition at line 60 of file VtkNonlinearElasticitySolutionWriter.hpp.

Referenced by VtkNonlinearElasticitySolutionWriter< DIM >::VtkNonlinearElasticitySolutionWriter().

◆ mWriteElementWiseStrains

template<unsigned DIM>
bool VtkNonlinearElasticitySolutionWriter< DIM >::mWriteElementWiseStrains
private

Whether to write strains for each element

Definition at line 54 of file VtkNonlinearElasticitySolutionWriter.hpp.


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