MGIS
Loading...
Searching...
No Matches
Integrate.hxx File Reference
#include <span>
#include <limits>
#include <thread>
#include <vector>
#include "MGIS/Config.hxx"
#include "MGIS/Behaviour/BehaviourDataView.hxx"
#include "MGIS/Behaviour/Integrate.ixx"

Classes

struct  mgis::behaviour::BehaviourIntegrationOptions
 structure defining various option More...
 
struct  mgis::behaviour::BehaviourIntegrationResult
 structure in charge of reporting the result of a behaviour integration. More...
 
struct  mgis::behaviour::MultiThreadedBehaviourIntegrationResult
 structure in charge of reporting the result of a behaviour integration. More...
 

Namespaces

namespace  mgis
 the namespace mgis encloses all the MGIS project.
 

Enumerations

enum struct  mgis::behaviour::IntegrationType {
  PREDICTION_TANGENT_OPERATOR = -3 , PREDICTION_SECANT_OPERATOR = -2 , PREDICTION_ELASTIC_OPERATOR = -1 , INTEGRATION_NO_TANGENT_OPERATOR = 0 ,
  INTEGRATION_ELASTIC_OPERATOR = 1 , INTEGRATION_SECANT_OPERATOR = 2 , INTEGRATION_TANGENT_OPERATOR = 3 , INTEGRATION_CONSISTENT_TANGENT_OPERATOR = 4
}
 type of integration to be performed
 
enum struct  SpeedOfSoundFlag { INTEGRATION_WITHOUT_SPEED_OF_SOUND = false , INTEGRATION_WITH_SPEED_OF_SOUND = true }
 

Functions

MGIS_EXPORT const debug::BehaviourIntegrationFailureAnalysermgis::behaviour::debug::getDefaultBehaviourIntegrationFailureAnalyser ()
 
MGIS_EXPORT int mgis::behaviour::executeInitializeFunction (BehaviourDataView &, const Behaviour &, const std::string_view, std::span< const real >)
 execute the given initialize function.
 
MGIS_EXPORT int mgis::behaviour::executeInitializeFunction (BehaviourDataView &, const Behaviour &, const std::string_view)
 execute the given initialize function.
 
MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::executeInitializeFunction (MaterialDataManager &, const std::string_view)
 execute the given initialize function
 
MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::executeInitializeFunction (MaterialDataManager &, const std::string_view, std::span< const real >)
 execute the given initialize function
 
MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::executeInitializeFunction (MaterialDataManager &, const std::string_view, const size_type, const size_type)
 execute the given initialize function over a range of integration points
 
MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::executeInitializeFunction (MaterialDataManager &, const std::string_view, std::span< const real >, const size_type, const size_type)
 execute the given initialize function over a range of integration points
 
MGIS_EXPORT MultiThreadedBehaviourIntegrationResult mgis::behaviour::executeInitializeFunction (ThreadPool &, MaterialDataManager &, const std::string_view)
 execute the given initialize function over all integration points using a thread pool to parallelize the integration.
 
MGIS_EXPORT MultiThreadedBehaviourIntegrationResult mgis::behaviour::executeInitializeFunction (ThreadPool &, MaterialDataManager &, const std::string_view, std::span< const real >)
 execute the given initialize function over all integration points using a thread pool to parallelize the integration.
 
int mgis::behaviour::integrate (BehaviourDataView &, const Behaviour &)
 integrate the behaviour. The returned value has the following meaning:
 
MGIS_EXPORT int mgis::behaviour::integrate_debug (BehaviourDataView &, const Behaviour &)
 integrate the behaviour. In case of non convergence, an mtest file is generated.
 
MGIS_EXPORT int mgis::behaviour::integrate_debug (BehaviourDataView &, const Behaviour &, const debug::BehaviourIntegrationFailureAnalyser &)
 integrate the behaviour. In case of non convergence, an mtest file is generated.
 
MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::integrate (MaterialDataManager &, const BehaviourIntegrationOptions &, const real)
 integrate the behaviour for a range of integration points.
 
MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::integrate_debug (MaterialDataManager &, const BehaviourIntegrationOptions &, const real)
 debugging version
 
MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::integrate_debug (MaterialDataManager &, const BehaviourIntegrationOptions &, const real, const debug::BehaviourIntegrationFailureAnalyser &)
 debugging version
 
MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::integrate (MaterialDataManager &, const BehaviourIntegrationOptions &, const real, const size_type, const size_type)
 integrate the behaviour for a range of integration points.
 
MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::integrate_debug (MaterialDataManager &, const BehaviourIntegrationOptions &, const real, const size_type, const size_type)
 debugging version
 
MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::integrate_debug (MaterialDataManager &, const BehaviourIntegrationOptions &, const real, const size_type, const size_type, const debug::BehaviourIntegrationFailureAnalyser &)
 debugging version
 
MGIS_EXPORT MultiThreadedBehaviourIntegrationResult mgis::behaviour::integrate (mgis::ThreadPool &, MaterialDataManager &, const BehaviourIntegrationOptions &, const real)
 integrate the behaviour over all integration points using a thread pool to parallelize the integration.
 
MGIS_EXPORT MultiThreadedBehaviourIntegrationResult mgis::behaviour::integrate_debug (mgis::ThreadPool &, MaterialDataManager &, const BehaviourIntegrationOptions &, const real)
 debugging version
 
MGIS_EXPORT MultiThreadedBehaviourIntegrationResult mgis::behaviour::integrate_debug (mgis::ThreadPool &, MaterialDataManager &, const BehaviourIntegrationOptions &, const real, const debug::BehaviourIntegrationFailureAnalyser &)
 debugging version
 
MGIS_EXPORT int mgis::behaviour::integrate (mgis::ThreadPool &, MaterialDataManager &, const IntegrationType it, const real)
 integrate the behaviour for a range of integration points.
 
MGIS_EXPORT int mgis::behaviour::integrate_debug (mgis::ThreadPool &, MaterialDataManager &, const IntegrationType it, const real)
 debugging version
 
MGIS_EXPORT int mgis::behaviour::integrate_debug (mgis::ThreadPool &, MaterialDataManager &, const IntegrationType it, const real, const debug::BehaviourIntegrationFailureAnalyser &)
 debugging version
 
MGIS_EXPORT int mgis::behaviour::integrate (MaterialDataManager &, const IntegrationType, const real, const size_type, const size_type)
 integrate the behaviour for a range of integration points.
 
MGIS_EXPORT int mgis::behaviour::integrate_debug (MaterialDataManager &, const IntegrationType, const real, const size_type, const size_type)
 debugging version
 
MGIS_EXPORT int mgis::behaviour::integrate_debug (MaterialDataManager &, const IntegrationType, const real, const size_type, const size_type, const debug::BehaviourIntegrationFailureAnalyser &)
 debugging version
 
MGIS_EXPORT int mgis::behaviour::executePostProcessing (std::span< real >, BehaviourDataView &, const Behaviour &, const std::string_view)
 execute the given post-processing
 
MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::executePostProcessing (std::span< real >, MaterialDataManager &, const std::string_view)
 execute the given post-processing
 
MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::executePostProcessing (std::span< real >, MaterialDataManager &, const std::string_view, const size_type, const size_type)
 execute the given post-processing over a range of integration points
 
MGIS_EXPORT MultiThreadedBehaviourIntegrationResult mgis::behaviour::executePostProcessing (std::span< real >, ThreadPool &, MaterialDataManager &, const std::string_view)
 execute the given post-processing over all integration points using a thread pool to parallelize the integration.
 

Detailed Description

Author
Thomas Helfer
Date
01/08/2018

Function Documentation

◆ executeInitializeFunction() [1/8]

MGIS_EXPORT int mgis::behaviour::executeInitializeFunction ( BehaviourDataView &  ,
const Behaviour ,
const std::string_view   
)

execute the given initialize function.

Parameters
[in,out]dbehaviour data view
[in,out]bbehaviour
[in]nname of the initialize function
Note
the initialize function is expected to have no inputs
Due to the structure of the BehaviourDataView structure in which the state at the beginning of the time step is immutable, only the state variables at the end of the time step can be updated. Hence, for consistency, the behaviour data shall be updated after the call to all initialize functions.

◆ executeInitializeFunction() [2/8]

MGIS_EXPORT int mgis::behaviour::executeInitializeFunction ( BehaviourDataView &  ,
const Behaviour ,
const std::string_view  ,
std::span< const real  
)

execute the given initialize function.

Parameters
[in,out]dbehaviour data view
[in]inputsinputs of the initialize function
[in,out]bbehaviour
[in]nname of the initialize function
Note
Due to the structure of the BehaviourDataView structure in which the state at the beginning of the time step is immutable, only the state variables at the end of the time step can be updated. Hence, for consistency, the behaviour data shall be updated after the call to all initialize functions.

◆ executeInitializeFunction() [3/8]

MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::executeInitializeFunction ( MaterialDataManager ,
const std::string_view   
)

execute the given initialize function

Parameters
[in,out]dmaterial data manager
[in]nname of the initialize function

◆ executeInitializeFunction() [4/8]

MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::executeInitializeFunction ( MaterialDataManager ,
const std::string_view  ,
const size_type  ,
const size_type   
)

execute the given initialize function over a range of integration points

Parameters
[in,out]dmaterial data manager
[in]nname of the initialize function
[in]bfirst index of the range
[in]elast index of the range

◆ executeInitializeFunction() [5/8]

MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::executeInitializeFunction ( MaterialDataManager ,
const std::string_view  ,
std::span< const real  
)

execute the given initialize function

Parameters
[in,out]dmaterial data manager
[in]nname of the initialize function
[in]inputsinitialize function inputs
Note
the inputs can be uniform or not.

◆ executeInitializeFunction() [6/8]

MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::executeInitializeFunction ( MaterialDataManager ,
const std::string_view  ,
std::span< const real ,
const size_type  ,
const size_type   
)

execute the given initialize function over a range of integration points

Parameters
[in,out]dmaterial data manager
[in]nname of the initialize function
[in]inputsinitialize function inputs
[in]bfirst index of the range
[in]elast index of the range
Note
the inputs can be uniform or not.

◆ executeInitializeFunction() [7/8]

MGIS_EXPORT MultiThreadedBehaviourIntegrationResult mgis::behaviour::executeInitializeFunction ( ThreadPool ,
MaterialDataManager ,
const std::string_view   
)

execute the given initialize function over all integration points using a thread pool to parallelize the integration.

Parameters
[in,out]pthread pool
[in,out]dmaterial data manager
[in]nname of the initialize function

◆ executeInitializeFunction() [8/8]

MGIS_EXPORT MultiThreadedBehaviourIntegrationResult mgis::behaviour::executeInitializeFunction ( ThreadPool ,
MaterialDataManager ,
const std::string_view  ,
std::span< const real  
)

execute the given initialize function over all integration points using a thread pool to parallelize the integration.

Parameters
[in,out]pthread pool
[in,out]dmaterial data manager
[in]nname of the initialize function
[in]inputsinitialize function inputs
Note
the inputs can be uniform or not.

◆ executePostProcessing() [1/4]

MGIS_EXPORT int mgis::behaviour::executePostProcessing ( std::span< real ,
BehaviourDataView &  ,
const Behaviour ,
const std::string_view   
)

execute the given post-processing

Parameters
[out]outputspost-processing results
[in,out]dbehaviour data
[in,out]bbehaviour
[in]nname of the post-processing

◆ executePostProcessing() [2/4]

MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::executePostProcessing ( std::span< real ,
MaterialDataManager ,
const std::string_view   
)

execute the given post-processing

Parameters
[out]outputspost-processing results
[in,out]dmaterial data manager
[in]nname of the post-processing

◆ executePostProcessing() [3/4]

MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::executePostProcessing ( std::span< real ,
MaterialDataManager ,
const std::string_view  ,
const size_type  ,
const size_type   
)

execute the given post-processing over a range of integration points

Parameters
[out]outputspost-processing results
[in,out]dmaterial data manager
[in]nname of the post-processing
[in]bfirst index of the range
[in]elast index of the range

◆ executePostProcessing() [4/4]

MGIS_EXPORT MultiThreadedBehaviourIntegrationResult mgis::behaviour::executePostProcessing ( std::span< real ,
ThreadPool ,
MaterialDataManager ,
const std::string_view   
)

execute the given post-processing over all integration points using a thread pool to parallelize the integration.

Parameters
[out]outputspost-processing results
[in,out]pthread pool
[in,out]dmaterial data manager
[in]nname of the post-processing

◆ getDefaultBehaviourIntegrationFailureAnalyser()

MGIS_EXPORT const debug::BehaviourIntegrationFailureAnalyser & mgis::behaviour::debug::getDefaultBehaviourIntegrationFailureAnalyser ( )
Returns
the default debugging options

◆ integrate() [1/6]

int mgis::behaviour::integrate ( BehaviourDataView &  d,
const Behaviour b 
)
inline

integrate the behaviour. The returned value has the following meaning:

  • -1: integration failed
  • 0: integration succeeded but results are unreliable
  • 1: integration succeeded and results are reliable
Parameters
[in,out]dbehaviour data
[in,out]bbehaviour
Note
: the type of integration to be performed, must be explicitely set in d.K[0], as follows (see the IntegrationType enum).

If d.K[0] is greater than 50, the speed of sound must be computed.

Let Ke be equal to:

  • d.K[0] - 100 if d.K[0] is greater than 50
  • d.K[0] otherwise.

If Ke is negative, only the prediction operator is computed and no behaviour integration is performed.

Ke has the following meaning:

  • if Ke is lower than -2.5, the tangent operator must be computed.
  • if Ke is in [-2.5:-1.5]: the secant operator must be computed.
  • if Ke is in [-1.5:-0.5]: the elastic operator must be computed.
  • if Ke is in [-0.5:0.5]: the behaviour integration is performed, but no stiffness matrix.
  • if Ke is in [0.5:1.5]: the elastic operator must be computed.
  • if Ke is in [1.5:2.5]: the secant operator must be computed.
  • if Ke is in [2.5:3.5]: the tangent operator must be computed.
  • if Ke is greater than 3.5, the consistent tangent operator must be computed.

◆ integrate() [2/6]

MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::integrate ( MaterialDataManager ,
const BehaviourIntegrationOptions ,
const real   
)

integrate the behaviour for a range of integration points.

Returns
the result of the behaviour integration.
Parameters
[in,out]mmaterial data manager
[in]optsdescription of the operation to be performed
[in]dttime step
Note
if required, the memory associated with the tangent operator blocks is automatically allocated.

◆ integrate() [3/6]

MGIS_EXPORT BehaviourIntegrationResult mgis::behaviour::integrate ( MaterialDataManager ,
const BehaviourIntegrationOptions ,
const real  ,
const size_type  ,
const size_type   
)

integrate the behaviour for a range of integration points.

Returns
the result of the behaviour integration.
Parameters
[in,out]mmaterial data manager
[in]optsdescription of the operation to be performed
[in]dttime step
[in]bfirst index of the range
[in]elast index of the range
Note
if required, the memory associated with the tangent operator blocks is automatically allocated.

◆ integrate() [4/6]

MGIS_EXPORT int mgis::behaviour::integrate ( MaterialDataManager ,
const IntegrationType  ,
const real  ,
const size_type  ,
const size_type   
)

integrate the behaviour for a range of integration points.

Returns
an exit status. The returned value has the following meaning:
  • -1: integration failed for at least one Gauss point
  • 0: all integrations succeeded but results are unreliable for at least one Gauss point
  • 1: integration succeeded and results are reliable.
Parameters
[in,out]mmaterial data manager
[in]dttime step
[in]bfirst index of the range
[in]elast index of the range
Note
if required, the memory associated with the tangent operator blocks is automatically allocated.

◆ integrate() [5/6]

MGIS_EXPORT MultiThreadedBehaviourIntegrationResult mgis::behaviour::integrate ( mgis::ThreadPool ,
MaterialDataManager ,
const BehaviourIntegrationOptions ,
const real   
)

integrate the behaviour over all integration points using a thread pool to parallelize the integration.

Returns
the result of the behaviour integration.
Parameters
[in,out]pthread pool
[in,out]mmaterial data manager
[in]cdescription of the operation to be performed
[in]dttime step
Note
if required, the memory associated with the tangent operator blocks is automatically allocated.

◆ integrate() [6/6]

MGIS_EXPORT int mgis::behaviour::integrate ( mgis::ThreadPool ,
MaterialDataManager ,
const IntegrationType  it,
const real   
)

integrate the behaviour for a range of integration points.

Returns
an exit status. The returned value has the following meaning:
  • -1: integration failed for at least one integration point
  • 0: all integrations succeeded but results are unreliable for at least one Gauss point
  • 1: integration succeeded and results are reliable.
Parameters
[in,out]pthread pool
[in,out]mmaterial data manager
[in]dttime step
Note
if required, the memory associated with the tangent operator blocks is automatically allocated.

◆ integrate_debug() [1/2]

MGIS_EXPORT int mgis::behaviour::integrate_debug ( BehaviourDataView &  ,
const Behaviour  
)

integrate the behaviour. In case of non convergence, an mtest file is generated.

The returned value has the following meaning:

  • -1: integration failed
  • 0: integration succeeded but results are unreliable
  • 1: integration succeeded and results are reliable
Parameters
[in,out]dbehaviour data
[in,out]bbehaviour

◆ integrate_debug() [2/2]

MGIS_EXPORT int mgis::behaviour::integrate_debug ( BehaviourDataView &  ,
const Behaviour ,
const debug::BehaviourIntegrationFailureAnalyser  
)

integrate the behaviour. In case of non convergence, an mtest file is generated.

The returned value has the following meaning:

  • -1: integration failed
  • 0: integration succeeded but results are unreliable
  • 1: integration succeeded and results are reliable
Parameters
[in,out]dbehaviour data
[in,out]bbehaviour